mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
update bench
This commit is contained in:
parent
8338b45b2b
commit
c568640595
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user