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: add warmup to accessSync bench #50073

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

RafaelGSS
Copy link
Member

Following-up: #49593 (comment).

Turns out, it does have a difference for the first run @anonrig. See:

➜  node git:(main) ✗ node benchmark/fs/bench-accessSync.js # firstRun
fs/bench-accessSync.js n=100000 type="existing": 1,522,375.115877485
fs/bench-accessSync.js n=100000 type="non-existing": 343,903.4938015694
fs/bench-accessSync.js n=100000 type="non-flat-existing": 1,375,793.3804884679
➜  node git:(main) ✗ node benchmark/fs/bench-accessSync.js
fs/bench-accessSync.js n=100000 type="existing": 1,316,668.6965309072
fs/bench-accessSync.js n=100000 type="non-existing": 330,345.1784036734
fs/bench-accessSync.js n=100000 type="non-flat-existing": 1,365,020.780120842
➜  node git:(main) ✗ node benchmark/fs/bench-accessSync.js
fs/bench-accessSync.js n=100000 type="existing": 1,348,179.7766454385
fs/bench-accessSync.js n=100000 type="non-existing": 294,858.29814902286
fs/bench-accessSync.js n=100000 type="non-flat-existing": 1,407,337.381426724

To get a similar behaviour you need to ensure the fs cache isn't affected (usually waiting a bit before rerunning the bench). With the warmup, the results are more consistent (tested in a dedicated machine too).

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. fs Issues and PRs related to the fs subsystem / file system. labels Oct 7, 2023
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

Nice catch. Thank you for the follow up

@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 7, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 7, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 14, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 14, 2023
@nodejs-github-bot nodejs-github-bot merged commit 3c0ec61 into nodejs:main Oct 14, 2023
62 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 3c0ec61

alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
targos pushed a commit that referenced this pull request Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants