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

Function makeBench

bench/benchlib_test.go:178–188  ·  view source on GitHub ↗
(subs, pubs int)

Source from the content-addressed store, hash-verified

176}
177
178func makeBench(subs, pubs int) *Benchmark {
179 bench := NewBenchmark("test", subs, pubs)
180 for i := 0; i < subs; i++ {
181 bench.AddSubSample(millionMessagesSecondSample(1))
182 }
183 for i := 0; i < pubs; i++ {
184 bench.AddPubSample(millionMessagesSecondSample(1))
185 }
186 bench.Close()
187 return bench
188}
189
190func TestCsv(t *testing.T) {
191 bench := makeBench(1, 1)

Callers 2

TestCsvFunction · 0.85
TestBenchStringsFunction · 0.85

Calls 5

AddSubSampleMethod · 0.95
AddPubSampleMethod · 0.95
CloseMethod · 0.95
NewBenchmarkFunction · 0.85

Tested by

no test coverage detected