mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
format
This commit is contained in:
@@ -72,18 +72,14 @@ int main(int argc, char *argv[])
|
||||
cout << "\n*******************************************************************************\n";
|
||||
cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " iterations " << endl;
|
||||
cout << "*******************************************************************************\n";
|
||||
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
spdlog::init_thread_pool(queue_size, 1);
|
||||
spdlog::init_thread_pool(queue_size, 1);
|
||||
auto as = spdlog::basic_logger_mt<spdlog::create_async>("as", "logs/basic_async.log", true);
|
||||
bench_mt(howmany, as, threads);
|
||||
spdlog::drop("as");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (std::exception &ex)
|
||||
{
|
||||
|
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
spdlog::init_thread_pool(tp_queue_size, tp_threads);
|
||||
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::drop("async(null-sink)");
|
||||
}
|
||||
std::cout << endl;
|
||||
std::cout << "Avg rate: " << format(total_rate / iters) << "/sec" << std::endl;
|
||||
|
Reference in New Issue
Block a user