Skip to content

Conversation

tdrwenski
Copy link
Collaborator

@tdrwenski tdrwenski commented Apr 22, 2025

Add automated performance regression tests.

Regarding the CI:
These run on LC machines using GitLab (ruby only for now), on main when there are new commits as on PRs. We use the GitHub benchmark action to ingest the results and plot on a dashboard using GitHub pages. Only the results from main are added to the dashboard. Results from other branches are just compared to latest results on the dashboard with a tolerance of 120% (this is configurable in the GitHub workflow). If they are slower than that, the GitHub workflow will fail and a comment will be automatically added to the failing commit and a failing workflow will show up on the PR.

Regarding the tests:
The tests themselves are run with pytest-benchmark, with test cases specified in the test_cases.json. This executes quandary with a given configuration for n iterations and records the time it takes for each run and computes an average, standard deviation, etc. The timing is computed by the pytest-benchmark tool (so is an external timer). The memory usage of the last run is added to the pytest results as well (using the output that quandary itself computes and prints outs). The pytest-benchmark tool can also be used to run the tests locally and compare to previous runs (see performance tests README).

  • Reorganize all tests into a tests directory. Regression tests were moved into the directory and paths were updated in READMEs, docs, in CI.
  • Add regression test case identical to the performance test case

@tdrwenski tdrwenski force-pushed the perf-testing branch 18 times, most recently from dff09ff to d74e51d Compare April 25, 2025 21:26
@tdrwenski tdrwenski force-pushed the perf-testing branch 3 times, most recently from 50221f5 to 6488fbc Compare May 2, 2025 23:21
@steffi7574
Copy link
Member

@tdrwenski, sorry I merged the Typos branch first. Could you recompile the user_guide.pdf? I can merge then.

@tdrwenski
Copy link
Collaborator Author

No problem, will resolve that. Let me check one thing about the CI before we merge this.

@tdrwenski tdrwenski changed the title WIP Add automated performance tests Add automated performance tests May 16, 2025
@tdrwenski tdrwenski merged commit 991924c into main May 16, 2025
5 of 7 checks passed
@tdrwenski tdrwenski deleted the perf-testing branch May 16, 2025 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants