Skip to content

Commit 074d2db

Browse files
author
Gonzalo Diaz
committed
[CONFIG] Makefile new function to measure the time.
1 parent 9330333 commit 074d2db

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ DOCKER_COMPOSE=docker compose
3333
.PHONY: all clean dependencies help list test outdated
3434
.EXPORT_ALL_VARIABLES: # (2)
3535

36+
define crono
37+
@start=$$(date +%s); \
38+
$(1); \
39+
end=$$(date +%s); \
40+
diff=$$((end - start)); \
41+
printf "Total time: %02d:%02d:%02d\n" $$((diff/3600)) $$((diff%3600/60)) $$((diff%60))
42+
endef
43+
44+
3645
help: list
3746

3847
list:
@@ -135,7 +144,8 @@ compose/test: compose/build
135144
compose/run: compose/build
136145
${DOCKER_COMPOSE} --profile production run --rm algorithm-exercises-js make run
137146

138-
all: env dependencies test
147+
all:
148+
$(call crono, make clean && make dependencies && make build && make test && make lint && make coverage/html)
139149

140150
run:
141151
ls -alh

0 commit comments

Comments
 (0)