Skip to content

Instantly share code, notes, and snippets.

@rubeniskov
Last active September 29, 2022 00:39
Show Gist options
  • Save rubeniskov/f17c834c55960d8f04baab2a418f7630 to your computer and use it in GitHub Desktop.
Save rubeniskov/f17c834c55960d8f04baab2a418f7630 to your computer and use it in GitHub Desktop.
Makefile build benchmark snippet
# $(call build_benchmark,<source>)
define build_benchmark
timestamp=$$(date +%s) && \
$(1) \
&& printf >&2 "Build took %d seconds\n" $$(($$(date +%s)-timestamp))
endef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment