Open chrissound opened 5 years ago
In order to ensure that criterion
generates enough data for us to have some trust in the raw measurements, criterion
sets a minimum time threshold that a benchmark must run for:
This is where the threshold
is used in the inner loop of benchmarking:
If you do the math here, it will likely add up to the time you're seeing.
Admittedly, the Haddocks for timeLimit
don't make mention of this fact, although they probably should.
I have some benchmarks where a single iteration takes ~5min. Is there any alternative for me other than rewriting them outside of criterion? I essentially want to run them just once and have the time reported.
I was hoping I could quickly benchmark an example like this - but it seems to be taking around 4 seconds - to do numerous(?) runs.
Have I misunderstood the
resamples
/timeLimit
values?