-
Notifications
You must be signed in to change notification settings - Fork 30k
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: use 'yes' instead of echo in a loop #8721
benchmark: use 'yes' instead of echo in a loop #8721
Conversation
This changes child-process-exec-stdout benchmark to use 'yes' instead of echo in a while loop. This makes this benchmark consistent with child-process-read which already uses `yes` and allows this benchmark to be executed on Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know Windows had a yes command. LGTM.
Windows does not have yes command. |
Yep, I don't have a yes command in cmd. However there is one in Git bash, (default location |
Note: So this could reduce the slowdown (or the cpu usage) introduced by the test itself here. Not sure if that effect is measurable, though. |
This significantly affects the benchmark (in a positive way). Before: $ node benchmark/child_process/child-process-exec-stdout.js
child_process/child-process-exec-stdout.js dur=5 len=64: 40872.31295343989
child_process/child-process-exec-stdout.js dur=5 len=256: 42284.49284876121
child_process/child-process-exec-stdout.js dur=5 len=1024: 42556.261440065464
child_process/child-process-exec-stdout.js dur=5 len=4096: 40866.002162569785
child_process/child-process-exec-stdout.js dur=5 len=32768: 45769.970852308645 After: $ node benchmark/child_process/child-process-exec-stdout.js
child_process/child-process-exec-stdout.js dur=5 len=64: 52294.7307645832
child_process/child-process-exec-stdout.js dur=5 len=256: 51257.097720466736
child_process/child-process-exec-stdout.js dur=5 len=1024: 50287.9926165738
child_process/child-process-exec-stdout.js dur=5 len=4096: 52306.85402878927
child_process/child-process-exec-stdout.js dur=5 len=32768: 52307.0022664649 |
the CI not happy. |
I've run the CI again: https://ci.nodejs.org/job/node-test-commit/5258/. It is still not happy. Anyhow, none of those failures are related. Regarding |
@bzoz Is there any documentation for the requirements for running benchmarks on Windows? It would be helpful to document the need for a non-standard exe on the system (maybe in https://github.com/nodejs/node/tree/master/benchmark#prerequisites ?). It would also make sense to have a comment above this line saying that this requires a |
@gibfahn This is already mentioned in https://github.com/nodejs/node/blob/master/BUILDING.md#windows, but yes, we should also add this to https://github.com/nodejs/node/tree/master/benchmark#prerequisites. |
This changes child-process-exec-stdout benchmark to use 'yes' instead of echo in a while loop. This makes this benchmark consistent with child-process-read which already uses `yes` and allows this benchmark to be executed on Windows. Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: #8721
Landed in d5bc52a |
This changes child-process-exec-stdout benchmark to use 'yes' instead of echo in a while loop. This makes this benchmark consistent with child-process-read which already uses `yes` and allows this benchmark to be executed on Windows. Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: #8721
This changes child-process-exec-stdout benchmark to use 'yes' instead of echo in a while loop. This makes this benchmark consistent with child-process-read which already uses `yes` and allows this benchmark to be executed on Windows. Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: nodejs#8721
This changes child-process-exec-stdout benchmark to use 'yes' instead of echo in a while loop. This makes this benchmark consistent with child-process-read which already uses `yes` and allows this benchmark to be executed on Windows. Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: #8721
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
benchmark
Description of change
This changes
child-process-exec-stdout
benchmark to useyes
instead ofecho
in a while loop. This makes this benchmark consistent withchild-process-read
which already usesyes
and allows this benchmark to be executed on Windows./cc @nodejs/benchmarking