| 7305 | |
| 7306 | template <typename Clock> |
| 7307 | ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const { |
| 7308 | auto min_time = env.clock_resolution.mean * Detail::minimum_ticks; |
| 7309 | auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime())); |
| 7310 | auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun); |
| 7311 | int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed)); |
| 7312 | return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations }; |
| 7313 | } |
| 7314 | |
| 7315 | template <typename Clock = default_clock> |
| 7316 | void run() { |
nothing calls this directly
no test coverage detected