|
|
@ -35,7 +35,6 @@ inline void bench(const std::string& fn_name, const std::chrono::milliseconds &d
|
|
|
|
auto now = the_clock::now();
|
|
|
|
auto now = the_clock::now();
|
|
|
|
if (now - start_time >= duration)
|
|
|
|
if (now - start_time >= duration)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
auto p = now - lastPrintTime;
|
|
|
|
|
|
|
|
if (now - lastPrintTime >= print_interval)
|
|
|
|
if (now - lastPrintTime >= print_interval)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::cout << fn_name << ": " << format(counter) << " per sec" << std::endl;
|
|
|
|
std::cout << fn_name << ": " << format(counter) << " per sec" << std::endl;
|
|
|
@ -55,4 +54,4 @@ inline void bench(const std::string& fn_name, const std::function<void() >& fn)
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << fn_name << ": " << duration_cast<milliseconds>(delta).count() << " ms" << std::endl;
|
|
|
|
std::cout << fn_name << ": " << duration_cast<milliseconds>(delta).count() << " ms" << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|