-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: add test-benchmark-buffer #15175
Conversation
Add default values to use for `type` and `method` in `buffer` benchmarks when the provided configuration value is an empty string. This is primarily useful for testing, so the test can request a single iteration without having to worry about providing different valid values for the different benchmarks. While making this change, some `var` instances in immediately surrounding code were changed to `const`. In some cases, `var` had been preserved so that the benchmarks would continue to run in versions of Node.js prior to 4.0.0. However, now that `const` has been introduced into the benchmark `common` module, the benchmarks will no longer run with those versions of Node.js anyway.
Add minimal test forbuffer benchmarks.
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.
LGTM
@@ -19,6 +19,7 @@ function main(conf) { | |||
const len = +conf.len; | |||
const n = +conf.n; | |||
switch (conf.type) { | |||
case '': |
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.
It would be good to add a short description why this is necessary.
E.g. // Used for testing
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.
Oy... I just landed this then saw this comment, my apologies for missing it
Add default values to use for `type` and `method` in `buffer` benchmarks when the provided configuration value is an empty string. This is primarily useful for testing, so the test can request a single iteration without having to worry about providing different valid values for the different benchmarks. While making this change, some `var` instances in immediately surrounding code were changed to `const`. In some cases, `var` had been preserved so that the benchmarks would continue to run in versions of Node.js prior to 4.0.0. However, now that `const` has been introduced into the benchmark `common` module, the benchmarks will no longer run with those versions of Node.js anyway. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add minimal test forbuffer benchmarks. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Landed in b62343d and 19294c2 |
Add default values to use for `type` and `method` in `buffer` benchmarks when the provided configuration value is an empty string. This is primarily useful for testing, so the test can request a single iteration without having to worry about providing different valid values for the different benchmarks. While making this change, some `var` instances in immediately surrounding code were changed to `const`. In some cases, `var` had been preserved so that the benchmarks would continue to run in versions of Node.js prior to 4.0.0. However, now that `const` has been introduced into the benchmark `common` module, the benchmarks will no longer run with those versions of Node.js anyway. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add minimal test forbuffer benchmarks. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add default values to use for `type` and `method` in `buffer` benchmarks when the provided configuration value is an empty string. This is primarily useful for testing, so the test can request a single iteration without having to worry about providing different valid values for the different benchmarks. While making this change, some `var` instances in immediately surrounding code were changed to `const`. In some cases, `var` had been preserved so that the benchmarks would continue to run in versions of Node.js prior to 4.0.0. However, now that `const` has been introduced into the benchmark `common` module, the benchmarks will no longer run with those versions of Node.js anyway. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add minimal test forbuffer benchmarks. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add default values to use for `type` and `method` in `buffer` benchmarks when the provided configuration value is an empty string. This is primarily useful for testing, so the test can request a single iteration without having to worry about providing different valid values for the different benchmarks. While making this change, some `var` instances in immediately surrounding code were changed to `const`. In some cases, `var` had been preserved so that the benchmarks would continue to run in versions of Node.js prior to 4.0.0. However, now that `const` has been introduced into the benchmark `common` module, the benchmarks will no longer run with those versions of Node.js anyway. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add minimal test forbuffer benchmarks. PR-URL: #15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add default values to use for `type` and `method` in `buffer` benchmarks when the provided configuration value is an empty string. This is primarily useful for testing, so the test can request a single iteration without having to worry about providing different valid values for the different benchmarks. While making this change, some `var` instances in immediately surrounding code were changed to `const`. In some cases, `var` had been preserved so that the benchmarks would continue to run in versions of Node.js prior to 4.0.0. However, now that `const` has been introduced into the benchmark `common` module, the benchmarks will no longer run with those versions of Node.js anyway. PR-URL: nodejs#15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Add minimal test forbuffer benchmarks. PR-URL: nodejs#15175 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com
Should this be backported to |
First commit:
Second commit:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test benchmark buffer