|
|
|
@ -447,6 +447,10 @@ struct HistogramData { |
|
|
|
|
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 { |
|
|
|
|
// Disable timer stats, and skip histogram stats
|
|
|
|
|
kExceptHistogramOrTimers, |
|
|
|
@ -464,7 +468,15 @@ enum StatsLevel : uint8_t { |
|
|
|
|
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 { |
|
|
|
|
public: |
|
|
|
|
virtual ~Statistics() {} |
|
|
|
|