Skip to content

Commit 76432f7

Browse files
Add queued try commit count metric
We're currently tracking all commits in one metric, which reduces our ability to tell what long queue lengths are caused by. Current presumed cause is try builds, which are run in parallel on the submission side (try builds don't have a bors queue), which makes them schedule simultaneously for us, increasing queue length quickly. But this is not really easy to confirm. We would also like to track a histogram (percentiles) of the latency before getting results, but that will take more work.
1 parent fe397b5 commit 76432f7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

site/src/server.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,18 @@ impl Server {
14671467
let mut buffer = Vec::new();
14681468
let r = prometheus::Registry::new();
14691469

1470+
let missing_commits = data.missing_commits().await;
14701471
let queue_length =
14711472
prometheus::IntGauge::new("rustc_perf_queue_length", "queue length").unwrap();
1472-
queue_length.set(data.missing_commits().await.len() as i64);
1473+
queue_length.set(missing_commits.len() as i64);
14731474
r.register(Box::new(queue_length)).unwrap();
14741475

1476+
let queue_try_commits =
1477+
prometheus::IntGauge::new("rustc_perf_queue_try_commits", "queued try commits")
1478+
.unwrap();
1479+
queue_try_commits.set(missing_commits.iter().filter(|(c, _)| c.is_try()).count() as i64);
1480+
r.register(Box::new(queue_try_commits)).unwrap();
1481+
14751482
if let Some(last_commit) = idx.commits().last().cloned() {
14761483
let conn = data.conn().await;
14771484
let steps = conn.in_progress_steps(&ArtifactId::from(last_commit)).await;

0 commit comments

Comments
 (0)