libnonius / nonius

A C++ micro-benchmarking framework
https://nonius.io
Creative Commons Zero v1.0 Universal
358 stars 47 forks source link

Automatically determine number of samples given a maximal execution time #87

Open nlohmann opened 7 years ago

nlohmann commented 7 years ago

I have a set of executions with varying individual runtimes (11 ms to 1297 ms). If I execute the benchmark with a fixed number of samples, the runtimes of each execution are likewise varying.

Is it possible to provide measure like "maximal runtime per execution" (like 20 seconds) and the library determines for each executions how many samples to execute?