-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
perf(tests): improved e2e test performance by up to 3x #4515
Merged
junedchhipa
merged 1 commit into
apexcharts:main
from
Sebastian-Webster:improve-e2e-test-speed
Jun 13, 2024
Merged
perf(tests): improved e2e test performance by up to 3x #4515
junedchhipa
merged 1 commit into
apexcharts:main
from
Sebastian-Webster:improve-e2e-test-speed
Jun 13, 2024
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
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.
Improved end-to-end test performance by up to 3x
Changes:
Concurrency limit for puppeteer-cluster is set to
os.availableParallelism()
, allowing computers with more CPU cores to take advantage of the available compute and putting less load on computers with less than 5 coresWhen running tests, Puppeteer no longer waits a hard-coded amount of time (previously 2,200ms). It now waits in this order:
Updated
line/realtime
test to only run the interval twice (it only ran twice before this PR, it ran every 1000ms in a 2,200ms window, but now that Puppeteer is waiting for intervals to be cleared, a limit needed to be set to prevent Puppeteer from timing out)In the new version of Puppeteer,
page.waitFor()
is no longer a function. Thepage.waitFor()
intests/e2e/spec/utils.js
has been replaced with a promisified timeout.In the new version of Puppeteer, the filepath for the install Chrome file is now
node_modules/puppeteer/install.mjs
instead ofnode_modules/puppeteer/install.js
. This filepath change has been made to theCONTRIBUTING.md
file.Changed puppeteer-cluster concurrency from
CONCURRENCY_PAGE
toCONCURRENCY_BROWSER
to fix various issues with concurrency after the Puppeteer upgradeBenchmarks:
Machine 1 - M2 2023 15 inch MacBook Air 8GB Memory
Machine 2 - 6 core 2.6GHz i7 2019 16 inch MacBook Pro 32GB memory
Machine 3 - M1 2021 24 inch iMac 16GB memory
Before PR:
After PR:
Type of change
Checklist: