[RocksDB] dump leveldb.stats periodically in LOG file.

Summary:
Added an option stats_dump_period_sec to dump leveldb.stats to LOG periodically for diagnosis.
By defauly, it's set to a very big number 3600 (1 hour).

Test Plan: make check;

Reviewers: dhruba

Reviewed By: dhruba

CC: leveldb, zshao

Differential Revision: https://reviews.facebook.net/D10761
This commit is contained in:
Haobo Xu
2013-05-10 15:21:04 -07:00
parent 26541860d3
commit 0e879c93de
4 changed files with 36 additions and 2 deletions

View File

@@ -430,6 +430,9 @@ struct Options {
// Default: false
bool skip_log_error_on_recovery;
// if not zero, dump leveldb.stats to LOG every stats_dump_period_sec
// Default: 3600 (1 hour)
unsigned int stats_dump_period_sec;
};
// Options that control read operations