Currently the loops of calls to AddAction are called in goroutines. Instead, individual calls to AddAction should be called in goroutines.
I suppose it's two different ways of simulating N concurrent clients. However, the former method seems to betray the nature of b.N, as the first bm.numGo results will return almost immediately. Over many b.N this should average out, but it still seems like a code smell.
Currently the loops of calls to AddAction are called in goroutines. Instead, individual calls to AddAction should be called in goroutines.
I suppose it's two different ways of simulating N concurrent clients. However, the former method seems to betray the nature of
b.N
, as the firstbm.numGo
results will return almost immediately. Over many b.N this should average out, but it still seems like a code smell.