From 3810213c7ca7a24250ef727d33c6b43a01fd8e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sat, 2 Apr 2022 11:54:53 +0200 Subject: [PATCH] Do not post summary table to PR if both categories are not significant --- site/src/github.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/site/src/github.rs b/site/src/github.rs index bab6e5f6e..9cc0346cf 100644 --- a/site/src/github.rs +++ b/site/src/github.rs @@ -713,11 +713,13 @@ async fn categorize_benchmark( ); write!(result, "\n\n").unwrap(); - let (primary, secondary) = ( - primary.unwrap_or_else(|| ComparisonSummary::empty()), - secondary.unwrap_or_else(|| ComparisonSummary::empty()), - ); - write_summary_table(&primary, &secondary, &mut result); + if primary_direction.is_some() || secondary_direction.is_some() { + let (primary, secondary) = ( + primary.unwrap_or_else(|| ComparisonSummary::empty()), + secondary.unwrap_or_else(|| ComparisonSummary::empty()), + ); + write_summary_table(&primary, &secondary, &mut result); + } write!(result, "\n{}", DISAGREEMENT).unwrap();