Skip to content

Commit e1477c9

Browse files
chore[ci]: make perf script less wordy (#4517)
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent bc8e3fb commit e1477c9

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

scripts/compare-benchmark-jsons.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,14 @@ def calculate_geo_mean(df):
123123
# Build summary
124124
def format_performance(ratio, target_name):
125125
if pd.isna(ratio):
126-
return f"no valid {target_name.lower()} comparisons available"
126+
return f"no {target_name.lower()} data"
127127
else:
128-
return f"{ratio:.3f}x ({'better' if ratio < 1 else 'worse'} than base)"
128+
emoji = "✅" if ratio < 1 else "❌"
129+
return f"{ratio:.3f}x {emoji}"
129130

130131

131132
overall_performance = (
132-
"no valid comparisons available"
133-
if pd.isna(geo_mean_ratio)
134-
else f"{geo_mean_ratio:.3f}x ({'better' if geo_mean_ratio < 1 else 'worse'} than base)"
133+
"no data" if pd.isna(geo_mean_ratio) else f"{geo_mean_ratio:.3f}x {'✅' if geo_mean_ratio < 1 else '❌'}"
135134
)
136135
vortex_performance = format_performance(vortex_geo_mean_ratio, "vortex")
137136
duckdb_vortex_performance = format_performance(duckdb_vortex_geo_mean_ratio, "duckdb:vortex")
@@ -140,34 +139,32 @@ def format_performance(ratio, target_name):
140139
summary_lines = [
141140
"## Summary",
142141
"",
143-
f"- **overall performance (all targets)**: {overall_performance}",
142+
f"- **overall**: {overall_performance}",
144143
]
145144

146145
# Only add vortex-specific sections if we have vortex data
147146
if len(vortex_df) > 0:
148147
summary_lines.extend(
149148
[
150-
f"- **vortex performance**: {vortex_performance}",
149+
f"- **vortex**: {vortex_performance}",
151150
]
152151
)
153152

154153
# Only add duckdb:vortex section if we have that data
155154
if len(duckdb_vortex_df) > 0:
156-
summary_lines.append(f"- **duckdb:vortex performance**: {duckdb_vortex_performance}")
155+
summary_lines.append(f"- **duckdb:vortex**: {duckdb_vortex_performance}")
157156

158157
# Only add datafusion:vortex section if we have that data
159158
if len(datafusion_vortex_df) > 0:
160-
summary_lines.append(f"- **datafusion:vortex performance**: {datafusion_vortex_performance}")
159+
summary_lines.append(f"- **datafusion:vortex**: {datafusion_vortex_performance}")
161160

162161
# Only add best/worst if we have vortex data
163162
if len(vortex_df) > 0:
164163
summary_lines.extend(
165164
[
166-
f"- **best vortex improvement**: {best_improvement}",
167-
f"- **worst vortex regression**: {worst_regression}",
168-
f"- **significant vortex changes (>{threshold_pct}%)**:",
169-
f" - improvements: {significant_improvements} queries",
170-
f" - regressions: {significant_regressions} queries",
165+
f"- **best**: {best_improvement}",
166+
f"- **worst**: {worst_regression}",
167+
f"- **significant (>{threshold_pct}%)**: {significant_improvements}{significant_regressions}↓",
171168
]
172169
)
173170

0 commit comments

Comments
 (0)