From ade22934e380442a032c169a786bf32f6b631e93 Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 20 May 2018 17:41:22 +0300 Subject: [PATCH] updated bench to show elapsed too --- example/bench.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/bench.cpp b/example/bench.cpp index 49385e0f..64095378 100644 --- a/example/bench.cpp +++ b/example/bench.cpp @@ -100,7 +100,7 @@ void bench(int howmany, std::shared_ptr log) auto delta = system_clock::now() - start; auto delta_d = duration_cast>(delta).count(); - cout << format(int(howmany / delta_d)) << "/sec" << endl; + cout << "Elapsed: " << delta_d << "\t" << format(int(howmany / delta_d)) << "/sec" << endl; } void bench_mt(int howmany, std::shared_ptr log, int thread_count) @@ -130,5 +130,5 @@ void bench_mt(int howmany, std::shared_ptr log, int thread_count auto delta = system_clock::now() - start; auto delta_d = duration_cast>(delta).count(); - cout << format(int(howmany / delta_d)) << "/sec" << endl; + cout << "Elapsed: " << delta_d << "\t" << format(int(howmany / delta_d)) << "/sec" << endl; }