From 486e8363ade1e90b98b1b52b427ae9ecef997a5d Mon Sep 17 00:00:00 2001 From: Martin Beckmann Date: Wed, 13 Dec 2023 16:04:08 +0100 Subject: [PATCH] Adjust /solve time buckets (#2163) # Description We already have a grafana dashboard to track the time every driver spends in `/solve` but the default prometheus histogram buckets are not really suitable to get useful information out of this metric. # Changes Adjust the metric to have 1 bucket for every second in the deadline. --- crates/autopilot/src/run_loop.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/autopilot/src/run_loop.rs b/crates/autopilot/src/run_loop.rs index f339ba36ba..55cb8dc0be 100644 --- a/crates/autopilot/src/run_loop.rs +++ b/crates/autopilot/src/run_loop.rs @@ -647,7 +647,12 @@ struct Metrics { auction: prometheus::IntGauge, /// Tracks the duration of successful driver `/solve` requests. - #[metric(labels("driver", "result"))] + #[metric( + labels("driver", "result"), + buckets( + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 + ) + )] solve: prometheus::HistogramVec, /// Tracks driver solutions.