Skip to content

Commit

Permalink
chore: rename sp_total to sp_cnt
Browse files Browse the repository at this point in the history
Signed-off-by: iGxnon <[email protected]>
  • Loading branch information
iGxnon committed Mar 13, 2024
1 parent 8a6287f commit cf9246c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions crates/curp/src/server/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Metrics {
is_leader,
is_learner,
server_id,
sp_total,
sp_cnt,
online_clients,
) = (
meter
Expand All @@ -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
Expand All @@ -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| {
Expand All @@ -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(), &[]);
Expand Down
2 changes: 1 addition & 1 deletion doc/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf9246c

Please sign in to comment.