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

Benchmark: Fix script breaking when base branch has slashes #30232

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Jan 10, 2025

What I did

Disabled saving comparison results to disk, only saving the raw results. They were causing issues when the base branch had a slash in them, because that would lead to mangled file names. No one looks at these files, so let's just stop generating them.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.8 MB 77.8 MB 0 B -2.12 0%
initSize 131 MB 131 MB 0 B -0.34 0%
diffSize 53 MB 53 MB 0 B -0.33 0%
buildSize 7.19 MB 7.19 MB 0 B 1.08 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B -0.82 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B -0.82 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B 1.09 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 11.8s 7.3s -4s -475ms -1.27 🔰-60.6%
generateTime 22.5s 20.6s -1s -928ms 0.02 -9.4%
initTime 15.1s 13.9s -1s -204ms -0.06 -8.7%
buildTime 8.2s 8.8s 553ms -0.68 6.3%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.2s 4.2s -1s -50ms -1.63 🔰-24.9%
devManagerResponsive 3.9s 3.1s -803ms -1.63 🔰-25.4%
devManagerHeaderVisible 586ms 551ms -35ms -1.19 -6.4%
devManagerIndexVisible 613ms 576ms -37ms -1.31 🔰-6.4%
devStoryVisibleUncached 2.1s 1.8s -369ms -0.64 -20.3%
devStoryVisible 614ms 577ms -37ms -1.4 🔰-6.4%
devAutodocsVisible 549ms 455ms -94ms -1.25 🔰-20.7%
devMDXVisible 490ms 576ms 86ms 0.31 14.9%
buildManagerHeaderVisible 530ms 509ms -21ms -1.12 -4.1%
buildManagerIndexVisible 621ms 618ms -3ms -0.92 -0.5%
buildStoryVisible 519ms 499ms -20ms -1.14 -4%
buildAutodocsVisible 415ms 413ms -2ms -1.4 -0.5%
buildMDXVisible 407ms 485ms 78ms 0.06 16.1%

Greptile Summary

Simplified benchmarking process by removing storage of comparison results to disk, while maintaining core functionality and raw results storage, to fix issues with base branch names containing slashes.

  • Removed comparison results JSON artifact storage in .circleci/config.yml
  • Removed saveLocally() calls for comparison results in scripts/bench/bench-packages.ts
  • Maintained raw results.json storage as CircleCI artifact
  • Preserved core benchmarking functionality including BigQuery and GitHub uploads

@JReinhold JReinhold self-assigned this Jan 10, 2025
@JReinhold JReinhold requested a review from yannbf January 10, 2025 12:56
@JReinhold JReinhold added build Internal-facing build tooling & test updates ci:normal labels Jan 10, 2025
@JReinhold JReinhold marked this pull request as ready for review January 10, 2025 12:57
Copy link

nx-cloud bot commented Jan 10, 2025

View your CI Pipeline Execution ↗ for commit f53509d.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 42s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-10 13:15:03 UTC

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

I'm assuming it's a safe change, so LGTM

@JReinhold JReinhold merged commit f43a567 into next Jan 10, 2025
58 of 60 checks passed
@JReinhold JReinhold deleted the jeppe/fix-bench-base-with-slash branch January 10, 2025 14:35
@github-actions github-actions bot mentioned this pull request Jan 10, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants