Skip to content

Commit

Permalink
Remove tower_save-ms metric counter (#2581)
Browse files Browse the repository at this point in the history
The metric tracked the amount of time taken to store the tower to disk.
Moreso, it updated the counter everytime VotingService receives a
VoteOp::PushVote message. This is excessive for this metric. Moreso, the
process exits if the operation fails, so this metric isn't useful for a
heartbeat either.

Replace the metric with a trace log statement
  • Loading branch information
steviez authored Aug 13, 2024
1 parent 955cf6c commit 272cddb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/voting_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ impl VotingService {
vote_op: VoteOp,
) {
if let VoteOp::PushVote { saved_tower, .. } = &vote_op {
let mut measure = Measure::start("tower_save-ms");
let mut measure = Measure::start("tower storage save");
if let Err(err) = tower_storage.store(saved_tower) {
error!("Unable to save tower to storage: {:?}", err);
std::process::exit(1);
}
measure.stop();
inc_new_counter_info!("tower_save-ms", measure.as_ms() as usize);
trace!("{measure}");
}

let _ = cluster_info.send_transaction(
Expand Down

0 comments on commit 272cddb

Please sign in to comment.