mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-30 15:40:09 +08:00
bench
This commit is contained in:
parent
38b3ecb02e
commit
8a3c858d36
@ -74,13 +74,14 @@ int main(int argc, char *argv[])
|
|||||||
cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " iterations " << endl;
|
cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " iterations " << endl;
|
||||||
cout << "*******************************************************************************\n";
|
cout << "*******************************************************************************\n";
|
||||||
|
|
||||||
spdlog::init_thread_pool(queue_size, 1);
|
|
||||||
for (int i = 0; i < 3; ++i)
|
for (int i = 0; i < 3; ++i)
|
||||||
{
|
{
|
||||||
|
spdlog::init_thread_pool(queue_size, 1);
|
||||||
auto as = spdlog::basic_logger_mt<spdlog::create_async>("as", "logs/basic_async.log", true);
|
auto as = spdlog::basic_logger_mt<spdlog::create_async>("as", "logs/basic_async.log", true);
|
||||||
bench_mt(howmany, as, threads);
|
bench_mt(howmany, as, threads);
|
||||||
spdlog::drop("as");
|
spdlog::drop("as");
|
||||||
spdlog::thread_pool()->wait_empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception &ex)
|
catch (std::exception &ex)
|
||||||
|
Loading…
Reference in New Issue
Block a user