diff options
Diffstat (limited to 'check-size.sh')
-rwxr-xr-x | check-size.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/check-size.sh b/check-size.sh index dca7d0b..ea4ecde 100755 --- a/check-size.sh +++ b/check-size.sh @@ -5,3 +5,6 @@ cd examples/wasm-minipng && cargo b --release && cd ../.. && wasm-opt --strip-de cd examples/wasm-png && cargo b --release && cd ../.. && wasm-opt --strip-debug -Oz examples/wasm-png/target/wasm32-unknown-unknown/release/wasm_png.wasm -o target/png.wasm && gzip -k -f target/png.wasm || exit 1 wc -c target/png.wasm.gz target/minipng.wasm.gz | head -n2 +pngsz=$(wc -c target/png.wasm.gz | cut -d' ' -f1) +minipngsz=$(wc -c target/minipng.wasm.gz | cut -d' ' -f1) +echo 'Ratio: '$(python3 -c "print($pngsz / $minipngsz)") |