diff --git a/db/db_impl.cc b/db/db_impl.cc index f16bea5cb..9a451f5d7 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1092,6 +1092,7 @@ SequenceNumber DBImpl::GetLatestSequenceNumber() { Status DBImpl::GetUpdatesSince(SequenceNumber seq, unique_ptr* iter) { + RecordTick(options_.statistics, GET_UPDATES_SINCE_CALLS); if (seq > last_flushed_sequence_) { return Status::IOError("Requested sequence not yet written in the db"); } diff --git a/include/rocksdb/statistics.h b/include/rocksdb/statistics.h index 766ca13fe..15ffc8553 100644 --- a/include/rocksdb/statistics.h +++ b/include/rocksdb/statistics.h @@ -76,6 +76,10 @@ enum Tickers { // over large number of keys with same userkey. NUMBER_OF_RESEEKS_IN_ITERATION, + // Record the number of calls to GetUpadtesSince. Useful to keep track of + // transaction log iterator refreshes + GET_UPDATES_SINCE_CALLS, + TICKER_ENUM_MAX }; @@ -108,7 +112,8 @@ const std::vector> TickersNameMap = { { SEQUENCE_NUMBER, "rocksdb.sequence.number" }, { BLOOM_FILTER_PREFIX_CHECKED, "rocksdb.bloom.filter.prefix.checked" }, { BLOOM_FILTER_PREFIX_USEFUL, "rocksdb.bloom.filter.prefix.useful" }, - { NUMBER_OF_RESEEKS_IN_ITERATION, "rocksdb.number.reseeks.iteration" } + { NUMBER_OF_RESEEKS_IN_ITERATION, "rocksdb.number.reseeks.iteration" }, + { GET_UPDATES_SINCE_CALLS, "rocksdb.getupdatessince.calls" } }; /**