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:
parent
ac81130fa0
commit
898e803fc5
@ -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();
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user