aschult5 / actiontime

A Golang library for tracking action time averages
MIT License
0 stars 1 forks source link

AddAction benchmark should spawn AddAction concurrently, not loops of AddAction #50

Closed aschult5 closed 4 years ago

aschult5 commented 4 years ago

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.