update bench

This commit is contained in:
gabime 2018-05-27 03:02:28 +03:00
parent 8338b45b2b
commit c568640595

View File

@ -63,17 +63,17 @@ int main(int argc, char *argv[])
cout << "*******************************************************************************\n";
size_t total_rate = 0;
spdlog::init_thread_pool(tp_queue_size, tp_threads);
for (int i = 0; i < iters; ++i)
{
spdlog::init_thread_pool(tp_queue_size, tp_threads);
// auto as = spdlog::daily_logger_st("as", "logs/daily_async");
auto as = spdlog::create_async_logger<null_sink_st>("async(null-sink)");
{
auto as = spdlog::create_async_logger<null_sink_mt>("async(null-sink)");
total_rate += bench_as(howmany, as, client_threads);
spdlog::drop("async(null-sink)");
spdlog::details::registry::instance().get_thread_pool()->wait_empty ();
}
std::cout << endl;
std::cout << "Avg rate: " << format(total_rate / iters) << "/sec" << std::endl;
}
catch (std::exception &ex)
{