提交 a5507be8 编写于 作者: A Andrew Kryczka

Revert "Remove Stats related to compressed block cache (#11135)"

This reverts commit e808858a.
上级 14fef92c
......@@ -290,7 +290,7 @@ extern void InitializeOptionsFromFlags(
// There are two cases.
// Case 1: OPTIONS file is not specified. Command line arguments have been used
// to initialize `options`. InitializeOptionsGeneral() will use
// `cache` and `filter_policy` to initialize
// `cache`, `block_cache_compressed` and `filter_policy` to initialize
// corresponding fields of `options`. InitializeOptionsGeneral() will
// also set up other fields of `options` so that stress test can run.
// Examples include `create_if_missing` and
......@@ -301,7 +301,7 @@ extern void InitializeOptionsFromFlags(
// case, if command line arguments indicate that the user wants to set
// up such shared objects, e.g. block cache, compressed block cache,
// row cache, filter policy, then InitializeOptionsGeneral() will honor
// the user's choice, thus passing `cache`,
// the user's choice, thus passing `cache`, `block_cache_compressed`,
// `filter_policy` as input arguments.
//
// InitializeOptionsGeneral() must not overwrite fields of `options` loaded
......
......@@ -170,6 +170,12 @@ enum Tickers : uint32_t {
// Record the number of calls to GetUpdatesSince. Useful to keep track of
// transaction log iterator refreshes
GET_UPDATES_SINCE_CALLS,
BLOCK_CACHE_COMPRESSED_MISS, // miss in the compressed block cache
BLOCK_CACHE_COMPRESSED_HIT, // hit in the compressed block cache
// Number of blocks added to compressed block cache
BLOCK_CACHE_COMPRESSED_ADD,
// Number of failures when adding blocks to compressed block cache
BLOCK_CACHE_COMPRESSED_ADD_FAILURES,
WAL_FILE_SYNCED, // Number of times WAL sync is done
WAL_FILE_BYTES, // Number of bytes written to WAL
......
......@@ -4904,6 +4904,14 @@ class TickerTypeJni {
return 0x40;
case ROCKSDB_NAMESPACE::Tickers::GET_UPDATES_SINCE_CALLS:
return 0x41;
case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_MISS:
return 0x42;
case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_HIT:
return 0x43;
case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD:
return 0x44;
case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD_FAILURES:
return 0x45;
case ROCKSDB_NAMESPACE::Tickers::WAL_FILE_SYNCED:
return 0x46;
case ROCKSDB_NAMESPACE::Tickers::WAL_FILE_BYTES:
......@@ -5253,6 +5261,14 @@ class TickerTypeJni {
return ROCKSDB_NAMESPACE::Tickers::NUMBER_OF_RESEEKS_IN_ITERATION;
case 0x41:
return ROCKSDB_NAMESPACE::Tickers::GET_UPDATES_SINCE_CALLS;
case 0x42:
return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_MISS;
case 0x43:
return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_HIT;
case 0x44:
return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD;
case 0x45:
return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD_FAILURES;
case 0x46:
return ROCKSDB_NAMESPACE::Tickers::WAL_FILE_SYNCED;
case 0x47:
......
......@@ -312,6 +312,26 @@ public enum TickerType {
*/
GET_UPDATES_SINCE_CALLS((byte) 0x41),
/**
* Miss in the compressed block cache.
*/
BLOCK_CACHE_COMPRESSED_MISS((byte) 0x42),
/**
* Hit in the compressed block cache.
*/
BLOCK_CACHE_COMPRESSED_HIT((byte) 0x43),
/**
* Number of blocks added to compressed block cache.
*/
BLOCK_CACHE_COMPRESSED_ADD((byte) 0x44),
/**
* Number of failures when adding blocks to compressed block cache.
*/
BLOCK_CACHE_COMPRESSED_ADD_FAILURES((byte) 0x45),
/**
* Number of times WAL sync is done.
*/
......
......@@ -85,6 +85,11 @@ const std::vector<std::pair<Tickers, std::string>> TickersNameMap = {
{BLOOM_FILTER_PREFIX_USEFUL, "rocksdb.bloom.filter.prefix.useful"},
{NUMBER_OF_RESEEKS_IN_ITERATION, "rocksdb.number.reseeks.iteration"},
{GET_UPDATES_SINCE_CALLS, "rocksdb.getupdatessince.calls"},
{BLOCK_CACHE_COMPRESSED_MISS, "rocksdb.block.cachecompressed.miss"},
{BLOCK_CACHE_COMPRESSED_HIT, "rocksdb.block.cachecompressed.hit"},
{BLOCK_CACHE_COMPRESSED_ADD, "rocksdb.block.cachecompressed.add"},
{BLOCK_CACHE_COMPRESSED_ADD_FAILURES,
"rocksdb.block.cachecompressed.add.failures"},
{WAL_FILE_SYNCED, "rocksdb.wal.synced"},
{WAL_FILE_BYTES, "rocksdb.wal.bytes"},
{WRITE_DONE_BY_SELF, "rocksdb.write.self"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册