From 37d0dcb9b10d2ad1d3bd081b83f51bfd3400ee9e Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Fri, 11 May 2012 11:32:37 -0700 Subject: [PATCH] Use the elapsed time (instead of the per-thread time) to compute ops/sec. Summary: Task ID: # Blame Rev: Test Plan: Revert Plan: Differential Revision: https://reviews.facebook.net/D3147 --- db/db_bench.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/db_bench.cc b/db/db_bench.cc index 5e71f81ab3..346ff9d5b4 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -252,7 +252,8 @@ class Stats { extra = rate; } AppendWithSpace(&extra, message_); - double throughput = (double)done_/seconds_; + double elapsed = (finish_ - start_) * 1e-6; + double throughput = (double)done_/elapsed; fprintf(stdout, "%-12s : %11.3f micros/op %ld ops/sec;%s%s\n", name.ToString().c_str(),