Skip to content

Commit f476405

Browse files
committed
Only show errors in GitHub message and show also secondary benchmarks
1 parent 0ecc549 commit f476405

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

site/src/comparison.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ impl ComparisonSummary {
320320
self.comparisons.is_empty()
321321
}
322322

323+
pub fn errors_in(&self) -> &[String] {
324+
&self.errors_in
325+
}
326+
323327
fn arithmetic_mean<'a>(
324328
&'a self,
325329
changes: impl Iterator<Item = &'a TestResultComparison>,
@@ -500,20 +504,6 @@ pub fn write_summary_table(
500504
)
501505
.unwrap();
502506

503-
if !primary.errors_in.is_empty() {
504-
write!(
505-
result,
506-
"\nThe following benchmark(s) failed to build:\n{}\n",
507-
primary
508-
.errors_in
509-
.iter()
510-
.map(|benchmark| format!("- {benchmark}"))
511-
.collect::<Vec<_>>()
512-
.join("\n")
513-
)
514-
.unwrap();
515-
}
516-
517507
if with_footnotes {
518508
writeln!(
519509
result,

site/src/github.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,24 @@ async fn categorize_benchmark(
701701
secondary.unwrap_or_else(|| ComparisonSummary::empty()),
702702
);
703703
write_summary_table(&primary, &secondary, true, &mut result);
704+
705+
if !primary.errors_in().is_empty() || !secondary.errors_in().is_empty() {
706+
let list_errored_benchmarks = |summary: ComparisonSummary| {
707+
summary
708+
.errors_in()
709+
.iter()
710+
.map(|benchmark| format!("- {benchmark}"))
711+
.collect::<Vec<_>>()
712+
.join("\n")
713+
};
714+
write!(
715+
result,
716+
"\nThe following benchmark(s) failed to build:\n{}{}\n",
717+
list_errored_benchmarks(primary),
718+
list_errored_benchmarks(secondary)
719+
)
720+
.unwrap();
721+
}
704722
}
705723

706724
write!(result, "\n{}", DISAGREEMENT).unwrap();

0 commit comments

Comments
 (0)