Commit 17d4eb1e authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Peter Korsgaard
Browse files

pkg-infra: add hook to log timing of steps



The timing information is stored in the file $(O)/build-time.log

Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: default avatarSamuel Martin <s.martin49@gmail.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent acd394ae
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -44,6 +44,17 @@ define step_end
	$(foreach hook,$(GLOBAL_INSTRUMENTATION_HOOKS),$(call $(hook),end,$(1),$($(PKG)_NAME))$(sep))
endef

#######################################
# Actual steps hooks

# Time steps
define step_time
	printf "%s:%-5.5s:%-20.20s: %s\n"           \
	       "$$(date +%s)" "$(1)" "$(2)" "$(3)"  \
	       >>"$(BUILD_DIR)/build-time.log"
endef
GLOBAL_INSTRUMENTATION_HOOKS += step_time

################################################################################
# Implicit targets -- produce a stamp file for each step of a package build
################################################################################