-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[charts] Benchmark charts using a real browser #18801
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
base: master
Are you sure you want to change the base?
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
92e3911
to
60ea2e5
Compare
Deploy preview: https://deploy-preview-18801--material-ui-x.netlify.app/ Bundle size reportTotal Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%) Show details for 100 more bundles (22 more not shown)@mui/x-charts parsed: 0B(0.00%) gzip: 0B(0.00%) |
60ea2e5
to
200274f
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This PR replaces the current charts benchmarks, which use Codspeed, with two custom GitHub Actions.
The action "Update Charts Benchmark Baseline" runs when commits are merged to
master
ornext
and upload an artifact namedcharts-benchmarks-results-${{ github.ref_name }}.json
containing the results of the performance tests. It also includes the commit, so we can link in later.The action "Performance Test" runs on pull requests (using the same rules as the Codspeed workflow) and runs the performance tests again. It then downloads the
charts-benchmarks-results-${{ github.base_ref }}.json
results, which are the results of the branch the PR is pointing to, and compares them, logging a comment like this.The GitHub Action uses the minimum value of each benchmark to compare against the baseline. If there is a performance degradation greater than 8% (the defined threshold, same as Codspeed), it will fail the GitHub Action.
Stacked PRs, i.e., PRs pointing to another branch that isn't
master
ornext
won't have a baseline as baselines aren't uploaded for branches other thanmaster
ornext
. This is solvable by always uploading a baseline and maybe using a lower retention time to avoid uploading too many artifacts, but I didn't want to do it unless there's a need.The action can fail in two cases:
For the former, tests need to be fixed so the action succeeds.
For the latter, there's two options:
Testing
These actions and scripts were tested in my personal repo.