Add a stats counter for DB_WRITE back which was mistakenly removed.

Summary: Add a stats counter for DB_WRITE back which was mistakenly removed.

Test Plan: augment GroupCommitTest

Reviewers: sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D39399
This commit is contained in:
Yueh-Hsuan Chiang 2015-06-02 12:35:12 -07:00
parent ac81130fa0
commit 898e803fc5
2 changed files with 5 additions and 0 deletions

View File

@ -3223,6 +3223,8 @@ Status DBImpl::WriteImpl(const WriteOptions& write_options,
RecordTick(stats_, WRITE_WITH_WAL);
}
StopWatch write_sw(env_, db_options_.statistics.get(), DB_WRITE);
WriteContext context;
mutex_.Lock();

View File

@ -8591,6 +8591,9 @@ TEST_F(DBTest, GroupCommitTest) {
ASSERT_TRUE(!itr->Valid());
delete itr;
HistogramData hist_data = {0};
options.statistics->histogramData(DB_WRITE, &hist_data);
ASSERT_GT(hist_data.average, 0.0);
} while (ChangeOptions(kSkipNoSeekToLast));
}