-
-
Notifications
You must be signed in to change notification settings - Fork 184
Support user-defined benchmark suites. #109
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
Merged
ericsnowcurrently
merged 127 commits into
python:main
from
ericsnowcurrently:benchmark-management
Dec 8, 2021
Merged
Support user-defined benchmark suites. #109
ericsnowcurrently
merged 127 commits into
python:main
from
ericsnowcurrently:benchmark-management
Dec 8, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pablogsal, if possible could you give this a quick look. I don't necessarily need a full review of the code. More than anything I want to be sure the overall approach is acceptable. I'd be glad to hop into a call if that would help. Thanks! |
This was referenced Nov 17, 2021
FYI, after a quick chat with @pablogsal, I plan on merging this tomorrow. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(I realize this is a big PR. Sorry! The changes to .py files is a smaller change. If necessary I can split it up a little, but it might not be worth it. 🙂 Just let me know.)
Currently pyperformance is two things coupled together: a tool to run a Python benchmark suite and a curated suite of Python benchmarks. This PR splits those apart, with the existing suite used as the default. This allows users to run their own set of benchmarks, perhaps specific to their Python implementation or their PyPI library, e.g. https://github.com/ericsnowcurrently/pyston-macrobenchmarks/tree/pyperformance.
Key changes:
--manifest
CLI option to specify the custom suite to useMost notably, this change should not affect benchmark results.
Specifying a Benchmark Suite
A benchmark suite is defined through a manifest file. For example, see the file for the default suite in
pyperformance/_benchmarks/MANIFEST
. A manifest file has a[benchmarks]
section (and zero or more[group NAME]
sections). See pyperformance/benchmarks/_manifest.py.The
[benchmarks]
section is a TSV (tab-separated-values) table with 4 columns:<local>
to find "bm_" relative to the manifest file)The New Structure of a Benchmark
Each benchmark is in its own directory and looks like this:
pyproject.toml
is the normal PEP 621 format for Python projects. These are the important fields in the[project]
section:We add a
[tool.pyperformance]
section, as supported by PEP 518. These are the important fields:[project]
section)See pyperformance/benchmark/_metadata.py.