-
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-napi #23585
Changes from 3 commits
b22ee20
c62111c
e7ca5ef
8309f44
81bf8ba
dd64946
8ef164e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -269,7 +269,7 @@ v8: | |
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS) | ||
|
||
.PHONY: jstest | ||
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests | ||
jstest: build-addons build-addons-napi bench-addons-build ## Runs addon tests and JS tests | ||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \ | ||
--skip-tests=$(CI_SKIP_TESTS) \ | ||
$(CI_JS_SUITES) \ | ||
|
@@ -413,7 +413,7 @@ clear-stalled: | |
echo $${PS_OUT} | xargs kill -9; \ | ||
fi | ||
|
||
test-build: | all build-addons build-addons-napi | ||
test-build: | all build-addons build-addons-napi bench-addons-build | ||
|
||
test-build-addons-napi: all build-addons-napi | ||
|
||
|
@@ -443,7 +443,7 @@ test-ci-native: | test/addons/.buildstamp test/addons-napi/.buildstamp | |
test-ci-js: | clear-stalled | ||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ | ||
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ | ||
$(TEST_CI_ARGS) $(CI_JS_SUITES) | ||
$(TEST_CI_ARGS) $(CI_JS_SUITES) --skip-tests=sequential/test-benchmark-napi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the explicit exclusion? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just above this diff is the comment
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
@echo "Clean up any leftover processes, error if found." | ||
ps awwx | grep Release/node | grep -v grep | cat | ||
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ | ||
|
@@ -454,7 +454,7 @@ test-ci-js: | clear-stalled | |
.PHONY: test-ci | ||
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned | ||
test-ci: LOGLEVEL := info | ||
test-ci: | clear-stalled build-addons build-addons-napi doc-only | ||
test-ci: | clear-stalled build-addons build-addons-napi doc-only bench-addons-build | ||
out/Release/cctest --gtest_output=tap:cctest.tap | ||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ | ||
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ | ||
|
@@ -492,7 +492,7 @@ test-debug: test-build | |
test-message: test-build | ||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) message | ||
|
||
test-simple: | cctest # Depends on 'all'. | ||
test-simple: | cctest bench-addons-build # Depends on 'all'. | ||
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential | ||
|
||
test-pummel: all | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
|
||
if (common.isWindows) { | ||
common.skip('vcbuild.bat doesn\'t build the n-api benchmarks yet'); | ||
} | ||
|
||
const runBenchmark = require('../common/benchmark'); | ||
|
||
runBenchmark('napi', | ||
[ | ||
"n=1", | ||
"engine=v8", | ||
"type=String" | ||
], | ||
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); |
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.
nit: naming convention is
build-addons-<variant>
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.
So, change the name of the target to "build-addons-bench"?
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.
build-addons-benchmarks
?After all you write it once, and read it a 1000 times...
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.
Ahh I didn't notice it was already defined...
So probably better to leave it as is.