Fixed a bug which causes rocksdb.flush.write.bytes stat is always zero
Summary: Fixed a bug which causes rocksdb.flush.write.bytes stat is always zero Test Plan: augment existing db_test Reviewers: sdong, anthony, IslamAbdelRahman, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D47595
This commit is contained in:
parent
8dcaa16b54
commit
0b7dd9131f
@ -103,9 +103,8 @@ Status BuildTable(
|
|||||||
// TODO(noetzli): Update stats after flush, too.
|
// TODO(noetzli): Update stats after flush, too.
|
||||||
if (io_priority == Env::IO_HIGH &&
|
if (io_priority == Env::IO_HIGH &&
|
||||||
IOSTATS(bytes_written) >= kReportFlushIOStatsEvery) {
|
IOSTATS(bytes_written) >= kReportFlushIOStatsEvery) {
|
||||||
ThreadStatusUtil::IncreaseThreadOperationProperty(
|
ThreadStatusUtil::SetThreadOperationProperty(
|
||||||
ThreadStatus::FLUSH_BYTES_WRITTEN, IOSTATS(bytes_written));
|
ThreadStatus::FLUSH_BYTES_WRITTEN, IOSTATS(bytes_written));
|
||||||
IOSTATS_RESET(bytes_written);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7949,6 +7949,9 @@ TEST_F(DBTest, MergeTestTime) {
|
|||||||
|
|
||||||
ASSERT_LT(TestGetTickerCount(options, MERGE_OPERATION_TOTAL_TIME), 6000000);
|
ASSERT_LT(TestGetTickerCount(options, MERGE_OPERATION_TOTAL_TIME), 6000000);
|
||||||
ASSERT_GT(TestGetTickerCount(options, MERGE_OPERATION_TOTAL_TIME), 3200000);
|
ASSERT_GT(TestGetTickerCount(options, MERGE_OPERATION_TOTAL_TIME), 3200000);
|
||||||
|
#if ROCKSDB_USING_THREAD_STATUS
|
||||||
|
ASSERT_GT(TestGetTickerCount(options, FLUSH_WRITE_BYTES), 0);
|
||||||
|
#endif // ROCKSDB_USING_THREAD_STATUS
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(DBTestWithParam, MergeCompactionTimeTest) {
|
TEST_P(DBTestWithParam, MergeCompactionTimeTest) {
|
||||||
|
@ -111,9 +111,8 @@ void FlushJob::ReportFlushInputSize(const autovector<MemTable*>& mems) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FlushJob::RecordFlushIOStats() {
|
void FlushJob::RecordFlushIOStats() {
|
||||||
ThreadStatusUtil::IncreaseThreadOperationProperty(
|
ThreadStatusUtil::SetThreadOperationProperty(
|
||||||
ThreadStatus::FLUSH_BYTES_WRITTEN, IOSTATS(bytes_written));
|
ThreadStatus::FLUSH_BYTES_WRITTEN, IOSTATS(bytes_written));
|
||||||
IOSTATS_RESET(bytes_written);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Status FlushJob::Run(FileMetaData* file_meta) {
|
Status FlushJob::Run(FileMetaData* file_meta) {
|
||||||
|
Loading…
Reference in New Issue
Block a user