Skip to content

Commit

Permalink
[server] Move rocksdb compaction cancelled metric under RocksDBStats (#…
Browse files Browse the repository at this point in the history
…739)

[server] Move rocksdb compaction cancelled under aggr stat

Co-authored-by: Sourav Maji <[email protected]>
  • Loading branch information
majisourav99 and Sourav Maji authored Nov 6, 2023
1 parent 0d85038 commit d07f186
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class RocksDBMemoryStats extends AbstractVeniceStats {
"rocksdb.cur-size-all-mem-tables",
"rocksdb.size-all-mem-tables",
"rocksdb.num-entries-active-mem-table",
"rocksdb.compaction.cancelled",
"rocksdb.num-entries-imm-mem-tables",
"rocksdb.num-deletes-active-mem-table",
"rocksdb.num-deletes-imm-mem-tables",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.rocksdb.TickerType.BLOCK_CACHE_INDEX_MISS;
import static org.rocksdb.TickerType.BLOCK_CACHE_MISS;
import static org.rocksdb.TickerType.BLOOM_FILTER_USEFUL;
import static org.rocksdb.TickerType.COMPACTION_CANCELLED;
import static org.rocksdb.TickerType.GET_HIT_L0;
import static org.rocksdb.TickerType.GET_HIT_L1;
import static org.rocksdb.TickerType.GET_HIT_L2_AND_UP;
Expand Down Expand Up @@ -72,6 +73,7 @@ public class RocksDBStats extends AbstractVeniceStats {

// we'll need to enable read_amp_bytes_per_bit in rocksDB config
private final Sensor readAmplificationFactor;
private final Sensor compactionCancelled;

public RocksDBStats(MetricsRepository metricsRepository, String name) {
super(metricsRepository, name);
Expand Down Expand Up @@ -107,6 +109,7 @@ public RocksDBStats(MetricsRepository metricsRepository, String name) {
this.getHitL0 = registerSensor("rocksdb_get_hit_l0", GET_HIT_L0);
this.getHitL1 = registerSensor("rocksdb_get_hit_l1", GET_HIT_L1);
this.getHitL2AndUp = registerSensor("rocksdb_get_hit_l2_and_up", GET_HIT_L2_AND_UP);
this.compactionCancelled = registerSensor("rocksdb_compaction_cancelled", COMPACTION_CANCELLED);

this.blockCacheHitRatio = registerSensor("rocksdb_block_cache_hit_ratio", new Gauge(() -> {
if (rocksDBStat != null) {
Expand Down

0 comments on commit d07f186

Please sign in to comment.