all repos — shwarp-tools @ a791a2217ece065aea5652e46ee9892c69832dbb

Tools and scripts

tool(build-time): show build and break times

Also while it's actually counting... This might be totally silly, and
it's defo not reusable. But anyway, at least now I have my silliness in
the history, so I can remove it while keeping the reference.

I love git!! I love version acephalous control!
shwarp
Mon, 26 Oct 2026 18:42:09 -0400
commit

a791a2217ece065aea5652e46ee9892c69832dbb

parent

77df99743caa79c3c68a9a95e67477f5d1542465

1 files changed, 10 insertions(+), 0 deletions(-)

jump to
M build-time → build-time

@@ -14,7 +14,12 @@

max_break_minutes=30 max_break_seconds=$((max_break_minutes*60)) +echo -e "changes\tbld t\tbrk t\tbreaks" +echo "===============================================" + i=$((0)) +breaks=$((0)) +break_seconds=$((0)) build_seconds=$((0)) build_intervals=() for timestamp in $(git -C "$GIT_DIR" log --reverse --format=format:%at)

@@ -36,12 +41,17 @@ ((build_seconds+=$seconds))

else break_seconds=$(echo "(${timestamp}-${prev_timestamp})" | bc) + + ((breaks++)) fi + + echo -ne "\r${i}\t${build_seconds}\t${break_seconds}\t${breaks}" fi ((i++)) done +echo 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)