From 898e1f26413a947af7caf9719c24e3d92f1284cc Mon Sep 17 00:00:00 2001 From: gabime Date: Tue, 10 Jul 2018 16:11:01 +0300 Subject: [PATCH] Fixed bench --- bench/bench.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bench/bench.cpp b/bench/bench.cpp index 70602407..41f35f73 100644 --- a/bench/bench.cpp +++ b/bench/bench.cpp @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) auto daily_mt = spdlog::daily_logger_mt("daily_mt", "logs/daily_mt.log"); bench_mt(howmany, daily_mt, threads); - bench_mt(howmany, spdlog::create("null_mt")); + bench_mt(howmany, spdlog::create("null_mt"), threads); cout << "\n*******************************************************************************\n"; cout << "async logging.. " << threads << " threads sharing same logger, " << format(howmany) << " iterations " << endl; @@ -112,6 +112,7 @@ void bench(int howmany, std::shared_ptr log) auto delta = high_resolution_clock::now() - start; auto delta_d = duration_cast>(delta).count(); cout << "Elapsed: " << delta_d << "\t" << format(int(howmany / delta_d)) << "/sec" << endl; + spdlog::drop(log->name()); } void bench_mt(int howmany, std::shared_ptr log, int thread_count)