From c56fae39e8aca9abb79f36553b9afbd00e0fa2b6 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 24 Nov 2014 01:54:49 +0200 Subject: [PATCH] bench small change --- bench/spdlog-bench.cpp | 1 - example/bench.cpp | 14 +++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bench/spdlog-bench.cpp b/bench/spdlog-bench.cpp index 0838f9cd..1d0fc0df 100644 --- a/bench/spdlog-bench.cpp +++ b/bench/spdlog-bench.cpp @@ -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; } diff --git a/example/bench.cpp b/example/bench.cpp index 980493ce..fc4a98bf 100644 --- a/example/bench.cpp +++ b/example/bench.cpp @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) howmany = atoi(argv[1]); if (argc > 2) threads = atoi(argv[2]); - + cout << "*******************************************************************************\n"; cout << "Single thread, " << format(howmany) << " iterations, flush every " << flush_interval << " lines"<< endl; cout << "*******************************************************************************\n"; @@ -85,23 +85,19 @@ int main(int argc, char* argv[]) auto daily_mt = spdlog::daily_logger_mt("daily_mt", "logs/daily_mt", flush_interval); bench_mt(howmany, daily_mt, threads); bench(howmany, spdlog::create("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_st_async")); - + bench(howmany, spdlog::create("null_async")); spdlog::stop(); - cin.ignore(); - } catch (std::exception &ex)