Skip to content

Commit a1da862

Browse files
Merge pull request #141 from FreshCode-Org/fix/public-exports-and-inf-outliers-jwd
Evidence-gated FreshData performance investigation
2 parents 9839146 + 2679f5a commit a1da862

38 files changed

Lines changed: 30802 additions & 4 deletions
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Large performance investigation
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 4 * * 0"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
performance-large:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 180
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install benchmark dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev,bench,ml]"
28+
29+
- name: Run large performance matrix
30+
id: benchmark
31+
continue-on-error: true
32+
run: >-
33+
python -m benchmarks.performance run
34+
--rows 100000,500000,1000000
35+
--widths narrow,medium,wide
36+
--configs default,conservative,representation_off,statistical_off,explicit
37+
--report-modes false,true
38+
--warmups 1
39+
--repetitions 5
40+
--timeout 1800
41+
--output benchmarks/results/performance/large
42+
43+
- name: Analyze all completed and failed cases
44+
id: analyze
45+
if: always()
46+
continue-on-error: true
47+
run: >-
48+
python -m benchmarks.performance analyze
49+
--input benchmarks/results/performance/large
50+
--output benchmarks/results/performance/large-summary.json
51+
52+
- name: Render compact report
53+
id: render
54+
if: always()
55+
continue-on-error: true
56+
run: >-
57+
python -m benchmarks.performance render
58+
--input benchmarks/results/performance/large-summary.json
59+
--output benchmarks/results/performance/large-report.md
60+
61+
- name: Upload performance evidence
62+
id: upload
63+
if: always()
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: performance-large-${{ github.run_id }}
67+
path: benchmarks/results/performance/
68+
if-no-files-found: error
69+
70+
- name: Preserve failure status after evidence upload
71+
if: >-
72+
always() &&
73+
(steps.benchmark.outcome != 'success' ||
74+
steps.analyze.outcome != 'success' ||
75+
steps.render.outcome != 'success' ||
76+
steps.upload.outcome != 'success')
77+
run: exit 1

‎.gitignore‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ src/freshdata/benchmarks/results/
2323
/tmp/freshdata_bench/
2424
/tmp/freshdata_spill/
2525

26-
# Benchmark Release harness: runtime results and generated fixture files
27-
benchmarks/results/
26+
# Benchmark runtime results: raw case files stay local; compact evidence is committed.
27+
benchmarks/results/*
28+
!benchmarks/results/performance/
29+
benchmarks/results/performance/*
30+
!benchmarks/results/performance/*-summary.json
31+
!benchmarks/results/performance/*-report.md
2832
benchmarks/generated_fixtures/
2933

3034
# Rust native backend build output

‎Makefile‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ PY ?= python
55
# training-* targets are matched by the pattern rule below (pattern rules
66
# cannot be .PHONY; the delegated targets are .PHONY inside training/Makefile).
77
.PHONY: help benchmark benchmark-ci benchmark-report benchmark-fixtures benchmark-test \
8-
cleanbench-full
8+
cleanbench-full performance-ci performance-baseline performance-profile \
9+
performance-report
910

1011
help:
1112
@echo "Targets:"
@@ -15,6 +16,10 @@ help:
1516
@echo " benchmark-fixtures Write fixture CSVs to benchmarks/generated_fixtures/"
1617
@echo " benchmark-test Run the benchmark test suite"
1718
@echo " cleanbench-full Full CleanBench T1-T5 with release gates + site report"
19+
@echo " performance-ci Run the CI-safe performance contract suite"
20+
@echo " performance-baseline Run the performance investigation matrix"
21+
@echo " performance-profile Profile one 100k-row performance case"
22+
@echo " performance-report Analyze and render compact performance evidence"
1823
@echo " training-* Phase-5 training pipeline (see training/Makefile)"
1924

2025
# Full release-gating CleanBench run.
@@ -45,3 +50,16 @@ benchmark-test:
4550
# --no-cov: the benchmark suite exercises only a slice of freshdata, so it
4651
# must not be measured against the package-wide --cov-fail-under gate.
4752
$(PY) -m pytest tests/benchmark -q --no-cov
53+
54+
performance-ci:
55+
$(PY) -m pytest tests/performance -q --no-cov
56+
57+
performance-baseline:
58+
$(PY) -m benchmarks.performance run --output benchmarks/results/performance/baseline
59+
60+
performance-profile:
61+
$(PY) -m benchmarks.performance profile --rows 100000 --widths medium --configs default --report-modes true --output benchmarks/results/performance/baseline
62+
63+
performance-report:
64+
$(PY) -m benchmarks.performance analyze --input benchmarks/results/performance/baseline --output benchmarks/results/performance/baseline-summary.json
65+
$(PY) -m benchmarks.performance render --input benchmarks/results/performance/baseline-summary.json --output benchmarks/results/performance/baseline-report.md

‎benchmarks/performance/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .datasets import DATASET_TYPES, WIDTHS, DatasetSpec, make_mixed_frame
2+
3+
__all__ = ["DATASET_TYPES", "DatasetSpec", "WIDTHS", "make_mixed_frame"]

‎benchmarks/performance/__main__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .cli import main
2+
3+
raise SystemExit(main())

0 commit comments

Comments
 (0)