tool(build-time): add total build time This can probably go in "auto-commit" (what an awful name...) since it takes like no time to calculate.
shwarp
Mon, 26 Oct 2026 18:34:23 -0400
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
build-time
→
build-time
@@ -43,3 +43,8 @@ ((i++))
done echo "Active build time: $(date -ud "@$build_seconds" +"$(( $build_seconds/3600/24 )) days %H hours %M minutes %S seconds") (estimated)" + +head_timestamp=$(git -C "$GIT_DIR" log --format=format:%at | head -1) +tail_timestamp=$(git -C "$GIT_DIR" log --format=format:%at | tail -1) +total_build_seconds=$(echo "${head_timestamp}-${tail_timestamp}" | bc) +echo "Total build time: $(date -ud "@$total_build_seconds" +"$(( $total_build_seconds/3600/24 )) days %H hours %M minutes %S seconds")"