From 50828ad1453253e3ba015d53c21c4ffec130b1ba Mon Sep 17 00:00:00 2001
From: sandreim <54316454+sandreim@users.noreply.github.com>
Date: Mon, 31 Jan 2022 19:28:58 +0200
Subject: [PATCH] Update pvf metric histogram buckets (#4818)

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
---
 polkadot/node/core/pvf/src/metrics.rs | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/polkadot/node/core/pvf/src/metrics.rs b/polkadot/node/core/pvf/src/metrics.rs
index 53719ce7b18..615dd084d2a 100644
--- a/polkadot/node/core/pvf/src/metrics.rs
+++ b/polkadot/node/core/pvf/src/metrics.rs
@@ -160,11 +160,11 @@ impl metrics::Metrics for Metrics {
 						0.1,
 						0.5,
 						1.0,
+						2.0,
+						3.0,
 						10.0,
 						20.0,
 						30.0,
-						40.0,
-						50.0,
 						60.0,
 					]),
 				)?,
@@ -175,7 +175,19 @@ impl metrics::Metrics for Metrics {
 					prometheus::HistogramOpts::new(
 						"polkadot_pvf_execution_time",
 						"Time spent in executing PVFs",
-					)
+					).buckets(vec![
+						// This is synchronized with `APPROVAL_EXECUTION_TIMEOUT`  and
+						// `BACKING_EXECUTION_TIMEOUT` constants in `node/primitives/src/lib.rs`
+						0.1,
+						0.25,
+						0.5,
+						1.0,
+						2.0,
+						3.0,
+						4.0,
+						5.0,
+						6.0,
+					]),
 				)?,
 				registry,
 			)?,
-- 
GitLab