From e301d94afa4c84e16d8c0da679f44770dd135551 Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Thu, 12 Mar 2015 22:31:37 +0300 Subject: [PATCH] Add async queue size as a separate parameter from sample size --- example/bench.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/example/bench.cpp b/example/bench.cpp index b2f41b12..e82e7ade 100644 --- a/example/bench.cpp +++ b/example/bench.cpp @@ -50,7 +50,8 @@ void bench_mt(int howmany, std::shared_ptr log, int thread_count int main(int argc, char* argv[]) { - int howmany = 1048576; + int queue_size = 65536; + int howmany = 1000000; int threads = 10; bool auto_flush = false; int file_size = 30 * 1024 * 1024; @@ -63,6 +64,8 @@ int main(int argc, char* argv[]) howmany = atoi(argv[1]); if (argc > 2) threads = atoi(argv[2]); + if (argc > 3) + queue_size = atoi(argv[3]); cout << "*******************************************************************************\n"; @@ -92,7 +95,7 @@ int main(int argc, char* argv[]) cout << "*******************************************************************************\n"; - spdlog::set_async_mode(howmany); + spdlog::set_async_mode(queue_size); for(int i = 0; i < 3; ++i) {