diff options
author | gabime <gmelman1@gmail.com> | 2018-05-20 17:41:22 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.com> | 2018-05-20 18:17:34 +0300 |
commit | ade22934e380442a032c169a786bf32f6b631e93 (patch) | |
tree | 1e5b866ad807d2251027ab53d0d2c862eccd9d1d | |
parent | ee2fd265fd602834e4a6d1132332297c5c4e9a51 (diff) |
updated bench to show elapsed too
-rw-r--r-- | example/bench.cpp | 4 |
1 files 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<spdlog::logger> log) auto delta = system_clock::now() - start; auto delta_d = duration_cast<duration<double>>(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<spdlog::logger> log, int thread_count) @@ -130,5 +130,5 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count auto delta = system_clock::now() - start; auto delta_d = duration_cast<duration<double>>(delta).count(); - cout << format(int(howmany / delta_d)) << "/sec" << endl; + cout << "Elapsed: " << delta_d << "\t" << format(int(howmany / delta_d)) << "/sec" << endl; } |