From 907b0f8d24ac9e45e9488f4c1f7567dfa38d6c19 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 25 Feb 2026 16:44:39 -0500 Subject: [PATCH] tools/inspect-layers.sh: print total image size Show total compressed size alongside the layer count in the header. Assisted-by: Claude Opus 4 --- tools/inspect-layers.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/inspect-layers.sh b/tools/inspect-layers.sh index 70227d9..34ea7e0 100755 --- a/tools/inspect-layers.sh +++ b/tools/inspect-layers.sh @@ -131,12 +131,14 @@ if [[ "${sort_by}" == "stability" && "${using_history_fallback}" == "true" ]]; t exit 1 fi -# Count layers +# Count layers and total size layer_count=$(echo "${layer_data}" | jq -s 'length') +total_size_mb=$(echo "${layer_data}" | jq -s '[.[].size] | add' | awk '{printf "%.2f", $1 / 1024 / 1024}') echo "=== Chunkah Layer Breakdown ===" echo "" echo "Total layers: ${layer_count}" +echo "Total size: ${total_size_mb} MB" echo "" printf "%-12s %-10s %-60s\n" "Size (MB)" "Stability" "Components" printf "%-12s %-10s %-60s\n" "----------" "---------" "------------------------------------------------------------"