mirror of
https://github.com/coreos/chunkah.git
synced 2026-11-03 21:49:44 -09:00
tools/inspect-layers.sh: print total image size
Show total compressed size alongside the layer count in the header. Assisted-by: Claude Opus 4
This commit is contained in:
parent
a0ff54a7bd
commit
907b0f8d24
1 changed files with 3 additions and 1 deletions
|
|
@ -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" "----------" "---------" "------------------------------------------------------------"
|
||||
|
|
|
|||
Loading…
Reference in a new issue