Skip to content

Commit

Permalink
Adjust /solve time buckets (#2163)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
MartinquaXD authored Dec 13, 2023
1 parent 7a1a14d commit 486e836
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/autopilot/src/run_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 486e836

Please sign in to comment.