From e4e22f405dee3f7e89fa68caf401382656290370 Mon Sep 17 00:00:00 2001 From: sandreim <54316454+sandreim@users.noreply.github.com> Date: Fri, 26 Nov 2021 12:31:22 +0200 Subject: [PATCH] Fix Provisioner dispute metrics naming (#4374) * update dispute metric names Signed-off-by: Andrei Sandu * update Signed-off-by: Andrei Sandu --- polkadot/node/core/provisioner/src/metrics.rs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/polkadot/node/core/provisioner/src/metrics.rs b/polkadot/node/core/provisioner/src/metrics.rs index 33129bfb78..1ff839ce7d 100644 --- a/polkadot/node/core/provisioner/src/metrics.rs +++ b/polkadot/node/core/provisioner/src/metrics.rs @@ -23,11 +23,11 @@ struct MetricsInner { request_inherent_data: prometheus::Histogram, provisionable_data: prometheus::Histogram, - /// The `dispute_statement_*` metrics track how many disputes/votes the runtime will have to process. It will count + /// The following metrics track how many disputes/votes the runtime will have to process. These will count /// all recent statements meaning every dispute from last sessions: 10 min on Rococo, 60 min on Kusama and /// 4 hours on Polkadot. The metrics are updated only when the node authors a block, so values vary across nodes. - dispute_statement_sets_requested: prometheus::Counter, - dispute_statements_requested: prometheus::CounterVec, + inherent_data_dispute_statement_sets: prometheus::Counter, + inherent_data_dispute_statements: prometheus::CounterVec, } /// Provisioner metrics. @@ -61,7 +61,7 @@ impl Metrics { pub(crate) fn inc_valid_statements_by(&self, votes: usize) { if let Some(metrics) = &self.0 { metrics - .dispute_statements_requested + .inherent_data_dispute_statements .with_label_values(&["valid"]) .inc_by(votes.try_into().unwrap_or(0)); } @@ -70,7 +70,7 @@ impl Metrics { pub(crate) fn inc_invalid_statements_by(&self, votes: usize) { if let Some(metrics) = &self.0 { metrics - .dispute_statements_requested + .inherent_data_dispute_statements .with_label_values(&["invalid"]) .inc_by(votes.try_into().unwrap_or(0)); } @@ -79,7 +79,7 @@ impl Metrics { pub(crate) fn inc_dispute_statement_sets_by(&self, disputes: usize) { if let Some(metrics) = &self.0 { metrics - .dispute_statement_sets_requested + .inherent_data_dispute_statement_sets .inc_by(disputes.try_into().unwrap_or(0)); } } @@ -112,20 +112,20 @@ impl metrics::Metrics for Metrics { ))?, registry, )?, - dispute_statements_requested: prometheus::register( + inherent_data_dispute_statements: prometheus::register( prometheus::CounterVec::new( prometheus::Opts::new( - "parachain_inherent_dispute_statements_requested", - "Number of inherent dispute statements requested.", + "parachain_inherent_data_dispute_statements", + "Number of dispute statements passed to `create_inherent()`.", ), &["validity"], )?, ®istry, )?, - dispute_statement_sets_requested: prometheus::register( + inherent_data_dispute_statement_sets: prometheus::register( prometheus::Counter::new( - "parachain_inherent_dispute_statement_sets_requested", - "Number of inherent DisputeStatementSets requested.", + "parachain_inherent_data_dispute_statement_sets", + "Number of dispute statements sets passed to `create_inherent()`.", )?, registry, )?,