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

[core] Test charts performance with codspeed #13952

Merged
merged 47 commits into from
Jul 30, 2024
Merged

Conversation

JCQuintas
Copy link
Member

@JCQuintas JCQuintas commented Jul 23, 2024

Initial testing of the charts performance using codspeed

  • Testing basic charts against a "large" amount of data
  • Workflow

Reports

You can see a live report example at: JCQuintas#4

Unchanged

Screenshot 2024-07-25 at 15 18 12

Regressions/Improvements

Screenshot 2024-07-25 at 15 48 57

Accepting regressions

Once there is a regression over our delimited threshold (currently 10%), we need to manually accept that in their UI.

screencapture-codspeed-io-JCQuintas-mui-x-branches-codspeed-2024-07-25-15_59_25

@JCQuintas JCQuintas added core Infrastructure work going on behind the scenes component: charts This is the name of the generic UI component, not the React module! scope: code-infra Specific to the core-infra product labels Jul 23, 2024
@JCQuintas JCQuintas self-assigned this Jul 23, 2024
@mui-bot
Copy link

mui-bot commented Jul 23, 2024

Deploy preview: https://deploy-preview-13952--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 5be0be1

Copy link

codspeed-hq bot commented Jul 25, 2024

CodSpeed Performance Report

Congrats! CodSpeed is installed 🎉

🆕 3 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks

  • BarChart with big data amount (1.6 s)
  • LineChart with big data amount (1 s)
  • ScatterChart with big data amount (572.9 ms)

Comment on lines +4 to +9
push:
branches:
- 'master'
- 'next'
paths:
- 'packages/x-charts*/**'
Copy link
Member Author

Choose a reason for hiding this comment

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

We could change this to "release" instead, to update the base "bechmarks" release-by-release instead of every push to master

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 26, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

Looks good. I'm curious to see how this new tool will integrate in our workflow

.github/workflows/codspeed.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
test/performance-charts/tests/BarChart.bench.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 30, 2024
@JCQuintas JCQuintas enabled auto-merge (squash) July 30, 2024 11:34
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 30, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 30, 2024
@JCQuintas JCQuintas disabled auto-merge July 30, 2024 12:06
@JCQuintas JCQuintas merged commit 9f89e31 into mui:master Jul 30, 2024
18 checks passed
export default defineConfig({
plugins: [codspeedPlugin(), react()],
test: {
environment: 'jsdom',
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure that jsdom is where you want to test performance? Imo, as an emulated test environment it has more chances of diverging from what users see in real-world cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we took that into account. It is better than nothing right now. We want to know if the changes we introduce affect the rendering times by a significant % amount, not necessarily real user times.

Once the platform supports testing using browser/playwright we will definitely change to use that instead.

This is also "free" for us right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes scope: code-infra Specific to the core-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants