Attention is currently required from: Martin L Roth.
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75803?usp=email )
Change subject: util/abuild: Add per-build statistics tarfile ......................................................................
util/abuild: Add per-build statistics tarfile
Change-Id: Icb9a5bdf94013fe493dc8ec634cf3094bcff2838 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M util/abuild/abuild 1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/75803/1
diff --git a/util/abuild/abuild b/util/abuild/abuild index fb2fbaf..3b527ec 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -420,9 +420,15 @@
cd "${build_dir}" || return $?
+ timestamps="abuild.timestamps" + printf "Build started %s\n" "${ts_basetime_str}" > "${timestamps}" + printf "BASETIME_SECONDS %d\n" $ts_exec_shell >> "${timestamps}" + printf "TS_0 %d\n" $ts_0 >> "${timestamps}" + printf "TS_1 %d\n" $ts_1 >> "${timestamps}" + printf "TS_2 %d\n" $ts_2 >> "${timestamps}" + duration=$(ts_delta_seconds $ts_0 $ts_2) duration_str=$(ts_delta_string $ts_0 $ts_2) - junit " <testcase classname='${TESTRUN}${testclass/#/.}' name='$BUILD_NAME' time='$duration' >"
if [ $MAKE_FAILED -eq 0 ]; then @@ -452,6 +458,13 @@ sort "${build_dir}/config.h" | grep CONFIG_ > "${build_dir}/config.h.sorted" sha256sum "${build_dir}/config.h.sorted" >> "${checksum_file}_config" fi + + stats_files="${build_dir}/${timestamps}" + if [ -f ${build_dir}/ccache.stats ]; then + stats_files="${stats_files} ${build_dir}/ccache.stats" + fi + flock -F -w 0.1 $TARGET/.statslock tar -rf ${stats_archive} ${stats_files} + if [ "$clean_work" = "true" ]; then rm -rf "${build_dir}" fi @@ -914,6 +927,8 @@ FAILED_BOARDS="$(realpath ${TARGET}/failed_boards)" PASSED_BOARDS="$(realpath ${TARGET}/passing_boards)"
+stats_archive="$TARGET/statistics.tar" + # Generate a single xcompile for all boards export xcompile="${TARGET}/xcompile"
@@ -921,6 +936,9 @@ rm -f "${xcompile}" $MAKE -C"${ROOT}" obj="$TARGET/temp" objutil="$TARGET/sharedutils" UPDATED_SUBMODULES=1 "${xcompile}" || exit 1 rm -f "$FAILED_BOARDS" "$PASSED_BOARDS" + + # Initialize empty statistics archive + tar -cf "${stats_archive}" "${xcompile}" fi
USE_XARGS=0