more clear

This commit is contained in:
goldsquid
2025-12-19 13:10:27 +07:00
parent 25c2f8c101
commit 4b1de78b84
2 changed files with 5 additions and 7 deletions

View File

@@ -54,6 +54,9 @@ done
total=$(echo "$(( total_size * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f") 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") 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 "Total static: $static"
echo "static: $static" echo "Total: $total"
echo "Dynamic: $dynamic"

View File

@@ -30,10 +30,5 @@ for key in $keys; do
done < static-file-path-list.txt done < static-file-path-list.txt
done 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") ratio=$(bc -l <<< "scale=2; $static_size/$total_size")
echo "$ratio" echo "$ratio"