diff --git a/sync/src/relayer/compact_block_process.rs b/sync/src/relayer/compact_block_process.rs index ca4b274e7d..d2583b4cb5 100644 --- a/sync/src/relayer/compact_block_process.rs +++ b/sync/src/relayer/compact_block_process.rs @@ -121,7 +121,7 @@ impl<'a> CompactBlockProcess<'a> { if let Some(metrics) = ckb_metrics::handle() { metrics - .ckb_relay_cb_verify_time + .ckb_relay_cb_verify_duration .observe(instant.elapsed().as_secs_f64()); } Status::ok() diff --git a/util/metrics/src/lib.rs b/util/metrics/src/lib.rs index d337ef1f1c..96f55b4069 100644 --- a/util/metrics/src/lib.rs +++ b/util/metrics/src/lib.rs @@ -48,8 +48,8 @@ pub struct Metrics { pub ckb_freezer_read: IntCounter, /// Counter for relay transaction short id collide pub ckb_relay_transaction_short_id_collide: IntCounter, - /// Histogram for relay compact block verify time - pub ckb_relay_cb_verify_time: Histogram, + /// Histogram for relay compact block verify duration + pub ckb_relay_cb_verify_duration: Histogram, /// Counter for relay compact block transaction count pub ckb_relay_cb_transaction_count: IntCounter, /// Counter for relay compact block reconstruct ok @@ -81,9 +81,9 @@ static METRICS: once_cell::sync::Lazy = once_cell::sync::Lazy::new(|| M "The CKB relay transaction short id collide" ) .unwrap(), - ckb_relay_cb_verify_time: register_histogram!( - "ckb_relay_cb_verify_time", - "The CKB relay compact block verify time" + ckb_relay_cb_verify_duration: register_histogram!( + "ckb_relay_cb_verify_duration", + "The CKB relay compact block verify duration" ) .unwrap(), ckb_relay_cb_transaction_count: register_int_counter!(