diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index d4607e57..f0e7e0cf 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.18.0 - IC_REPL_VERSION: 0.7.0 - MOC_VERSION: 0.11.0 + DFX_VERSION: 0.24.0 + IC_REPL_VERSION: 0.7.5 + MOC_VERSION: 0.13.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 steps: @@ -62,16 +62,17 @@ 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) - 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: | diff --git a/collections/perf.sh b/collections/perf.sh index 5c67c89c..739345ac 100644 --- a/collections/perf.sh +++ b/collections/perf.sh @@ -23,9 +23,6 @@ let imrc_hashmap_rs = wasm_profiling("rust/.dfx/local/canisters/imrc_hashmap/imr 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"; function perf(wasm, title, init, batch) { @@ -66,6 +63,7 @@ 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); @@ -96,13 +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); - -/* -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); -*/ diff --git a/crypto/perf.sh b/crypto/perf.sh index 968ec0b5..dda3aa2c 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 = 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 diff --git a/utils.mk b/utils.mk index 2f55440c..c2688bad 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 -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 -v ../../$(1)/$(2); \ + ic-repl -v ../../$(1)/$(3); \ du -h ../../_out endef