From cf9246c997e20d27c0b3291f399a6c287b34b262 Mon Sep 17 00:00:00 2001 From: iGxnon Date: Wed, 13 Mar 2024 18:40:46 +0800 Subject: [PATCH] chore: rename sp_total to sp_cnt Signed-off-by: iGxnon --- crates/curp/src/server/metrics.rs | 8 ++++---- doc/metrics.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/curp/src/server/metrics.rs b/crates/curp/src/server/metrics.rs index 843b8f942..37803d599 100644 --- a/crates/curp/src/server/metrics.rs +++ b/crates/curp/src/server/metrics.rs @@ -66,7 +66,7 @@ impl Metrics { is_leader, is_learner, server_id, - sp_total, + sp_cnt, online_clients, ) = ( meter @@ -86,7 +86,7 @@ impl Metrics { .with_description("Server or member ID in hexadecimal format. 1 for 'server_id' label with current ID.") .init(), meter - .u64_observable_gauge("sp_total") + .u64_observable_gauge("sp_cnt") .with_description("The speculative pool size of this server") .init(), meter @@ -101,7 +101,7 @@ impl Metrics { is_leader.as_any(), is_learner.as_any(), server_id.as_any(), - sp_total.as_any(), + sp_cnt.as_any(), online_clients.as_any(), ], move |observer| { @@ -115,7 +115,7 @@ impl Metrics { observer.observe_u64(&server_id, id, &[]); let sp_size = curp.spec_pool().lock().pool.len(); - observer.observe_u64(&sp_total, sp_size.numeric_cast(), &[]); + observer.observe_u64(&sp_cnt, sp_size.numeric_cast(), &[]); let client_ids = curp.lease_manager().read().expiry_queue.len(); observer.observe_u64(&online_clients, client_ids.numeric_cast(), &[]); diff --git a/doc/metrics.md b/doc/metrics.md index 933ceb4a9..36ec38f26 100644 --- a/doc/metrics.md +++ b/doc/metrics.md @@ -49,7 +49,7 @@ Whether or not this member is a learner. 1 if is, 0 otherwise. 15. `server_id`: ObservableGauge Server or member ID in hexadecimal format. 1 for 'server_id' label with the current ID. -16. `sp_total`: ObservableGauge +16. `sp_cnt`: ObservableGauge The speculative pool size of this server. 17. `online_clients`: ObservableGauge