MCPcopy Create free account
hub / github.com/egonelbre/exp / runParallelBench

Function runParallelBench

queues/benchutils_test.go:13–27  ·  view source on GitHub ↗
(b *testing.B, numRoutines int, q Queue, test func(Queue, int))

Source from the content-addressed store, hash-verified

11)
12
13func runParallelBench(b *testing.B, numRoutines int, q Queue, test func(Queue, int)) {
14 if useFixedBench {
15 b.N = benchIterations
16 }
17 N := b.N / numRoutines
18 wg := &sync.WaitGroup{}
19 for i := 0; i < numRoutines; i += 1 {
20 wg.Add(1)
21 go func(){
22 test(q, N)
23 wg.Done()
24 }()
25 }
26 wg.Wait()
27}
28
29func benchANRN(q Queue, N int){
30 for i := 0; i < N; i += 1 {

Callers 15

BenchmarkCFifo_ANRNx1Function · 0.70
BenchmarkCFifo_ANRNx3Function · 0.70
BenchmarkCFifo_ANRNx5Function · 0.70
BenchmarkCFifo_ANRNx10Function · 0.70
BenchmarkCFifo_ANRNx50Function · 0.70
BenchmarkCFifo_ANRNx100Function · 0.70
BenchmarkCFifo_A1R1x1Function · 0.70
BenchmarkCFifo_A1R1x3Function · 0.70
BenchmarkCFifo_A1R1x5Function · 0.70
BenchmarkCFifo_A1R1x10Function · 0.70
BenchmarkCFifo_A1R1x50Function · 0.70
BenchmarkCFifo_A1R1x100Function · 0.70

Calls 2

DoneMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected