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

WIP Start adding some basic benchmarking infrastructure #372

Closed
wants to merge 20 commits into from

Conversation

SolarDrew
Copy link
Contributor

Very rudimentary so far but hopefully will be useful in tracking performance and preventing regressions.

@SolarDrew SolarDrew marked this pull request as draft April 17, 2024 13:07
tox.ini Outdated
[testenv:benchmarks]
description = Run benchmarks against latest release to ensure there are no performance regressions
commands =
{env:PYTEST_COMMAND} -k test_benchmarks --benchmark-autosave --benchmark-compare=0001
Copy link
Member

Choose a reason for hiding this comment

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

I propose that instead of -k test_benchmarks we put the @pytest.mark.benchmark marker on all our benchmarks and then do -m benchmark to select tests with that marker.

Comment on lines 9 to 12
vispdir = tmp_path_factory.mktemp("data")
with gzip.open(Path(rootdir) / "large_visp.asdf.gz", mode="rb") as gfo:
with open(vispdir / "test_visp.asdf", mode="wb") as afo:
afo.write(gfo.read())
Copy link
Member

Choose a reason for hiding this comment

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

presumeably we would want this bit to be in a fixture so it's not part of the code getting benchmarked?

@SolarDrew
Copy link
Contributor Author

Going to close this as it's been made obsolete by #382 .

@SolarDrew SolarDrew closed this May 8, 2024
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