improve comments for statistics.h

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/5351

Differential Revision: D15496346

Pulled By: miasantreble

fbshipit-source-id: eeb619e6bd8616003ba35b0cd4bb8050e6a8cb4d
main
Zhongyi Xie 6 years ago committed by Facebook Github Bot
parent 5d359fc337
commit 94c78b11e4
  1. 14
      include/rocksdb/statistics.h

@ -447,6 +447,10 @@ struct HistogramData {
double min = 0.0; double min = 0.0;
}; };
// StatsLevel can be used to reduce statistics overhead by skipping certain
// types of stats in the stats collection process.
// Usage:
// options.statistics->set_stats_level(StatsLevel::kExceptTimeForMutex);
enum StatsLevel : uint8_t { enum StatsLevel : uint8_t {
// Disable timer stats, and skip histogram stats // Disable timer stats, and skip histogram stats
kExceptHistogramOrTimers, kExceptHistogramOrTimers,
@ -464,7 +468,15 @@ enum StatsLevel : uint8_t {
kAll, kAll,
}; };
// Analyze the performance of a db // Analyze the performance of a db by providing cumulative stats over time.
// Usage:
// Options options;
// options.statistics = rocksdb::CreateDBStatistics();
// Status s = DB::Open(options, kDBPath, &db);
// ...
// options.statistics->getTickerCount(NUMBER_BLOCK_COMPRESSED);
// HistogramData hist;
// options.statistics->histogramData(FLUSH_TIME, &hist);
class Statistics { class Statistics {
public: public:
virtual ~Statistics() {} virtual ~Statistics() {}

Loading…
Cancel
Save