Skip to content

Commit 8e3cdbd

Browse files
committed
feat(storage): add metric to monitor available split block tasks
1 parent ec56ab8 commit 8e3cdbd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

scripts/gen-dashboard.py

+6
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,12 @@ def storage() -> RowPanel:
840840
create_heatmap_panel(
841841
"tycho_storage_cell_in_mem_store_time", "Time to store cell without write"
842842
),
843+
create_heatmap_quantile_panel(
844+
"tycho_storage_split_block_available_permits",
845+
"Split block available permits",
846+
UNITS.NUMBER_FORMAT,
847+
"0.999",
848+
),
843849
create_heatmap_panel(
844850
"tycho_storage_batch_write_time", "Time to write merge in write batch"
845851
),

storage/src/store/block/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,9 @@ impl BlockStorage {
10321032
self.db.rocksdb().write(batch)?;
10331033

10341034
// Start splitting block data
1035+
metrics::histogram!("tycho_storage_split_block_available_permits")
1036+
.record(self.split_block_semaphore.available_permits() as f64);
1037+
10351038
let permit = self.split_block_semaphore.clone().acquire_owned().await?;
10361039
let _handle = self.spawn_split_block_data(&id.block_id, data, permit);
10371040

0 commit comments

Comments
 (0)