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

Function TestSeconds

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

Source from the content-addressed store, hash-verified

51}
52
53func TestSeconds(t *testing.T) {
54 s := millionMessagesSecondSample(1)
55 seconds := s.End.Sub(s.Start).Seconds()
56 if seconds != s.Seconds() || seconds != 1.0 {
57 t.Fatal("Expected sample seconds to be 1 second")
58 }
59}
60
61func TestRate(t *testing.T) {
62 s := millionMessagesSecondSample(60)

Callers

nothing calls this directly

Calls 2

SecondsMethod · 0.80

Tested by

no test coverage detected