| 7079 | |
| 7080 | template <typename Clock> |
| 7081 | ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const { |
| 7082 | auto min_time = env.clock_resolution.mean * Detail::minimum_ticks; |
| 7083 | auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(Detail::warmup_time)); |
| 7084 | auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun); |
| 7085 | int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed)); |
| 7086 | return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(Detail::warmup_time), Detail::warmup_iterations }; |
| 7087 | } |
| 7088 | |
| 7089 | template <typename Clock = default_clock> |
| 7090 | void run() { |
nothing calls this directly
no test coverage detected