-
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
benchmark: test refactoring #31396
benchmark: test refactoring #31396
Conversation
run(); | ||
} else { | ||
console.log(JSON.stringify({ throughput })); | ||
if (client) { | ||
client.destroy(); | ||
process.exit(0); |
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.
@nodejs/http2 @ronag I had to end the process hard in case this runs the http2 benchmarks. Maybe someone could have a look what part stays alive.
1cb7b50
to
27eee27
Compare
This is ready for review. I just cleaned up the commits. |
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.
Looks reasonable to me.
This does reduce the test runtime for almost all benchmarks. Mostly by a few hundred milliseconds. The runtime for |
This could use another review @nodejs/benchmarking |
27eee27
to
3fd40c6
Compare
Needs a rebase. |
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.
Rubber-stamp LGTM. The concept is sound.
3fd40c6
to
6ea89f5
Compare
9bdb710
to
f7926f3
Compare
This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported.
This reverts commit b70741e. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Also something that I just now noticed is that this PR changed the formatting of the configuration string (when writing the CSV output) such that each parameter is preceded by a space whether it's needed or not, which breaks tooling (something I'm currently working on) that monitors changes in benchmark results by comparing results for a particular configuration. Just something to keep in mind if these changes get merged again later on. EDIT: FWIW I'm now incorporating extra safeguards to prevent this sort of thing in my tooling in the future... |
This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This adds a new `test` option. Using it automatically uses a single minimal option matrix to verify the benchmark works as expected. Using the new `all` option makes sure all test suites are run. On top of that the benchmarks will from now on report properly what category might have a typo, if any. The http duration was also refactored to use a option instead of relying on a configuration setting. The fixture folder is ignored as test suite from now on. PR-URL: #31396 Fixes: #31083 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This reverts commit 357230f. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit 78aa348. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit dac5795. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit b70741e. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@BridgeAR could you please manually backport this to |
This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: #31396 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This reverts commit 357230f. Refs: nodejs#31396 PR-URL: nodejs#31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit b70741e. Refs: nodejs#31396 PR-URL: nodejs#31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit 357230f. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit b70741e. Refs: #31396 PR-URL: #31722 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
I went ahead and refactored all our benchmark tests. The benchmark suite itself now has a test functionality built-in (using
test
). It is also possible to run all benchmark suites by usingall
. The tests are now run independent from benchmark changes and should always keep on working.The fixtures directory is now skipped and in case there's a typo for the benchmark, the error message is now more informative.
I removed warnings from benchmark files in case they occurred.
Some tests require special options as a minimum. Those may now be passed through using the
test
option. These values will be used in case the benchmark test is run.It is now possible to pass through individual configurations instead of having to use an array.
Fixes: #31083
I did not yet find time to clean up the commits.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes