From 16674be8696e68d3b1a2f8ef9e479318ae152c70 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:47:03 -0700 Subject: [PATCH 01/35] bump moc --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index d4607e5..c310562 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -13,7 +13,7 @@ jobs: env: DFX_VERSION: 0.18.0 IC_REPL_VERSION: 0.7.0 - MOC_VERSION: 0.11.0 + MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 steps: From 44886d0c157ef7c2a6a9e8b1cb79b483f4ccfcc3 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:14:55 -0700 Subject: [PATCH 02/35] dfx 23 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index c310562..e906a8a 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.18.0 + DFX_VERSION: 0.23.0 IC_REPL_VERSION: 0.7.0 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From d7849cfe23cb198a6178fe18a0bde6d854e4655e Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:23:52 -0700 Subject: [PATCH 03/35] bump ic-repl --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index e906a8a..3a51b42 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false env: DFX_VERSION: 0.23.0 - IC_REPL_VERSION: 0.7.0 + IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 From b29dff6c5a74ac90e229991447fc7c7bb2f799a4 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:36:05 -0700 Subject: [PATCH 04/35] increase timeout --- .github/workflows/perf.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 3a51b42..0cc8608 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -62,9 +62,10 @@ jobs: dfx-version: ${{ env.DFX_VERSION }} - name: Install ic-repl, mops and moc run: | - wget https://github.com/chenyan2002/ic-repl/releases/download/$IC_REPL_VERSION/ic-repl-macos - cp ./ic-repl-macos /usr/local/bin/ic-repl - chmod a+x /usr/local/bin/ic-repl + #wget https://github.com/chenyan2002/ic-repl/releases/download/$IC_REPL_VERSION/ic-repl-macos + #cp ./ic-repl-macos /usr/local/bin/ic-repl + #chmod a+x /usr/local/bin/ic-repl + cargo install --git https://github.com/dfinity/ic-repl.git --branch increase-timeout npm i -g ic-mops dfx cache install cd $(dfx cache show) From 9a40a5d4bb9ae7f74a54d226e9ce1f6806bc6109 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:25:41 -0700 Subject: [PATCH 05/35] fix --- crypto/perf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 968ec0b..3624dc5 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -75,7 +75,7 @@ assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); let init_size = 10_000; -let res1 = perf_map(map_mo, "Motoko", init_size); +//let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique // assert res1 == res2; From 3b48e09e3ebec87da8d81acdda8b9973c87e0d67 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:59:19 -0700 Subject: [PATCH 06/35] dfx 22 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 0cc8608..6c589bf 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.23.0 + DFX_VERSION: 0.22.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From b988aff698185d3786f70753f414a1fbbf7ab52b Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:43:22 -0700 Subject: [PATCH 07/35] dfx 21 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 6c589bf..28315f0 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.22.0 + DFX_VERSION: 0.21.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From 694452ca275955fe4fe8ade0d98250bf2fa587f2 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:21:28 -0700 Subject: [PATCH 08/35] fix --- .github/workflows/perf.yml | 2 +- Makefile | 2 +- crypto/perf.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 28315f0..0cc8608 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.21.0 + DFX_VERSION: 0.23.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 diff --git a/Makefile b/Makefile index 6e335a9..cb0a153 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = dapps collections crypto pub-sub heartbeat motoko +APPS = dapps pub-sub heartbeat all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true diff --git a/crypto/perf.sh b/crypto/perf.sh index 3624dc5..968ec0b 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -75,7 +75,7 @@ assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); let init_size = 10_000; -//let res1 = perf_map(map_mo, "Motoko", init_size); +let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique // assert res1 == res2; From 9990062db0965da7fcd33b5f7e607257a9ab0955 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:23:05 -0700 Subject: [PATCH 09/35] fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cb0a153..dc48d68 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = dapps pub-sub heartbeat +APPS = dapps pub-sub heartbeat motoko all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true From 420bd76ce62b048ba2db099ffc13733e6cff05a3 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:16:51 -0700 Subject: [PATCH 10/35] reduce crypto size --- Makefile | 2 +- crypto/perf.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dc48d68..f7d1c7e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = dapps pub-sub heartbeat motoko +APPS = crypto dapps pub-sub heartbeat motoko all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true diff --git a/crypto/perf.sh b/crypto/perf.sh index 968ec0b..376d305 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -74,7 +74,7 @@ let res2 = perf_sha(sha_rs, "Rust"); assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -let init_size = 10_000; +let init_size = 8_000; let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique From e91385ae16be60142e6368162f6e7d6cd4590c11 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:47:59 -0700 Subject: [PATCH 11/35] fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f7d1c7e..6e335a9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = crypto dapps pub-sub heartbeat motoko +APPS = dapps collections crypto pub-sub heartbeat motoko all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true From 8785629afad3f47f71dadbdc59737ec4eff55664 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:27:36 -0700 Subject: [PATCH 12/35] try dfx 0.24 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 0cc8608..ff71011 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.23.0 + DFX_VERSION: 0.24.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From 7737c576d10a740ca75389ea48d787c1baa55565 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:16:54 -0700 Subject: [PATCH 13/35] fix --- Makefile | 2 +- collections/perf.sh | 35 ++++++++++++++--------------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 6e335a9..49cc295 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = dapps collections crypto pub-sub heartbeat motoko +APPS = collections all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true diff --git a/collections/perf.sh b/collections/perf.sh index 5c67c89..be34191 100644 --- a/collections/perf.sh +++ b/collections/perf.sh @@ -3,16 +3,16 @@ load "../prelude.sh"; // use smaller page_limit to speed things up, since the whole trace is too large even with 256M. let mo_config = record { start_page = 16; page_limit = 128 }; -let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", mo_config); -let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); -let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); +//let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", mo_config); +//let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); +//let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); let splay = wasm_profiling("motoko/.dfx/local/canisters/splay/splay.wasm", mo_config); -let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); -let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); -let heap = wasm_profiling("motoko/.dfx/local/canisters/heap/heap.wasm", mo_config); -let buffer = wasm_profiling("motoko/.dfx/local/canisters/buffer/buffer.wasm", mo_config); -let vector = wasm_profiling("motoko/.dfx/local/canisters/vector/vector.wasm", mo_config); - +//let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); +//let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); +//let heap = wasm_profiling("motoko/.dfx/local/canisters/heap/heap.wasm", mo_config); +//let buffer = wasm_profiling("motoko/.dfx/local/canisters/buffer/buffer.wasm", mo_config); +//let vector = wasm_profiling("motoko/.dfx/local/canisters/vector/vector.wasm", mo_config); +/* let rs_config = record { start_page = 1; page_limit = 128 }; let hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/hashmap/hashmap.wasm", rs_config); let btreemap_rs = wasm_profiling("rust/.dfx/local/canisters/btreemap/btreemap.wasm", rs_config); @@ -22,9 +22,7 @@ let heap_stable_rs = wasm_profiling("rust/.dfx/local/canisters/heap_stable/heap_ let imrc_hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/imrc_hashmap/imrc_hashmap.wasm", rs_config); let vector_rs = wasm_profiling("rust/.dfx/local/canisters/vector/vector.wasm", rs_config); let vector_stable_rs = wasm_profiling("rust/.dfx/local/canisters/vector_stable/vector_stable.wasm", rs_config); - -//let movm_rs = wasm_profiling("rust/.dfx/local/canisters/movm/movm.wasm"); -//let movm_dynamic_rs = wasm_profiling("rust/.dfx/local/canisters/movm_dynamic/movm_dynamic.wasm"); +*/ let file = "README.md"; @@ -66,10 +64,13 @@ function perf(wasm, title, init, batch) { let init_size = 1_000_000; let batch_size = 50; output(file, "\n## Map\n\n| |binary_size|generate 1m|max mem|batch_get 50|batch_put 50|batch_remove 50|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|--:|\n"); +/* perf(hashmap, "hashmap", init_size, batch_size); perf(triemap, "triemap", init_size, batch_size); perf(rbtree, "rbtree", init_size, batch_size); +*/ perf(splay, "splay", init_size, batch_size); +/* perf(btree, "btree", init_size, batch_size); perf(zhenya, "zhenya_hashmap", init_size, batch_size); perf(btreemap_rs, "btreemap_rs", init_size, batch_size); @@ -96,13 +97,5 @@ perf(heap_rs, "heap_rs", init_size, batch_size); perf(heap_stable_rs, "heap_stable_rs", init_size, batch_size); perf(vector_rs, "vec_rs", init_size, batch_size); perf(vector_stable_rs, "vec_stable_rs", init_size, batch_size); - -/* -let movm_size = 10000; -output(file, "\n## MoVM\n\n| |binary_size|generate 10k|max mem|batch_get 50|batch_put 50|batch_remove 50|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -perf(hashmap, "hashmap", movm_size); -perf(hashmap_rs, "hashmap_rs", movm_size); -perf(imrc_hashmap_rs, "imrc_hashmap_rs", movm_size); -perf(movm_rs, "movm_rs", movm_size); -perf(movm_dynamic_rs, "movm_dynamic_rs", movm_size); */ + From aac18798e7ebbd70094ec0eb83704b4011343d06 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:41:35 -0700 Subject: [PATCH 14/35] fix --- collections/perf.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/collections/perf.sh b/collections/perf.sh index be34191..bc8c34e 100644 --- a/collections/perf.sh +++ b/collections/perf.sh @@ -3,9 +3,9 @@ load "../prelude.sh"; // use smaller page_limit to speed things up, since the whole trace is too large even with 256M. let mo_config = record { start_page = 16; page_limit = 128 }; -//let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", mo_config); -//let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); -//let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); +let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", mo_config); +let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); +let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); let splay = wasm_profiling("motoko/.dfx/local/canisters/splay/splay.wasm", mo_config); //let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); //let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); @@ -64,11 +64,10 @@ function perf(wasm, title, init, batch) { let init_size = 1_000_000; let batch_size = 50; output(file, "\n## Map\n\n| |binary_size|generate 1m|max mem|batch_get 50|batch_put 50|batch_remove 50|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|--:|\n"); -/* + perf(hashmap, "hashmap", init_size, batch_size); perf(triemap, "triemap", init_size, batch_size); perf(rbtree, "rbtree", init_size, batch_size); -*/ perf(splay, "splay", init_size, batch_size); /* perf(btree, "btree", init_size, batch_size); From e8d039922f2e994e09b0595a9bbc97f5b3d8f7f1 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:41:33 -0700 Subject: [PATCH 15/35] bypass gateway --- Makefile | 2 +- utils.mk | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 49cc295..6e335a9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -APPS = collections +APPS = dapps collections crypto pub-sub heartbeat motoko all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true diff --git a/utils.mk b/utils.mk index 2f55440..2155744 100644 --- a/utils.mk +++ b/utils.mk @@ -35,14 +35,14 @@ endef define perf set -e; \ $(call prepare_perf,$(1)); \ - ic-repl ../../$(1)/$(2); \ + ic-repl -r http://localhost:$(dfx info replica-port) -v ../../$(1)/$(2); \ du -h ../../_out endef define perf_two set -e; \ $(call prepare_perf,$(1)); \ - ic-repl ../../$(1)/$(2); \ - ic-repl ../../$(1)/$(3); \ + ic-repl -r http://localhost:$(dfx info replica-port) -v ../../$(1)/$(2); \ + ic-repl -r http://localhost:$(dfx info replica-port) -v ../../$(1)/$(3); \ du -h ../../_out endef From 35fd0e136e2bf9adcd9528d1762ccb16c2e13985 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:55:25 -0700 Subject: [PATCH 16/35] fix --- utils.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.mk b/utils.mk index 2155744..9351299 100644 --- a/utils.mk +++ b/utils.mk @@ -35,14 +35,14 @@ endef define perf set -e; \ $(call prepare_perf,$(1)); \ - ic-repl -r http://localhost:$(dfx info replica-port) -v ../../$(1)/$(2); \ + ic-repl -r http://localhost:$$(dfx info replica-port) -v ../../$(1)/$(2); \ du -h ../../_out endef define perf_two set -e; \ $(call prepare_perf,$(1)); \ - ic-repl -r http://localhost:$(dfx info replica-port) -v ../../$(1)/$(2); \ - ic-repl -r http://localhost:$(dfx info replica-port) -v ../../$(1)/$(3); \ + ic-repl -r http://localhost:$$(dfx info replica-port) -v ../../$(1)/$(2); \ + ic-repl -r http://localhost:$$(dfx info replica-port) -v ../../$(1)/$(3); \ du -h ../../_out endef From 873a73a218772e58f02b9c3f85a81d43fd6d90d3 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:29:41 -0700 Subject: [PATCH 17/35] dfx 21 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index ff71011..28315f0 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.24.0 + DFX_VERSION: 0.21.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From 095cec05be9f58ba4a4ac35cc0bd2ef4b1dd1d1b Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:41:11 -0700 Subject: [PATCH 18/35] dfx 22, 21 gets 404 endpoint not found --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 28315f0..6c589bf 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.21.0 + DFX_VERSION: 0.22.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From d42f64065549dd8fb3bcad6da11e986ab5f1315f Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:12:33 -0700 Subject: [PATCH 19/35] dfx 21 with ic-repl 0.7 --- .github/workflows/perf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 6c589bf..e5fb651 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.22.0 - IC_REPL_VERSION: 0.7.5 + DFX_VERSION: 0.21.0 + IC_REPL_VERSION: 0.7.0 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 From 14f85855c378b86552807613e6c3e59aa3099c1a Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:25:58 -0700 Subject: [PATCH 20/35] dfx 20 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index e5fb651..8fddba3 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.21.0 + DFX_VERSION: 0.20.0 IC_REPL_VERSION: 0.7.0 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From a901e142f39fac32522b2616b377797dcd113e3a Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:39:50 -0700 Subject: [PATCH 21/35] dfx 19 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 8fddba3..8bd6bfc 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.20.0 + DFX_VERSION: 0.19.0 IC_REPL_VERSION: 0.7.0 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From 1f9e5ef94afffea7e0065bc2489f18ab9e6b5a4e Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:52:12 -0700 Subject: [PATCH 22/35] dfx 18 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 8bd6bfc..2eb44c7 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.19.0 + DFX_VERSION: 0.18.0 IC_REPL_VERSION: 0.7.0 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From ee5499f384b8894fc29f02909b9926d01c7a700a Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:11:57 -0700 Subject: [PATCH 23/35] add back gateway, dfx 22 --- .github/workflows/perf.yml | 4 ++-- utils.mk | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 2eb44c7..6c589bf 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.18.0 - IC_REPL_VERSION: 0.7.0 + DFX_VERSION: 0.22.0 + IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 diff --git a/utils.mk b/utils.mk index 9351299..c2688ba 100644 --- a/utils.mk +++ b/utils.mk @@ -35,14 +35,14 @@ endef define perf set -e; \ $(call prepare_perf,$(1)); \ - ic-repl -r http://localhost:$$(dfx info replica-port) -v ../../$(1)/$(2); \ + ic-repl -v ../../$(1)/$(2); \ du -h ../../_out endef define perf_two set -e; \ $(call prepare_perf,$(1)); \ - ic-repl -r http://localhost:$$(dfx info replica-port) -v ../../$(1)/$(2); \ - ic-repl -r http://localhost:$$(dfx info replica-port) -v ../../$(1)/$(3); \ + ic-repl -v ../../$(1)/$(2); \ + ic-repl -v ../../$(1)/$(3); \ du -h ../../_out endef From 39140aa72ce591d5cf9869c31e58ab513d5576ba Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:20:35 -0700 Subject: [PATCH 24/35] dfx 21 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 6c589bf..28315f0 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.22.0 + DFX_VERSION: 0.21.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 From 814b87eb4479de9dc6a34c6ccfb5a817eedf4375 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:25:13 -0700 Subject: [PATCH 25/35] moc 0.12.1 --- .github/workflows/perf.yml | 4 ++-- collections/perf.sh | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 28315f0..b690365 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,9 +11,9 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.21.0 + DFX_VERSION: 0.24.0 IC_REPL_VERSION: 0.7.5 - MOC_VERSION: 0.13.0 + MOC_VERSION: 0.12.1 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 steps: diff --git a/collections/perf.sh b/collections/perf.sh index bc8c34e..739345a 100644 --- a/collections/perf.sh +++ b/collections/perf.sh @@ -7,12 +7,12 @@ let hashmap = wasm_profiling("motoko/.dfx/local/canisters/hashmap/hashmap.wasm", let triemap = wasm_profiling("motoko/.dfx/local/canisters/triemap/triemap.wasm", mo_config); let rbtree = wasm_profiling("motoko/.dfx/local/canisters/rbtree/rbtree.wasm", mo_config); let splay = wasm_profiling("motoko/.dfx/local/canisters/splay/splay.wasm", mo_config); -//let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); -//let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); -//let heap = wasm_profiling("motoko/.dfx/local/canisters/heap/heap.wasm", mo_config); -//let buffer = wasm_profiling("motoko/.dfx/local/canisters/buffer/buffer.wasm", mo_config); -//let vector = wasm_profiling("motoko/.dfx/local/canisters/vector/vector.wasm", mo_config); -/* +let btree = wasm_profiling("motoko/.dfx/local/canisters/btreemap/btreemap.wasm", mo_config); +let zhenya = wasm_profiling("motoko/.dfx/local/canisters/zhenya_hashmap/zhenya_hashmap.wasm", mo_config); +let heap = wasm_profiling("motoko/.dfx/local/canisters/heap/heap.wasm", mo_config); +let buffer = wasm_profiling("motoko/.dfx/local/canisters/buffer/buffer.wasm", mo_config); +let vector = wasm_profiling("motoko/.dfx/local/canisters/vector/vector.wasm", mo_config); + let rs_config = record { start_page = 1; page_limit = 128 }; let hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/hashmap/hashmap.wasm", rs_config); let btreemap_rs = wasm_profiling("rust/.dfx/local/canisters/btreemap/btreemap.wasm", rs_config); @@ -22,7 +22,6 @@ let heap_stable_rs = wasm_profiling("rust/.dfx/local/canisters/heap_stable/heap_ let imrc_hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/imrc_hashmap/imrc_hashmap.wasm", rs_config); let vector_rs = wasm_profiling("rust/.dfx/local/canisters/vector/vector.wasm", rs_config); let vector_stable_rs = wasm_profiling("rust/.dfx/local/canisters/vector_stable/vector_stable.wasm", rs_config); -*/ let file = "README.md"; @@ -69,7 +68,6 @@ perf(hashmap, "hashmap", init_size, batch_size); perf(triemap, "triemap", init_size, batch_size); perf(rbtree, "rbtree", init_size, batch_size); perf(splay, "splay", init_size, batch_size); -/* perf(btree, "btree", init_size, batch_size); perf(zhenya, "zhenya_hashmap", init_size, batch_size); perf(btreemap_rs, "btreemap_rs", init_size, batch_size); @@ -96,5 +94,3 @@ perf(heap_rs, "heap_rs", init_size, batch_size); perf(heap_stable_rs, "heap_stable_rs", init_size, batch_size); perf(vector_rs, "vec_rs", init_size, batch_size); perf(vector_stable_rs, "vec_stable_rs", init_size, batch_size); -*/ - From 70b1d0769067b01ad804a6b132d6ee168fdd2771 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:18:07 -0700 Subject: [PATCH 26/35] dfx 23 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index b690365..b12ad07 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.24.0 + DFX_VERSION: 0.23.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.12.1 IC_WASM_VERSION: 0.7.0 From 5f39cec7979779a05560caab22e970b4391ca8ce Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:50:56 -0700 Subject: [PATCH 27/35] dfx 22 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index b12ad07..407d333 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.23.0 + DFX_VERSION: 0.22.0 IC_REPL_VERSION: 0.7.5 MOC_VERSION: 0.12.1 IC_WASM_VERSION: 0.7.0 From dfe90c99532708ba5eddb8c0153f5ae48e7dbcdd Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:20:44 -0700 Subject: [PATCH 28/35] try ubuntu --- .github/workflows/perf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 407d333..b4a6c5d 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -7,13 +7,13 @@ on: jobs: perf: - runs-on: macos-latest + runs-on: ubuntu-latest strategy: fail-fast: false env: - DFX_VERSION: 0.22.0 + DFX_VERSION: 0.24.0 IC_REPL_VERSION: 0.7.5 - MOC_VERSION: 0.12.1 + MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 steps: From 9e398721777073d3559390a10bf7848f4d23a8e4 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:41:33 -0700 Subject: [PATCH 29/35] fix --- .github/workflows/perf.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index b4a6c5d..f0e7e0c 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -69,10 +69,10 @@ jobs: npm i -g ic-mops dfx cache install cd $(dfx cache show) - wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-Darwin-x86_64-$MOC_VERSION.tar.gz - tar zxvf motoko-Darwin-x86_64-$MOC_VERSION.tar.gz - wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-macos - cp ./ic-wasm-macos /usr/local/bin/ic-wasm + wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-Linux-x86_64-$MOC_VERSION.tar.gz + tar zxvf motoko-Linux-x86_64-$MOC_VERSION.tar.gz + wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-linux64 + cp ./ic-wasm-linux64 /usr/local/bin/ic-wasm chmod a+x /usr/local/bin/ic-wasm - name: Setup system subnet and start dfx run: | From f9dd09ca32778d344dcba368141c7929fd196b64 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:08:48 -0700 Subject: [PATCH 30/35] moc 0.12.1 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index f0e7e0c..e5ce39a 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -13,7 +13,7 @@ jobs: env: DFX_VERSION: 0.24.0 IC_REPL_VERSION: 0.7.5 - MOC_VERSION: 0.13.0 + MOC_VERSION: 0.12.1 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 steps: From 2531d106676dd15841ff9ce51fab4a22e16a677a Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:30:04 -0700 Subject: [PATCH 31/35] reduce crypto size again --- crypto/perf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 376d305..bb65838 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -74,7 +74,7 @@ let res2 = perf_sha(sha_rs, "Rust"); assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -let init_size = 8_000; +let init_size = 6_000; let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique From a66ddd81c5ae6e9b13f346fba443580143ce8921 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:49:05 -0700 Subject: [PATCH 32/35] reduce crypto size again --- crypto/perf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index bb65838..ff54c27 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -74,7 +74,7 @@ let res2 = perf_sha(sha_rs, "Rust"); assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -let init_size = 6_000; +let init_size = 5_000; let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique From a868e42694b1fc2c429f2108554a9901607a45eb Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 2 Oct 2024 21:22:26 -0700 Subject: [PATCH 33/35] moc 0.13 --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index e5ce39a..f0e7e0c 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -13,7 +13,7 @@ jobs: env: DFX_VERSION: 0.24.0 IC_REPL_VERSION: 0.7.5 - MOC_VERSION: 0.12.1 + MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 steps: From e77c115783afbe286df6a31c8dc3fcb5d6052dc0 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Thu, 3 Oct 2024 07:30:41 -0700 Subject: [PATCH 34/35] reduce crypto size again --- crypto/perf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index ff54c27..7d9375a 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -74,7 +74,7 @@ let res2 = perf_sha(sha_rs, "Rust"); assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -let init_size = 5_000; +let init_size = 2_000; let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique From 1e5d1424db7a10ce46847fd11c4052f26c7e937e Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:50:05 -0700 Subject: [PATCH 35/35] reduce crypto size again --- crypto/perf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 7d9375a..dda3aa2 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -74,7 +74,7 @@ let res2 = perf_sha(sha_rs, "Rust"); assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -let init_size = 2_000; +let init_size = 1_000; let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique