Commit c56fae39 authored by gabime's avatar gabime

bench small change

parent 7f043452
......@@ -12,6 +12,5 @@ int main(int, char* [])
logger->set_pattern("[%Y-%b-%d %T.%e]: %v");
for(int i = 0 ; i < howmany; ++i)
logger->info() << "spdlog message #" << i << ": This is some text for your pleasure";
return 0;
}
......@@ -86,22 +86,18 @@ int main(int argc, char* argv[])
bench_mt(howmany, daily_mt, threads);
bench(howmany, spdlog::create<null_sink_st>("null_mt"));
cout << "\n*******************************************************************************\n";
cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " iterations, flush every " << flush_interval << " lines" << endl;
cout << "*******************************************************************************\n";
spdlog::set_async_mode(howmany);
auto rotating_st_async = spdlog::rotating_logger_st("rotating_st_Async", "logs/rotating_st_async", file_size, rotating_files, flush_interval);
auto rotating_st_async = spdlog::rotating_logger_st("rotating_async", "logs/rotating_async", file_size, rotating_files, flush_interval);
bench(howmany, rotating_st_async);
auto daily_st_async = spdlog::daily_logger_st("daily_st_async", "logs/daily_st_async", flush_interval);
auto daily_st_async = spdlog::daily_logger_st("daily_async", "logs/daily_async", flush_interval);
bench(howmany, daily_st_async);
bench(howmany, spdlog::create<null_sink_st>("null_st_async"));
bench(howmany, spdlog::create<null_sink_st>("null_async"));
spdlog::stop();
cin.ignore();
}
catch (std::exception &ex)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment