MCPcopy
hub / github.com/nats-io/nats.go / TestAvgRate

Function TestAvgRate

bench/benchlib_test.go:133–141  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

131}
132
133func TestAvgRate(t *testing.T) {
134 sg := NewSampleGroup()
135 sg.AddSample(millionMessagesSecondSample(1))
136 sg.AddSample(millionMessagesSecondSample(2))
137 sg.AddSample(millionMessagesSecondSample(3))
138 if sg.MinRate() != sg.AvgRate() {
139 t.Fatal("Expected MinRate == AvgRate")
140 }
141}
142
143func TestStdDev(t *testing.T) {
144 sg := NewSampleGroup()

Callers

nothing calls this directly

Calls 5

AddSampleMethod · 0.95
MinRateMethod · 0.95
AvgRateMethod · 0.95
NewSampleGroupFunction · 0.85

Tested by

no test coverage detected