Unverified Commit 8d6c8826 authored by sandreim's avatar sandreim Committed by GitHub
Browse files

Fix Provisioner dispute metrics naming (#4374)



* update dispute metric names
Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>

* update
Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
parent e90ee611
Pipeline #168144 passed with stages
in 44 minutes and 3 seconds
...@@ -23,11 +23,11 @@ struct MetricsInner { ...@@ -23,11 +23,11 @@ struct MetricsInner {
request_inherent_data: prometheus::Histogram, request_inherent_data: prometheus::Histogram,
provisionable_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 /// 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. /// 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<prometheus::U64>, inherent_data_dispute_statement_sets: prometheus::Counter<prometheus::U64>,
dispute_statements_requested: prometheus::CounterVec<prometheus::U64>, inherent_data_dispute_statements: prometheus::CounterVec<prometheus::U64>,
} }
/// Provisioner metrics. /// Provisioner metrics.
...@@ -61,7 +61,7 @@ impl Metrics { ...@@ -61,7 +61,7 @@ impl Metrics {
pub(crate) fn inc_valid_statements_by(&self, votes: usize) { pub(crate) fn inc_valid_statements_by(&self, votes: usize) {
if let Some(metrics) = &self.0 { if let Some(metrics) = &self.0 {
metrics metrics
.dispute_statements_requested .inherent_data_dispute_statements
.with_label_values(&["valid"]) .with_label_values(&["valid"])
.inc_by(votes.try_into().unwrap_or(0)); .inc_by(votes.try_into().unwrap_or(0));
} }
...@@ -70,7 +70,7 @@ impl Metrics { ...@@ -70,7 +70,7 @@ impl Metrics {
pub(crate) fn inc_invalid_statements_by(&self, votes: usize) { pub(crate) fn inc_invalid_statements_by(&self, votes: usize) {
if let Some(metrics) = &self.0 { if let Some(metrics) = &self.0 {
metrics metrics
.dispute_statements_requested .inherent_data_dispute_statements
.with_label_values(&["invalid"]) .with_label_values(&["invalid"])
.inc_by(votes.try_into().unwrap_or(0)); .inc_by(votes.try_into().unwrap_or(0));
} }
...@@ -79,7 +79,7 @@ impl Metrics { ...@@ -79,7 +79,7 @@ impl Metrics {
pub(crate) fn inc_dispute_statement_sets_by(&self, disputes: usize) { pub(crate) fn inc_dispute_statement_sets_by(&self, disputes: usize) {
if let Some(metrics) = &self.0 { if let Some(metrics) = &self.0 {
metrics metrics
.dispute_statement_sets_requested .inherent_data_dispute_statement_sets
.inc_by(disputes.try_into().unwrap_or(0)); .inc_by(disputes.try_into().unwrap_or(0));
} }
} }
...@@ -112,20 +112,20 @@ impl metrics::Metrics for Metrics { ...@@ -112,20 +112,20 @@ impl metrics::Metrics for Metrics {
))?, ))?,
registry, registry,
)?, )?,
dispute_statements_requested: prometheus::register( inherent_data_dispute_statements: prometheus::register(
prometheus::CounterVec::new( prometheus::CounterVec::new(
prometheus::Opts::new( prometheus::Opts::new(
"parachain_inherent_dispute_statements_requested", "parachain_inherent_data_dispute_statements",
"Number of inherent dispute statements requested.", "Number of dispute statements passed to `create_inherent()`.",
), ),
&["validity"], &["validity"],
)?, )?,
&registry, &registry,
)?, )?,
dispute_statement_sets_requested: prometheus::register( inherent_data_dispute_statement_sets: prometheus::register(
prometheus::Counter::new( prometheus::Counter::new(
"parachain_inherent_dispute_statement_sets_requested", "parachain_inherent_data_dispute_statement_sets",
"Number of inherent DisputeStatementSets requested.", "Number of dispute statements sets passed to `create_inherent()`.",
)?, )?,
registry, registry,
)?, )?,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment