-
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
build: add build targets for easier build/clean #20905
Conversation
Makefile
Outdated
@echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks." | ||
|
||
# Build required addons for benchmark before running it. | ||
.PHONY: bench-addons | ||
bench-addons: benchmark/misc/function_call/build/Release/binding.node |
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.
This was previously the bench-misc
target, which was removed along with most of the bench-*
targets in #18150.
Ref: #17053
cc @joyeecheung @nodejs/benchmarking
Edit: Sorry I can't read properly. At least this late at night.
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 previous plan was to invoke node-gyp inside the benchmark, but I couldn't make the child process arguments work as intended.
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.
Thanks for the info... so what's the preferred way? Are we taking this approach to do it in Makefile
, or using node-gyp
to make it be able to run under benchmark
dir? I'm neutral to either one.
BTW. I do have something to add to the benchmark
dir so I kicked off with the refactoring of this Makefile
-- otherwise it'll be too annoying to build/clean a number of addons in benchmark
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 think it'd be better if the building can be done inside the benchmark script, since that will be run on Windows, otherwise one will need to update vcbuild.bat
for Windows to have this.
Personally, I'd prefer we didn't abbreviate "benchmark" to "bench" in the target names, although I know this PR didn't originate that. Just, you know, if someone wanted to change it in another PR, that would be A-OK by me. |
The purpose of this PR is that (a) make the current mechanism better, e.g no longer need to key in |
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 strong opinion. Code LGTM
@nodejs/build PTAL |
1 similar comment
@nodejs/build PTAL |
ping @nodejs/build-files |
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 think I’d prefer just landing this as opposed to letting it stall.
Oops, I guess this PR is outdated (the dir of the target was moved elsewhere) and I will rebase it on top of most recent changes. |
a9992f3
to
395a6a7
Compare
Push the same change again to trigger Travis again to see if it goes green this time (1 out 2 had failed: not ok 2312 sequential/test-inspector-port-zero-cluster) |
Makefile
Outdated
@echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks." | ||
|
||
.PHONY: bench | ||
bench: | ||
bench: bench-addons |
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.
Not a blocking objection, but:
Currently, all make bench
does is print a message telling people to run the tests manually instead, right?
This will build the addons and then tell the person to run their benchmarks manually?
Would it make more sense to not do that and just have people know they need to run make bench-addons
if they are running one of the two benchmarks that require it? No one runs make bench
anyway unless they stumble upon it. Compiling stuff and then printing a message saying, basically, "don't use this command" seems like something that could be improved.
Makefile
Outdated
@echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks." | ||
|
||
# Build required addons for benchmark before running it. | ||
.PHONY: bench-addons | ||
bench-addons: benchmark/napi/function_call/build/Release/binding.node \ |
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.
Should this be bench-addons-build
instead, similar to (for example) lint-md-build
? bench-addons
makes it sound like it runs addons benchmarks. This just builds them but does not run them.
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.
Good point.
395a6a7
to
d2123e9
Compare
With these two, it will be easier to manage the dependencies among targets and easier to build/clean the addons which are being used in benchmarking.
CI resumed as: https://ci.nodejs.org/job/node-test-pull-request/15954/ |
Landed in 266c1f4. |
Adding new build targets: 'bench-addons' & 'bench-addons-clean'. With these two, it will be easier to manage the dependencies among targets and easier to build/clean the addons which are being used in benchmarking. PR-URL: #20905 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Adding new build targets: 'bench-addons' & 'bench-addons-clean'. With these two, it will be easier to manage the dependencies among targets and easier to build/clean the addons which are being used in benchmarking. PR-URL: #20905 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Adding new build targets: 'bench-addons' & 'bench-addons-clean'.
With these two, it'll be easier to manage the dependencies among
targets and easier to build/clean the addons which are being
used in benchmarking.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes