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

Function TestMinMaxRate

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

Source from the content-addressed store, hash-verified

121}
122
123func TestMinMaxRate(t *testing.T) {
124 sg := NewSampleGroup()
125 sg.AddSample(millionMessagesSecondSample(1))
126 sg.AddSample(millionMessagesSecondSample(2))
127 sg.AddSample(millionMessagesSecondSample(3))
128 if sg.MinRate() != sg.MaxRate() {
129 t.Fatal("Expected MinRate == MaxRate")
130 }
131}
132
133func TestAvgRate(t *testing.T) {
134 sg := NewSampleGroup()

Callers

nothing calls this directly

Calls 5

AddSampleMethod · 0.95
MinRateMethod · 0.95
MaxRateMethod · 0.95
NewSampleGroupFunction · 0.85

Tested by

no test coverage detected