From ff24a436b3840edde847fb5d8d06b92d4093ed71 Mon Sep 17 00:00:00 2001 From: Ron Kuris Date: Fri, 11 Oct 2024 09:06:29 -1000 Subject: [PATCH] Remove histograms (#736) --- firewood/src/merkle.rs | 5 +---- storage/src/nodestore.rs | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/firewood/src/merkle.rs b/firewood/src/merkle.rs index e42f2594f..32e601161 100644 --- a/firewood/src/merkle.rs +++ b/firewood/src/merkle.rs @@ -6,7 +6,7 @@ use crate::range_proof::RangeProof; use crate::stream::{MerkleKeyValueStream, PathIterator}; use crate::v2::api; use futures::{StreamExt, TryStreamExt}; -use metrics::{counter, histogram}; +use metrics::counter; use smallvec::SmallVec; use std::collections::HashSet; use std::fmt::Debug; @@ -416,9 +416,6 @@ impl Merkle> { /// Map `key` to `value` in the trie. /// Each element of key is 2 nibbles. pub fn insert(&mut self, key: &[u8], value: Box<[u8]>) -> Result<(), MerkleError> { - histogram!("firewood.insert.key.length").record(key.len() as f64); - histogram!("firewood.insert.data.length").record(value.len() as f64); - let key = Path::from_nibbles_iterator(NibblesIterator::new(key)); let root = self.nodestore.mut_root(); diff --git a/storage/src/nodestore.rs b/storage/src/nodestore.rs index 32cff965c..7af9ed2ec 100644 --- a/storage/src/nodestore.rs +++ b/storage/src/nodestore.rs @@ -6,7 +6,7 @@ use arc_swap::access::DynAccess; use arc_swap::ArcSwap; use bincode::{DefaultOptions, Options as _}; use bytemuck_derive::{AnyBitPattern, NoUninit}; -use metrics::{counter, histogram}; +use metrics::counter; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt::Debug; @@ -492,7 +492,6 @@ impl NodeStore, S> { /// Also returns the index of the free list the node was allocated from. pub fn allocate_node(&mut self, node: &Node) -> Result<(LinearAddress, AreaIndex), Error> { let stored_area_size = Self::stored_len(node); - histogram!("firewood.node_size").record(stored_area_size as f64); // Attempt to allocate from a free list. // If we can't allocate from a free list, allocate past the existing