-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
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 |
There was a problem hiding this comment.
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.
dkist/tests/test_benchmarks.py
Outdated
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()) |
There was a problem hiding this comment.
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?
No idea if this will work
Which is annoying since it was exactly not the point
Going to close this as it's been made obsolete by #382 . |
Very rudimentary so far but hopefully will be useful in tracking performance and preventing regressions.