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

Function BenchmarkNewInboxCreation

test/bench_test.go:120–130  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

118}
119
120func BenchmarkNewInboxCreation(b *testing.B) {
121 s := RunDefaultServer()
122 defer s.Shutdown()
123 nc := NewDefaultConnection(b)
124 defer nc.Close()
125 b.ResetTimer()
126
127 for i := 0; i < b.N; i++ {
128 nc.NewRespInbox()
129 }
130}
131
132func BenchmarkRequest(b *testing.B) {
133 b.StopTimer()

Callers

nothing calls this directly

Calls 4

NewRespInboxMethod · 0.80
RunDefaultServerFunction · 0.70
NewDefaultConnectionFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected