Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add a small set of ops.testing benchmark tests #1504

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tonyandrewmeyer
Copy link
Contributor

The PR:

  • Adds a new tox -e benchmark command.
  • Adds a new test/test_benchmark.py model.
  • Excludes the benchmark tests from tox -e unit and tox -e coverage

I wrote a small set of benchmark tests while working on #1434. It seems like it'd be worth keeping these - in the future, they could be expanded to include a small set of benchmark tests that target ops more specifically, and ideally we could have a CI workflow that failed if there were regressions (currently, running the tests just outputs the timing, and you can use the pytest-benchmark tools to do comparisons).

@tonyandrewmeyer tonyandrewmeyer changed the title tests: add a small set of ops.testing benchmark tests test: add a small set of ops.testing benchmark tests Dec 17, 2024
Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks for committing these! Couple of minor comments/questions.

test/test_benchmark.py Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
Also more cleanly separate out ops and ops-scenario, to be consistent with what we do elsewhere. There are no ops benchmark tests yet but put the bits in place to add them, since we will want to have some at some point.
…oject.toml

Ideally, we would statically check these, like the other tests, but it does not seem super important for benchmarking tests. The issue is that there is an import after a sys.path manipulation, and pyright cannot figure that out, so complains about a lot of things. We do not want to have that charm on the path, and adjusting the path for pyright does not seem great either. Not clear what the cleanest solution is.
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.

2 participants