diff --git a/db/db_bench.cc b/db/db_bench.cc index c5e838176..d298ac29e 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -338,12 +338,14 @@ class Stats { } else { double now = FLAGS_env->NowMicros(); fprintf(stderr, - "... thread %d: (%ld,%ld) ops (interval,total) in %.6f seconds and %.2f ops/sec\n", + "... thread %d: (%ld,%ld) ops and (%.1f,%.1f) ops/second in (%.6f,%.6f) seconds\n", id_, done_ - last_report_done_, done_, - (now - last_report_finish_) / 1000000.0, (done_ - last_report_done_) / - ((now - last_report_finish_) / 1000000.0)); + ((now - last_report_finish_) / 1000000.0), + done_ / ((now - start_) / 1000000.0), + (now - last_report_finish_) / 1000000.0, + (now - start_) / 1000000.0); if (FLAGS_stats_per_interval) { std::string stats; diff --git a/db/db_impl.cc b/db/db_impl.cc index cd4cb05f3..f179e77dc 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1643,10 +1643,12 @@ bool DBImpl::GetProperty(const Slice& property, std::string* value) { } snprintf(buf, sizeof(buf), - "Amplification: %.1f rate, %.2f GB in, %.2f GB out\n", + "Amplification: %.1f rate, %.2f GB in, %.2f GB out, %.2f MB/sec in, %.2f MB/sec out\n", (double) total_bytes / stats_[0].bytes_written, stats_[0].bytes_written / (1048576.0 * 1024), - total_bytes / (1048576.0 * 1024)); + total_bytes / (1048576.0 * 1024), + stats_[0].bytes_written / 1048576.0 / seconds_up, + total_bytes / 1048576.0 / seconds_up); value->append(buf); snprintf(buf, sizeof(buf), "Uptime(secs): %.1f\n", seconds_up);