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

loop: add sleep between loop #281

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

loop: add sleep between loop #281

wants to merge 1 commit into from

Conversation

krichprollsch
Copy link
Member

No description provided.

@krichprollsch
Copy link
Member Author

I used the benchmark on my own computer to compare a release build between main and this PR:
main

$ npm run bench-puppeteer-cdp

> demo@1.0.0 bench-puppeteer-cdp
> node puppeteer/cdp.js

................................................................................
....................
total runs 100
total duration (ms) 25686
avg run duration (ms) 253
min run duration (ms) 187
max run duration (ms) 316

this PR

$ npm run bench-puppeteer-cdp

> demo@1.0.0 bench-puppeteer-cdp
> node puppeteer/cdp.js

................................................................................
....................
total runs 100
total duration (ms) 29046
avg run duration (ms) 287
min run duration (ms) 187
max run duration (ms) 332

@krichprollsch
Copy link
Member Author

But we still use 3.2% of my CPU for doing nothing...
image

@krichprollsch krichprollsch marked this pull request as draft October 29, 2024 09:11
@krichprollsch krichprollsch added the CDP Chrome Debug Protocol label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDP Chrome Debug Protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant