Add performance benchmarks for the non-Analyzer pipeline (MASTER_SPEC §26.6, NFR-004) plus tests. - scripts/benchmark.py: measures Knowledge Base load time, single-scene resolution time, and full pipeline time (median over iterations) and records a baseline to docs/benchmarks.md. - docs/benchmarks.md: recorded baseline numbers (indicative, machine-dependent). - tests/test_performance.py: a benchmark smoke test (functions run, all metrics positive, a generous non-flaky bound), a check that the recorded baseline exists, and two tests confirming the Knowledge Base is loaded once and reused (the loader caches; the pipeline never reloads per compilation). Co-authored-by: kunail0804 <kunail0804@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
11 lines
393 B
Markdown
11 lines
393 B
Markdown
# Performance baselines
|
|
|
|
Median wall-clock times for the non-Analyzer pipeline (Knowledge Base: 188 entries; scene: `complex_multi_character`).
|
|
Numbers are machine-dependent and indicative; regenerate with `python scripts/benchmark.py`.
|
|
|
|
| Metric | Median |
|
|
|---|---|
|
|
| Knowledge Base load | 11.26 ms |
|
|
| Single-scene resolution | 57.6 µs |
|
|
| Full pipeline (validate → build) | 742.6 µs |
|