-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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-napi #23585
Conversation
also makes sure that the napi benchmark is built before running jstest skipped on windows since n-api benchmarks aren't built there yet
const common = require('../common'); | ||
|
||
if (common.isWindows) { | ||
common.skip('vcbuild.bat doesn\'t build the n-api benchmarks yet') |
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.
The linter fails on this due to the missing semicolon at the end.
You can run
|
open question: In other benchmark triggering tests we have seen checking for and skipping based on available memory - is this test an exemption? |
@gireeshpunathil I noticed that the memcheck wasn't in all of the benchmark tests -- only the |
Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/17848/ |
Failures are related (at least one of the n-api benchmark addons is failing to compile):
We do set Line 373 in f569ecf
but I think this only applies to .cc files (napi_binding.c is a .c ).
cc @nodejs/addon-api @nodejs/gyp |
Sorry, meant to cc @nodejs/n-api instead of addon-api. |
Hi @richardlau, 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ] change in 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-std=c11' ] See: Line 372 in f569ecf
|
|
common.gypi
Outdated
@@ -369,7 +369,7 @@ | |||
'ldflags': [ '-pthread' ], | |||
}], | |||
[ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { | |||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], | |||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-std=c11', ], |
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.
Since common.gypi
is used by addons we should at least run this past citgm.
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.
I suppose an alternative is to hard-code the flag into the Makefile for the napi benchmark build step only?
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.
Or maybe in the binding.gyp
of the n-api benchmark addon?
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.
No need for CITGM. It's failing to build on lots of hosts. Will force-push that commit out....
0e67357
to
8309f44
Compare
Rewrote the loops to declare the variables before using in |
Added |
For ubuntu1604_sharedlibs_debug_x64, do we need to skip the test or is there a bug to be fixed? 22:29:34 not ok 2090 sequential/test-benchmark-napi
22:29:34 ---
22:29:34 duration_ms: 15.590
22:29:34 severity: fail
22:29:34 exitcode: 1
22:29:34 stack: |-
22:29:34 /home/iojs/build/workspace/node-test-commit-linux-containered/nodes/ubuntu1604_sharedlibs_debug_x64/benchmark/napi/function_args/index.js: V8 Binding failed to load
22:29:34 misc/function_call.js Binding failed to load
22:29:34 assert.js:351
22:29:34 throw err;
22:29:34 ^
22:29:34
22:29:34 AssertionError [ERR_ASSERTION]: benchmark file not running exactly one configuration in test:
22:29:34 napi/function_args
22:29:34
22:29:34 napi/function_call
22:29:34
22:29:34 at ChildProcess.child.on (/home/iojs/build/workspace/node-test-commit-linux-containered/nodes/ubuntu1604_sharedlibs_debug_x64/test/common/benchmark.js:43:12)
22:29:34 at ChildProcess.emit (events.js:182:13)
22:29:34 at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
22:29:34 ... |
The job config for ubuntu1604_sharedlibs_debug_x64 only runs There may also be an issue in the benchmark as it is requiring from cc @nodejs/build |
|
Ref: #23585 (comment) Python's `list.remove` will throw if the element is not found and also it removes only the first occurrence. This patch replaces the use of `list.remove` with a `filter` which solves both of the above mentioned problems. PR-URL: #23727 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Ref: #23585 (comment) Python's `list.remove` will throw if the element is not found and also it removes only the first occurrence. This patch replaces the use of `list.remove` with a `filter` which solves both of the above mentioned problems. PR-URL: #23727 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Added a commit to skip the test on Debug builds. |
Yes 👍 |
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: nodejs#23585 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Landed in 8c99a22. Thanks for the contribution! 🎉 (If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.) |
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: #23585 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Ref: #23585 (comment) Python's `list.remove` will throw if the element is not found and also it removes only the first occurrence. This patch replaces the use of `list.remove` with a `filter` which solves both of the above mentioned problems. PR-URL: #23727 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: #23585 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Ref: #23585 (comment) Python's `list.remove` will throw if the element is not found and also it removes only the first occurrence. This patch replaces the use of `list.remove` with a `filter` which solves both of the above mentioned problems. PR-URL: #23727 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: #23585 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Ref: #23585 (comment) Python's `list.remove` will throw if the element is not found and also it removes only the first occurrence. This patch replaces the use of `list.remove` with a `filter` which solves both of the above mentioned problems. PR-URL: #23727 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: #23585 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
also makes sure that the napi benchmark is built before running jstest
skipped on windows since n-api benchmarks aren't built there yet
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes