Skip to content

Commit e4d5791

Browse files
authored
chore(cubestore): Introduc new metric - CACHESTORE_ROCKSDB_CF_DEFAULT_SIZE (#7063)
1 parent cc28cd1 commit e4d5791

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

rust/cubestore/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/cubestore/cubestore-sql-tests/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ tar = "0.4.38"
5353

5454
[dev-dependencies]
5555
criterion = { version = "0.4.0", features = ["async_tokio", "html_reports"] }
56-
# Awaiting 0.20.2
57-
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "44dc84171adefbbe75a25b72c35f773a643655a0", default-features = false, features = ["bzip2", "snappy"] }
56+
rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["bzip2", "snappy"] }
5857

5958
[[bench]]
6059
name = "in_process"

rust/cubestore/cubestore/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ simple_logger = "1.7.0"
4242
async-trait = "0.1.36"
4343
actix-rt = "2.7.0"
4444
regex = "1.3.9"
45-
# Awaiting 0.20.2
46-
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "44dc84171adefbbe75a25b72c35f773a643655a0", default-features = false, features = ["bzip2", "snappy"] }
45+
rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["bzip2", "snappy"] }
4746
uuid = { version = "0.8", features = ["serde", "v4"] }
4847
num = "0.3.0"
4948
enum_primitive = "0.1.1"

rust/cubestore/cubestore/src/app_metrics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ pub static CACHESTORE_ROCKSDB_ESTIMATE_LIVE_DATA_SIZE: Gauge =
5858
metrics::gauge("cs.cachestore.rocksdb.estimate_live_data_size");
5959
pub static CACHESTORE_ROCKSDB_LIVE_SST_FILES_SIZE: Gauge =
6060
metrics::gauge("cs.cachestore.rocksdb.live_sst_files_size");
61+
pub static CACHESTORE_ROCKSDB_CF_DEFAULT_SIZE: Gauge =
62+
metrics::gauge("cs.cachestore.rocksdb.cf.default.size");
6163
pub static CACHESTORE_SCHEDULER_GC_QUEUE: Gauge =
6264
metrics::gauge("cs.cachestore.scheduler.gc_queue");
6365

rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ impl RocksCacheStore {
260260
.unwrap_or(0) as i64,
261261
);
262262

263+
let cf_metadata = self.store.db.get_column_family_metadata();
264+
265+
app_metrics::CACHESTORE_ROCKSDB_CF_DEFAULT_SIZE.report(cf_metadata.size as i64);
266+
263267
Ok(())
264268
}
265269

0 commit comments

Comments
 (0)