From 7341dbb20d3ccd3fc5e23bb5aa2eb7742b65624e Mon Sep 17 00:00:00 2001
From: "Mattia L.V. Bradascio" <28816406+bredamatt@users.noreply.github.com>
Date: Fri, 2 Dec 2022 16:28:24 +0000
Subject: [PATCH] Add buckets on lower end of distribution to network bridge
 latency metrics (#6359)

* Add two more buckets on lower end of distribution

* add even smaller buckets

* cargo fmt
---
 polkadot/node/network/statement-distribution/src/metrics.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/polkadot/node/network/statement-distribution/src/metrics.rs b/polkadot/node/network/statement-distribution/src/metrics.rs
index 6bc6f724ae0..6acbf63eadc 100644
--- a/polkadot/node/network/statement-distribution/src/metrics.rs
+++ b/polkadot/node/network/statement-distribution/src/metrics.rs
@@ -17,8 +17,10 @@
 use polkadot_node_subsystem_util::metrics::{self, prometheus};
 
 /// Buckets more suitable for checking the typical latency values
-const HISTOGRAM_LATENCY_BUCKETS: &[f64] =
-	&[0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.75, 0.9, 1.0, 1.2, 1.5, 1.75];
+const HISTOGRAM_LATENCY_BUCKETS: &[f64] = &[
+	0.000025, 0.00005, 0.000075, 0.0001, 0.0003125, 0.000625, 0.00125, 0.0025, 0.005, 0.01, 0.025,
+	0.05, 0.1,
+];
 
 #[derive(Clone)]
 struct MetricsInner {
-- 
GitLab