mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
Availability: provisioner bitfield metrics (#5484)
* Add histogram for inherent data bitfields Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * -500ms bitfield sign job delay, +500ms bitfield gossip Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Revert "-500ms bitfield sign job delay, +500ms bitfield gossip" This reverts commit 3d3f2c0fae651653ffdca50c1ad38c5757166edc. * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Update node/core/provisioner/src/metrics.rs Co-authored-by: Bernhard Schuster <bernhard@ahoi.io> Co-authored-by: Andronik <write@reusable.software> Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
This commit is contained in:
@@ -227,6 +227,7 @@ where
|
||||
leaf_hash = ?self.leaf.hash,
|
||||
"inherent data sent successfully"
|
||||
);
|
||||
self.metrics.observe_inherent_data_bitfields_count(self.signed_bitfields.len());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ struct MetricsInner {
|
||||
inherent_data_requests: prometheus::CounterVec<prometheus::U64>,
|
||||
request_inherent_data: prometheus::Histogram,
|
||||
provisionable_data: prometheus::Histogram,
|
||||
inherent_data_response_bitfields: prometheus::Histogram,
|
||||
|
||||
/// 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
|
||||
@@ -63,6 +64,12 @@ impl Metrics {
|
||||
self.0.as_ref().map(|metrics| metrics.provisionable_data.start_timer())
|
||||
}
|
||||
|
||||
pub(crate) fn observe_inherent_data_bitfields_count(&self, bitfields_count: usize) {
|
||||
self.0.as_ref().map(|metrics| {
|
||||
metrics.inherent_data_response_bitfields.observe(bitfields_count as f64)
|
||||
});
|
||||
}
|
||||
|
||||
pub(crate) fn inc_valid_statements_by(&self, votes: usize) {
|
||||
if let Some(metrics) = &self.0 {
|
||||
metrics
|
||||
@@ -134,6 +141,15 @@ impl metrics::Metrics for Metrics {
|
||||
)?,
|
||||
registry,
|
||||
)?,
|
||||
inherent_data_response_bitfields: prometheus::register(
|
||||
prometheus::Histogram::with_opts(
|
||||
prometheus::HistogramOpts::new(
|
||||
"polkadot_parachain_provisioner_inherent_data_response_bitfields_sent",
|
||||
"Number of inherent bitfields sent in response to `ProvisionerMessage::RequestInherentData`.",
|
||||
).buckets(vec![0.0, 10.0, 25.0, 50.0, 75.0, 100.0, 150.0, 200.0, 250.0, 300.0]),
|
||||
)?,
|
||||
registry,
|
||||
)?,
|
||||
};
|
||||
Ok(Metrics(Some(metrics)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user