From d9c9f3c8093f703316e7f93931580c297d074457 Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Tue, 5 Feb 2019 17:15:42 -0800 Subject: [PATCH] db_bench: fix "micros/op" reporting (#4949) Summary: https://github.com/facebook/rocksdb/commit/4985a9f73b9fb8a0323fbbb06222ae1f758a6b1d#diff-e5276985b26a0551957144f4420a594bR511 changes the meaning of latency reporting from running time per query, to elapse_time / #ops, without providing a reason why. Considering that this is a counter-intuitive reporting, Reverting the change. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4949 Differential Revision: D13964684 Pulled By: siying fbshipit-source-id: d6304d3d4b5a802daa292302623c7dbca9a680bc --- tools/db_bench_tool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 20f3cb273..b1b4859b3 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -1831,7 +1831,7 @@ class Stats { fprintf(stdout, "%-12s : %11.3f micros/op %ld ops/sec;%s%s\n", name.ToString().c_str(), - elapsed * 1e6 / done_, + seconds_ * 1e6 / done_, (long)throughput, (extra.empty() ? "" : " "), extra.c_str());