From b5dfbcea9d7a040a43952b30b1cf32978f8a251c Mon Sep 17 00:00:00 2001 From: Sital Kedia Date: Sun, 1 Oct 2023 08:11:19 -0700 Subject: [PATCH] lint --- storage/schemadb/src/lib.rs | 9 ++++++--- storage/schemadb/src/metrics.rs | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/storage/schemadb/src/lib.rs b/storage/schemadb/src/lib.rs index fb4d3510ab8bf..07c659299139f 100644 --- a/storage/schemadb/src/lib.rs +++ b/storage/schemadb/src/lib.rs @@ -22,8 +22,9 @@ pub mod iterator; use crate::{ metrics::{ APTOS_SCHEMADB_BATCH_COMMIT_BYTES, APTOS_SCHEMADB_BATCH_COMMIT_LATENCY_SECONDS, - APTOS_SCHEMADB_DELETES_SAMPLED, APTOS_SCHEMADB_GET_BYTES, APTOS_SCHEMADB_GET_LATENCY_SECONDS, - APTOS_SCHEMADB_ITER_BYTES, APTOS_SCHEMADB_ITER_LATENCY_SECONDS, APTOS_SCHEMADB_PUT_BYTES_SAMPLED, + APTOS_SCHEMADB_DELETES_SAMPLED, APTOS_SCHEMADB_GET_BYTES, + APTOS_SCHEMADB_GET_LATENCY_SECONDS, APTOS_SCHEMADB_ITER_BYTES, + APTOS_SCHEMADB_ITER_LATENCY_SECONDS, APTOS_SCHEMADB_PUT_BYTES_SAMPLED, APTOS_SCHEMADB_SEEK_LATENCY_SECONDS, }, schema::{KeyCodec, Schema, SeekKeyCodec, ValueCodec}, @@ -262,7 +263,9 @@ impl DB { .observe((key.len() + value.len()) as f64); }, WriteOp::Deletion { key: _ } => { - APTOS_SCHEMADB_DELETES_SAMPLED.with_label_values(&[cf_name]).inc(); + APTOS_SCHEMADB_DELETES_SAMPLED + .with_label_values(&[cf_name]) + .inc(); }, } } diff --git a/storage/schemadb/src/metrics.rs b/storage/schemadb/src/metrics.rs index cc2a1527b1640..4627a5b92995c 100644 --- a/storage/schemadb/src/metrics.rs +++ b/storage/schemadb/src/metrics.rs @@ -109,8 +109,10 @@ pub static APTOS_SCHEMADB_PUT_BYTES_SAMPLED: Lazy = Lazy::new(|| { }); pub static APTOS_SCHEMADB_DELETES_SAMPLED: Lazy = Lazy::new(|| { - register_int_counter_vec!("aptos_storage_deletes_sampled", "Aptos storage delete calls (sampled)", &[ - "cf_name" - ]) + register_int_counter_vec!( + "aptos_storage_deletes_sampled", + "Aptos storage delete calls (sampled)", + &["cf_name"] + ) .unwrap() });