SIGN IN SIGN UP

Fix benchmark cache path and add forceBenchmarks pipeline variable (#927)

* Fix benchmark cache path: use directory instead of file

The Cache@2 ADO task requires a directory path, but .perf.baseline was a
file. Move baseline storage into a .perf-baseline/ directory so the cache
task can save/restore it correctly.

- Change cache path to \/.perf-baseline
- Update test_benchmark.py to store baseline in .perf-baseline/data
- Ensure directory exists with mkdir -p before running benchmarks
- Update .gitignore accordingly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add forceBenchmarks pipeline variable to allow manual benchmark runs

Allows benchmarks to run on non-dev branches by setting the pipeline
variable forceBenchmarks=true when queuing a manual build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review: ensure .perf-baseline dir exists in all contexts

- Add os.makedirs in test_benchmark.py so local runs don't fail
- Use absolute path in mkdir -p to align with Cache@2 path

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review: anchor baseline path to repo root, fix comment

- Use __file__-based path resolution so baseline works from any CWD
- Move stdlib imports before third-party imports
- Update pipeline comment to reflect forceBenchmarks behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add 5-min step timeout to pytest to fail fast on 3.14 stalls

Python 3.14 intermittently stalls during test execution, consuming the
full 30-min job timeout. Add a 5-minute timeoutInMinutes on the pytest
step so stalls are caught quickly instead of wasting agent time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review: scope forceBenchmarks to Manual builds, add step timeout

- Require Build.Reason=Manual for forceBenchmarks override (case-insensitive)
- Add 5-min timeoutInMinutes on pytest step to catch stalls early

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
R
Ryan Auld committed
2cbafafe03fd693a259d084a69199597ee5b3238
Parent: 836abbd
Committed by GitHub <noreply@github.com> on 6/16/2026, 4:35:21 PM