-
Notifications
You must be signed in to change notification settings - Fork 427
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
test: compare local benchmark to latest
and exit 1
#7529
Closed
Closed
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
No changes to documentation |
Component Testing Report Updated Sep 20, 2024 9:37 PM (UTC) ✅ All Tests Passed -- expand for details
|
ricokahler
force-pushed
the
test/compare-efps
branch
from
September 20, 2024 21:06
90ce799
to
af3a041
Compare
superseded by #7556 |
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.
Description
This PR refactors the benchmark suite to compare the performance between the local version of the
sanity
package and the latest published version from npm. The key changes introduced are:Downloading and Using Latest
sanity
Package: The benchmark suite now automatically downloads the latest version of thesanity
package as a tarball, extracts it, and aliases it in the Vite build process. This allows us to run benchmarks against both the local and the latest versions.Running Benchmarks for Both Versions: For each test in the suite, benchmarks are executed twice—once using the local
sanity
package and once using the latest version. This provides a direct comparison of performance metrics between the two versions.Comparing and Displaying Results: The results from both runs are collected and percentage differences are calculated. These differences are displayed in a table format, showing improvements or regressions in performance.
Exiting on Significant Regression: If the benchmark detects a performance regression exceeding 50% (i.e., the local version performs worse than the latest version by more than 50%), the script exits with an exit code of
1
. This helps in automated environments to catch significant performance issues early.Why are these changes introduced?
These changes are introduced to:
What issue(s) does this solve?
sanity
package.What to review
Steps for Reviewers:
Code Changes:
index.ts
andrunTest.ts
.sanity
package is sound and doesn't introduce side effects.sanity
is used in each benchmark run.Benchmark Execution:
Exit Conditions:
1
.Affected Areas:
index.ts
andrunTest.ts
.Testing
Testing Performed:
sanity
package and aliases it in the build.1
.Automated Testing:
Reasoning:
Notes for release
What Changed:
sanity
package.sanity
package and includes it in the benchmark runs.1
.How to Use It:
npm start
ornpm test
commands.sanity
package and running the benchmarks for both versions automatically.Example Output:
Are there limitations?
1
if a performance regression exceeding 50% is detected. This may affect CI/CD pipelines and should be handled appropriately.Not Required for Release Notes: