benchmark.js icon indicating copy to clipboard operation
benchmark.js copied to clipboard

Disambiguate `Benchmark#cycles` and the `onCycle` event from `Benchmark#stats.samples.length`

Open jdalton opened this issue 12 years ago • 1 comments

The number of times onCycle is called doesn't match up with Benchmark#cycles because onCycle is also called per sample run as well.

jdalton avatar Nov 29 '12 20:11 jdalton

How about onBenchmark for each benchmark and onSample for each sample, and then Benchmark#cycles can now be a private counter.

andrewdeandrade avatar Mar 21 '14 20:03 andrewdeandrade