aboutsummaryrefslogtreecommitdiff
path: root/src/model/block_metrics.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-02-24 14:59:49 +0100
committerAlex Auvolat <alex@adnab.me>2022-03-14 10:54:25 +0100
commit2377a92f6b64165be84f53722f30c21e9c8a0b3e (patch)
tree4a45feb7bd73bd541cc5f8552423cb9d46c8e26d /src/model/block_metrics.rs
parent203e8d2c345dabee56e31aebf88b706df5aa72e5 (diff)
downloadgarage-2377a92f6b64165be84f53722f30c21e9c8a0b3e.tar.gz
garage-2377a92f6b64165be84f53722f30c21e9c8a0b3e.zip
Add wrapper over sled tree to count items (used for big queues)
Diffstat (limited to 'src/model/block_metrics.rs')
-rw-r--r--src/model/block_metrics.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/model/block_metrics.rs b/src/model/block_metrics.rs
index 7ef9a117..819af241 100644
--- a/src/model/block_metrics.rs
+++ b/src/model/block_metrics.rs
@@ -1,5 +1,7 @@
use opentelemetry::{global, metrics::*};
+use garage_util::sled_counter::SledCountedTree;
+
/// TableMetrics reference all counter used for metrics
pub struct BlockManagerMetrics {
pub(crate) _resync_queue_len: ValueObserver<u64>,
@@ -20,7 +22,7 @@ pub struct BlockManagerMetrics {
}
impl BlockManagerMetrics {
- pub fn new(resync_queue: sled::Tree) -> Self {
+ pub fn new(resync_queue: SledCountedTree) -> Self {
let meter = global::meter("garage_model/block");
Self {
_resync_queue_len: meter