Skip to content

Commit

Permalink
build: add new benchmark targets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kenny-y authored and targos committed Jul 20, 2018
1 parent 4c5fc5c commit 4f00562
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ clean: ## Remove build artifacts.
$(RM) -r test/tmp*
$(RM) -r test/.tmp*
$(MAKE) test-addons-clean
$(MAKE) bench-addons-clean

.PHONY: distclean
distclean:
Expand Down Expand Up @@ -1054,13 +1055,23 @@ ifeq ($(XZ), 0)
endif

.PHONY: bench-all
bench-all:
bench-all: bench-addons-build
@echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."

.PHONY: bench
bench:
bench: bench-addons-build
@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-build
bench-addons-build: benchmark/napi/function_call/build/Release/binding.node \
benchmark/napi/function_args/build/Release/binding.node

.PHONY: bench-addons-clean
bench-addons-clean:
$(RM) -r benchmark/napi/function_call/build
$(RM) -r benchmark/napi/function_args/build

.PHONY: lint-md-clean
lint-md-clean:
$(RM) -r tools/remark-cli/node_modules
Expand Down

0 comments on commit 4f00562

Please sign in to comment.