From 25d3c83d3be3d894157f7906432b8272f8efe7c6 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 26 Aug 2019 00:53:52 +0300 Subject: [PATCH] Update async bench --- bench/async_bench.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index 26836da0..e5dc0e6f 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -48,6 +48,7 @@ int count_lines(const char *filename) void verify_file(const char *filename, int expected_count) { + spdlog::info("Verifying {} to contain {:n} line..", filename, expected_count); auto count = count_lines(filename); if (count != expected_count) { @@ -115,11 +116,7 @@ int main(int argc, char *argv[]) auto file_sink = std::make_shared(filename, true); auto logger = std::make_shared("async_logger", std::move(file_sink), std::move(tp), async_overflow_policy::block); bench_mt(howmany, std::move(logger), threads); - verify_file(filename, howmany); -#ifdef SPDLOG_ASYNC_BENCH_VERIFY - verify_file(filename, howmany); -#endif // SPDLOG_ASYNC_BENCH_VERIFY } spdlog::info(""); @@ -127,6 +124,7 @@ int main(int argc, char *argv[]) spdlog::info("Queue Overflow Policy: overrun"); spdlog::info("*********************************"); // do same test but discard oldest if queue is full instead of blocking + filename = "logs/basic_async-overrun.log"; for (int i = 0; i < iters; i++) { auto tp = std::make_shared(queue_size, 1);