Add histogram for DB_SEEK
Summary: as title Test Plan: make release Reviewers: sdong, yhchiang Reviewed By: yhchiang Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D21717
This commit is contained in:
parent
5e642403a9
commit
5a5953b388
@ -552,6 +552,8 @@ void DBIter::FindParseableKey(ParsedInternalKey* ikey, Direction direction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DBIter::Seek(const Slice& target) {
|
void DBIter::Seek(const Slice& target) {
|
||||||
|
StopWatch sw(env_, statistics_, DB_SEEK);
|
||||||
|
|
||||||
saved_key_.Clear();
|
saved_key_.Clear();
|
||||||
// now savved_key is used to store internal key.
|
// now savved_key is used to store internal key.
|
||||||
saved_key_.SetInternalKey(target, sequence_);
|
saved_key_.SetInternalKey(target, sequence_);
|
||||||
|
@ -219,6 +219,7 @@ enum Histograms : uint32_t {
|
|||||||
HARD_RATE_LIMIT_DELAY_COUNT,
|
HARD_RATE_LIMIT_DELAY_COUNT,
|
||||||
SOFT_RATE_LIMIT_DELAY_COUNT,
|
SOFT_RATE_LIMIT_DELAY_COUNT,
|
||||||
NUM_FILES_IN_SINGLE_COMPACTION,
|
NUM_FILES_IN_SINGLE_COMPACTION,
|
||||||
|
DB_SEEK,
|
||||||
HISTOGRAM_ENUM_MAX,
|
HISTOGRAM_ENUM_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -241,6 +242,7 @@ const std::vector<std::pair<Histograms, std::string>> HistogramsNameMap = {
|
|||||||
{ HARD_RATE_LIMIT_DELAY_COUNT, "rocksdb.hard.rate.limit.delay.count"},
|
{ HARD_RATE_LIMIT_DELAY_COUNT, "rocksdb.hard.rate.limit.delay.count"},
|
||||||
{ SOFT_RATE_LIMIT_DELAY_COUNT, "rocksdb.soft.rate.limit.delay.count"},
|
{ SOFT_RATE_LIMIT_DELAY_COUNT, "rocksdb.soft.rate.limit.delay.count"},
|
||||||
{ NUM_FILES_IN_SINGLE_COMPACTION, "rocksdb.numfiles.in.singlecompaction" },
|
{ NUM_FILES_IN_SINGLE_COMPACTION, "rocksdb.numfiles.in.singlecompaction" },
|
||||||
|
{ DB_SEEK, "rocksdb.db.seek.micros" },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HistogramData {
|
struct HistogramData {
|
||||||
|
Loading…
Reference in New Issue
Block a user