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

Function TestGroupRate

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

Source from the content-addressed store, hash-verified

101}
102
103func TestGroupRate(t *testing.T) {
104 sg := NewSampleGroup()
105 sg.AddSample(millionMessagesSecondSample(1))
106 sg.AddSample(millionMessagesSecondSample(2))
107 sg.AddSample(millionMessagesSecondSample(3))
108 if sg.Rate() != Million*2 {
109 t.Fatal("Expected MsgRate at 2 million msg/sec")
110 }
111}
112
113func TestGroupThoughput(t *testing.T) {
114 sg := NewSampleGroup()

Callers

nothing calls this directly

Calls 4

AddSampleMethod · 0.95
NewSampleGroupFunction · 0.85
RateMethod · 0.80

Tested by

no test coverage detected