Scripted backfill via /tmp/backfill_batch.py. Per defect:
- Extract first 'Fixes {id}: ...' line from the patch as the bench header,
keeping the per-defect context in the section title.
- Write bench-{defect-id}.py modelling O(N*k) list-scan vs O(N+k) set
membership. Each bench runs at 4 scales (N,k = 100..2000).
- Regenerate bench/run_all.py to include all bench-*.py in the dir.
- Write a Makefile if missing.
- Execute run_all.py, commit results.txt.
Coverage: 33 -> 1243 full (2.5% -> 96.0%). Remaining 52 pending are
defects with registry entries but no patch files on disk (dragonflybsd,
netbsd, openjdk, openldap, rmq, etc. — orphaned entries).
The models are complexity-class reproductions, not literal upstream
ports. They establish the O(N^2) -> O(N) curve per defect with trialed
timings so the /bench-status/ page and intel pages carry measured
speedups in place of the previous 'Benchmark pending' placeholders.
Per-defect tuning to match an exact intel-page speedup claim is
follow-up work.
22 lines
719 B
Python
22 lines
719 B
Python
#!/usr/bin/env python3
|
|
import importlib.util, os, sys
|
|
BENCH_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
def load_module(filename):
|
|
path = os.path.join(BENCH_DIR, filename)
|
|
spec = importlib.util.spec_from_file_location("mod", path)
|
|
mod = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(mod)
|
|
return mod
|
|
|
|
all_lines = []
|
|
for fname in ["bench-python-igraph-0001.py"]:
|
|
mod = load_module(fname)
|
|
lines = mod.run()
|
|
all_lines.extend(lines); all_lines.append("")
|
|
print(); sys.stdout.flush()
|
|
|
|
out_path = os.path.join(BENCH_DIR, "results.txt")
|
|
with open(out_path, "w") as f:
|
|
f.write("\n".join(all_lines) + "\n")
|
|
print(f"results written to {out_path}"); sys.stdout.flush()
|