Skip to content

Commit

Permalink
feat(custom-tables): don't record metrics for custom tables (paradigm…
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandromazza98 authored Dec 3, 2024
1 parent 39f936e commit 6baf519
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/storage/db/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ impl DatabaseEnvMetrics {
value_size: Option<usize>,
f: impl FnOnce() -> R,
) -> R {
self.operations
.get(&(table, operation))
.expect("operation & table metric handle not found")
.record(value_size, f)
if let Some(metrics) = self.operations.get(&(table, operation)) {
metrics.record(value_size, f)
} else {
f()
}
}

/// Record metrics for opening a database transaction.
Expand Down

0 comments on commit 6baf519

Please sign in to comment.