diff --git a/polkadot/node/core/provisioner/src/metrics.rs b/polkadot/node/core/provisioner/src/metrics.rs index 829293dfed536aa3d49b596d5c4e7dd12ee98f15..508c668f6e240a7ba1f1e4b702af6dd458ecd783 100644 --- a/polkadot/node/core/provisioner/src/metrics.rs +++ b/polkadot/node/core/provisioner/src/metrics.rs @@ -18,9 +18,13 @@ use polkadot_node_subsystem_util::metrics::{self, prometheus}; #[derive(Clone)] struct MetricsInner { + /// Tracks successful/unsuccessful inherent data requests inherent_data_requests: prometheus::CounterVec<prometheus::U64>, - request_inherent_data: prometheus::Histogram, - provisionable_data: prometheus::Histogram, + /// How much time the `RequestInherentData` processing takes + request_inherent_data_duration: prometheus::Histogram, + /// How much time `ProvisionableData` processing takes + provisionable_data_duration: prometheus::Histogram, + /// Bitfields array length in `ProvisionerInherentData` (the result for `RequestInherentData`) inherent_data_response_bitfields: prometheus::Histogram, /// The following metrics track how many disputes/votes the runtime will have to process. These will count @@ -54,14 +58,16 @@ impl Metrics { pub(crate) fn time_request_inherent_data( &self, ) -> Option<metrics::prometheus::prometheus::HistogramTimer> { - self.0.as_ref().map(|metrics| metrics.request_inherent_data.start_timer()) + self.0 + .as_ref() + .map(|metrics| metrics.request_inherent_data_duration.start_timer()) } /// Provide a timer for `provisionable_data` which observes on drop. pub(crate) fn time_provisionable_data( &self, ) -> Option<metrics::prometheus::prometheus::HistogramTimer> { - self.0.as_ref().map(|metrics| metrics.provisionable_data.start_timer()) + self.0.as_ref().map(|metrics| metrics.provisionable_data_duration.start_timer()) } pub(crate) fn observe_inherent_data_bitfields_count(&self, bitfields_count: usize) { @@ -110,14 +116,14 @@ impl metrics::Metrics for Metrics { )?, registry, )?, - request_inherent_data: prometheus::register( + request_inherent_data_duration: prometheus::register( prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( "polkadot_parachain_provisioner_request_inherent_data_time", "Time spent within `provisioner::request_inherent_data`", ))?, registry, )?, - provisionable_data: prometheus::register( + provisionable_data_duration: prometheus::register( prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( "polkadot_parachain_provisioner_provisionable_data_time", "Time spent within `provisioner::provisionable_data`",