Skip to content

Commit

Permalink
Rename RocksDB metrics (#19067)
Browse files Browse the repository at this point in the history
Some rocksdb metric names have typos
  • Loading branch information
andll authored Aug 22, 2024
1 parent 22aa24d commit bacc76c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions crates/typed-store/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ pub struct ColumnFamilyMetrics {
pub rocksdb_block_cache_capacity: IntGaugeVec,
pub rocksdb_block_cache_usage: IntGaugeVec,
pub rocksdb_block_cache_pinned_usage: IntGaugeVec,
pub rocskdb_estimate_table_readers_mem: IntGaugeVec,
pub rocksdb_estimate_table_readers_mem: IntGaugeVec,
pub rocksdb_mem_table_flush_pending: IntGaugeVec,
pub rocskdb_compaction_pending: IntGaugeVec,
pub rocskdb_num_running_compactions: IntGaugeVec,
pub rocksdb_compaction_pending: IntGaugeVec,
pub rocksdb_num_running_compactions: IntGaugeVec,
pub rocksdb_num_running_flushes: IntGaugeVec,
pub rocksdb_estimate_oldest_key_time: IntGaugeVec,
pub rocskdb_background_errors: IntGaugeVec,
pub rocksdb_background_errors: IntGaugeVec,
pub rocksdb_estimated_num_keys: IntGaugeVec,
}

Expand Down Expand Up @@ -168,8 +168,8 @@ impl ColumnFamilyMetrics {
registry,
)
.unwrap(),
rocskdb_estimate_table_readers_mem: register_int_gauge_vec_with_registry!(
"rocskdb_estimate_table_readers_mem",
rocksdb_estimate_table_readers_mem: register_int_gauge_vec_with_registry!(
"rocksdb_estimate_table_readers_mem",
"The estimated memory size used for reading SST tables in this column
family such as filters and index blocks. Note that this number does not
include the memory used in block cache.",
Expand All @@ -186,8 +186,8 @@ impl ColumnFamilyMetrics {
registry,
)
.unwrap(),
rocskdb_compaction_pending: register_int_gauge_vec_with_registry!(
"rocskdb_compaction_pending",
rocksdb_compaction_pending: register_int_gauge_vec_with_registry!(
"rocksdb_compaction_pending",
"A 1 or 0 flag indicating whether a compaction job is pending.
If this number is 1, it means some part of the column family requires
compaction in order to maintain shape of LSM tree, but the compaction
Expand All @@ -198,8 +198,8 @@ impl ColumnFamilyMetrics {
registry,
)
.unwrap(),
rocskdb_num_running_compactions: register_int_gauge_vec_with_registry!(
"rocskdb_num_running_compactions",
rocksdb_num_running_compactions: register_int_gauge_vec_with_registry!(
"rocksdb_num_running_compactions",
"The number of compactions that are currently running for the column family.",
&["cf_name"],
registry,
Expand Down Expand Up @@ -227,8 +227,8 @@ impl ColumnFamilyMetrics {
registry,
)
.unwrap(),
rocskdb_background_errors: register_int_gauge_vec_with_registry!(
"rocskdb_background_errors",
rocksdb_background_errors: register_int_gauge_vec_with_registry!(
"rocksdb_background_errors",
"The accumulated number of RocksDB background errors.",
&["cf_name"],
registry,
Expand Down
8 changes: 4 additions & 4 deletions crates/typed-store/src/rocks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ impl<K, V> DBMap<K, V> {
);
db_metrics
.cf_metrics
.rocskdb_estimate_table_readers_mem
.rocksdb_estimate_table_readers_mem
.with_label_values(&[cf_name])
.set(
Self::get_int_property(rocksdb, &cf, properties::ESTIMATE_TABLE_READERS_MEM)
Expand All @@ -1074,15 +1074,15 @@ impl<K, V> DBMap<K, V> {
);
db_metrics
.cf_metrics
.rocskdb_compaction_pending
.rocksdb_compaction_pending
.with_label_values(&[cf_name])
.set(
Self::get_int_property(rocksdb, &cf, properties::COMPACTION_PENDING)
.unwrap_or(METRICS_ERROR),
);
db_metrics
.cf_metrics
.rocskdb_num_running_compactions
.rocksdb_num_running_compactions
.with_label_values(&[cf_name])
.set(
Self::get_int_property(rocksdb, &cf, properties::NUM_RUNNING_COMPACTIONS)
Expand All @@ -1106,7 +1106,7 @@ impl<K, V> DBMap<K, V> {
);
db_metrics
.cf_metrics
.rocskdb_background_errors
.rocksdb_background_errors
.with_label_values(&[cf_name])
.set(
Self::get_int_property(rocksdb, &cf, properties::BACKGROUND_ERRORS)
Expand Down

0 comments on commit bacc76c

Please sign in to comment.