From ee5a2b29a9cfcf71c0202cdb9615e0873ff5281a Mon Sep 17 00:00:00 2001 From: Miguel Fernandez Date: Tue, 16 Jan 2024 18:28:46 +0100 Subject: [PATCH] Simplify size script --- .gitignore | 1 - .size_previous.txt | 1 + Makefile | 9 +-------- 3 files changed, 2 insertions(+), 9 deletions(-) create mode 100644 .size_previous.txt diff --git a/.gitignore b/.gitignore index 5e52399060f2..739ad7005546 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ prisma-gpg-private.asc .test_config *.pending-snap .pending.md -.size_previous.txt *.class *.log diff --git a/.size_previous.txt b/.size_previous.txt new file mode 100644 index 000000000000..3f3a5018c4d0 --- /dev/null +++ b/.size_previous.txt @@ -0,0 +1 @@ +0.000MB diff --git a/Makefile b/Makefile index 0413ff3f7739..a8f1eb1062ef 100644 --- a/Makefile +++ b/Makefile @@ -338,14 +338,7 @@ endif .PHONY: measure-qe-wasm measure-qe-wasm: build-qe-wasm @cd query-engine/query-engine-wasm/pkg; \ - gzip -c query_engine_bg.wasm | wc -c | awk '{$$1/=(1024*1024); printf "%.3fMB\n", $$1}' > .size_current.txt; \ - if [ ! -f .size_previous.txt ]; then \ - echo "0MB" > .size_previous.txt; \ - fi; \ - echo "Previous size: `cat .size_previous.txt`"; \ - echo "Current size: `cat .size_current.txt`"; \ - awk '{print $$1}' .size_previous.txt .size_current.txt | paste -d" " - - | awk '{printf "Increment: %.3fMB\n", $$2 - $$1}'; \ - mv .size_current.txt .size_previous.txt; \ + gzip -k -c query_engine_bg.wasm | wc -c | awk '{$$1/=(1024*1024); printf "Current wasm query-engine size compressed: %.3fMB\n", $$1}' build-driver-adapters-kit: build-driver-adapters cd query-engine/driver-adapters && pnpm i && pnpm build