Skip to content

Commit a095dae

Browse files
committed
file sizes comments
- Run clickbench vortex-compact benchmarks on PR - Fix up comment to be collapsible Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 7a144d3 commit a095dae

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/bench-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
"id": "clickbench-nvme",
142142
"subcommand": "clickbench",
143143
"name": "Clickbench on NVME",
144-
"targets": "datafusion:parquet,datafusion:vortex,duckdb:parquet,duckdb:vortex,duckdb:duckdb"
144+
"targets": "datafusion:parquet,datafusion:vortex,datafusion:vortex-compact,duckdb:parquet,duckdb:vortex,duckdb:vortex-compact,duckdb:duckdb"
145145
},
146146
{
147147
"id": "tpch-nvme",

scripts/compare-file-sizes.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,25 @@ def main():
114114
# Sort by pct_change descending (largest increases first)
115115
comparisons.sort(key=lambda x: x["pct_change"], reverse=True)
116116

117+
# Build summary line for collapsible header
118+
total_base = sum(format_totals[fmt]["base"] for fmt in format_totals)
119+
total_head = sum(format_totals[fmt]["head"] for fmt in format_totals)
120+
if total_base > 0:
121+
overall_pct = (total_head / total_base - 1) * 100
122+
overall_pct_str = format_pct_change(overall_pct)
123+
else:
124+
overall_pct_str = "new"
125+
126+
increases = sum(1 for c in comparisons if c["change"] > 0)
127+
decreases = sum(1 for c in comparisons if c["change"] < 0)
128+
129+
# Output collapsible markdown
130+
print("<details>")
131+
print(f"<summary>File Size Changes ({len(comparisons)} files changed, {overall_pct_str} overall, {increases}{decreases}↓)</summary>")
132+
print("")
133+
print("<br>")
134+
print("")
135+
117136
# Output markdown table
118137
print("| File | Scale | Format | Base | HEAD | Change | % |")
119138
print("|------|-------|--------|------|------|--------|---|")
@@ -140,6 +159,9 @@ def main():
140159
pct_str = ""
141160
print(f"- {fmt}: {format_size(base_total)} \u2192 {format_size(head_total)}{pct_str}")
142161

162+
print("")
163+
print("</details>")
164+
143165

144166
if __name__ == "__main__":
145167
main()

0 commit comments

Comments
 (0)