diff --git a/show-size.sh b/show-size.sh index 3f35aa97..3e987be7 100755 --- a/show-size.sh +++ b/show-size.sh @@ -54,6 +54,9 @@ done total=$(echo "$(( total_size * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f") static=$(echo $(echo "$static_size * 1024" | bc) | numfmt --to=iec --suffix=B --format="%.2f") +dynamic_kb=$(echo "$total_size - $static_size" | bc) +dynamic=$(echo $(echo "$dynamic_kb * 1024" | bc) | numfmt --to=iec --suffix=B --format="%.2f") -echo "total: $total" -echo "static: $static" +echo "Total static: $static" +echo "Total: $total" +echo "Dynamic: $dynamic" diff --git a/show-static-file-size.sh b/show-static-file-size.sh index 49f1be66..3f1ac802 100755 --- a/show-static-file-size.sh +++ b/show-static-file-size.sh @@ -30,10 +30,5 @@ for key in $keys; do done < static-file-path-list.txt done -# Print total static size to stderr -static_total_formatted=$(echo "$(( static_size * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f") -echo "---" >&2 -echo "Total static: $static_total_formatted" >&2 - ratio=$(bc -l <<< "scale=2; $static_size/$total_size") echo "$ratio"