From 1c7b3e4eb2fb5caf0852f2a4af105b359a5906a9 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 1 Nov 2014 02:25:51 +0200 Subject: [PATCH] bench --- example/bench.cpp | 11 ++--------- example/example.cpp | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/example/bench.cpp b/example/bench.cpp index bcdc74bc..a11abc5d 100644 --- a/example/bench.cpp +++ b/example/bench.cpp @@ -26,7 +26,7 @@ void bench_mt(int howmany, std::shared_ptr log, int thread_count int main(int argc, char* argv[]) { - int howmany = 123456; + int howmany = 250000; int threads = 4; int flush_interval = 1000; int file_size = 30 * 1024 * 1024; @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) auto daily_st = spdlog::daily_logger_st("daily_st", "logs/daily_st", flush_interval); bench(howmany, daily_st); - + bench(howmany, spdlog::create("null_st")); cout << "\n*******************************************************************************\n"; @@ -63,13 +63,6 @@ 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); - - auto async_sink = std::make_shared(1000); - auto file_sink = std::make_shared("logs/async_logger", "txt", file_size, rotating_files, flush_interval); - async_sink->add_sink(file_sink); - auto async_logger = std::make_shared("async_logger", async_sink ); - bench_mt(howmany, async_logger, threads); - bench_mt(howmany, spdlog::create("null_mt"), threads); } catch (std::exception &ex) diff --git a/example/example.cpp b/example/example.cpp index 45052395..2f7cad33 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -6,7 +6,7 @@ #include "spdlog/spdlog.h" -int main_(int, char* []) +int main(int, char* []) { namespace spd = spdlog;