Make db_bench less space for --stats_per_interval

Summary:
Changes compaction IO stats to be printed once per interval rather
than once per interval per thread. https://github.com/facebook/rocksdb/issues/1276

Task ID: #12698508

Test Plan: run db_bench

Reviewers: sdong

Reviewed By: sdong

Subscribers: andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D62067
This commit is contained in:
Mark Callaghan 2016-08-15 11:07:05 -07:00
parent 6525ce4caf
commit 4fe12baa66

View File

@ -1447,7 +1447,7 @@ class Stats {
(now - last_report_finish_) / 1000000.0,
(now - start_) / 1000000.0);
if (FLAGS_stats_per_interval) {
if (id_ == 0 && FLAGS_stats_per_interval) {
std::string stats;
if (db_with_cfh && db_with_cfh->num_created.load()) {