Skip to content

Conversation

@blue-jaye-121
Copy link
Contributor

Description Of Changes

With the introduction of benchmarking into MetPy, the next step is to incorporate a GitHub action that will benchmark PR's into MetPy's main branch alongside the current performance to make sure merges will not negatively impact the performance of MetPy. To do so, I've added .github/workflows/benchmark-pr.yml, which is a GitHub workflow that uses asv to comparatively benchmark PR's that are labeled with the label benchmark and fails if any benchmark is 10% or more slower than the current main branch's performance. This check takes ~10 minutes, which is why only labeled PRs will be benchmarked so that those that do not change the calc module can be merged more quickly.
In order to test the action, I used my fork https://github.com/blue-jaye-121/MetPy and opened two pull requests onto this feature branch. The first, blue-jaye-121#3, is not expected to fail. This branch is identical to the feature branch except for a new fakechange.txt file which is empty. As you can see from the results,
image
image

By contrast, blue-jaye-121#4 is identical to the feature branch except for a sleep function on the scale_height() function. As you can see, this check fails:
image
image
since the scale_height() function is over 600% slower.

Checklist

  • Fully documented

@blue-jaye-121 blue-jaye-121 requested a review from a team as a code owner July 28, 2025 20:33
@blue-jaye-121 blue-jaye-121 requested review from dcamron and removed request for a team July 28, 2025 20:33
@dopplershift dopplershift added benchmark Trigger a comparative benchmark of the PR Area: Infrastructure Pertains to project infrastructure (e.g. CI, linting) Type: Enhancement Enhancement to existing functionality labels Jul 28, 2025
@dopplershift dopplershift merged commit 636f416 into Unidata:main Jul 28, 2025
46 of 50 checks passed
@github-actions github-actions bot added this to the 1.7.1 milestone Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Infrastructure Pertains to project infrastructure (e.g. CI, linting) benchmark Trigger a comparative benchmark of the PR Type: Enhancement Enhancement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants