From 96c6e323768390412ee5206eb143c80fdae006c4 Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Mon, 12 Feb 2024 11:54:00 +0100 Subject: [PATCH 1/5] feat: use canbench for benchmarks --- .github/workflows/benchmark_ci.sh | 19 - .../canbench_ci_post_run_benchmark.sh | 6 + .../workflows/canbench_ci_run_benchmark.sh | 79 + .github/workflows/ci.yml | 30 +- Cargo.lock | 1238 +---------- Cargo.toml | 12 +- benchmarks/Cargo.toml | 4 +- benchmarks/src/btreemap.rs | 176 +- benchmarks/src/memory_manager.rs | 14 +- benchmarks/src/vec.rs | 34 +- canbench-bin/Cargo.toml | 21 - canbench-bin/src/lib.rs | 281 --- canbench-bin/src/main.rs | 71 - canbench-rs-macros/Cargo.lock | 1808 ----------------- canbench-rs-macros/Cargo.toml | 13 - canbench-rs-macros/src/lib.rs | 54 - canbench-rs/Cargo.lock | 1808 ----------------- canbench-rs/Cargo.toml | 17 - canbench-rs/src/lib.rs | 97 - canbench_results.yml | 1146 ++++++----- src/btreemap.rs | 4 +- 21 files changed, 873 insertions(+), 6059 deletions(-) delete mode 100755 .github/workflows/benchmark_ci.sh create mode 100644 .github/workflows/canbench_ci_post_run_benchmark.sh create mode 100644 .github/workflows/canbench_ci_run_benchmark.sh delete mode 100644 canbench-bin/Cargo.toml delete mode 100644 canbench-bin/src/lib.rs delete mode 100644 canbench-bin/src/main.rs delete mode 100644 canbench-rs-macros/Cargo.lock delete mode 100644 canbench-rs-macros/Cargo.toml delete mode 100644 canbench-rs-macros/src/lib.rs delete mode 100644 canbench-rs/Cargo.lock delete mode 100644 canbench-rs/Cargo.toml delete mode 100644 canbench-rs/src/lib.rs diff --git a/.github/workflows/benchmark_ci.sh b/.github/workflows/benchmark_ci.sh deleted file mode 100755 index 8e0c71a7..00000000 --- a/.github/workflows/benchmark_ci.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -set -Eexuo pipefail - -# Install canbench -cargo install --path ./canbench-bin - -BENCH_OUTPUT=$(canbench) - -set +e -REGRESSIONS=$( echo "$BENCH_OUTPUT" | grep -c "regressed by" ) -set -e - -if [[ $REGRESSIONS != 0 ]]; then - echo "FAIL! Performance regressions are detected. - Please run \"cargo bench -- --persist\" to update \"results.yml\"" - exit 1 -fi - -echo "SUCCESS! Performance regressions are not detected." diff --git a/.github/workflows/canbench_ci_post_run_benchmark.sh b/.github/workflows/canbench_ci_post_run_benchmark.sh new file mode 100644 index 00000000..ec937396 --- /dev/null +++ b/.github/workflows/canbench_ci_post_run_benchmark.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -Eexuo pipefail + +if [ "$EXIT_STATUS" -eq 1 ]; then + exit 1 +fi diff --git a/.github/workflows/canbench_ci_run_benchmark.sh b/.github/workflows/canbench_ci_run_benchmark.sh new file mode 100644 index 00000000..64be66c8 --- /dev/null +++ b/.github/workflows/canbench_ci_run_benchmark.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +set -Eexuo pipefail + +# Script that runs `canbench` at a given directory and outputs a comment +# that is intended to be posted on the pull request. + +# Path to run `canbench` from. +CANISTER_PATH=$1 + +# Must match the file specified in the github action. +COMMENT_MESSAGE_PATH=/tmp/canbench_comment_message.txt + +# Github CI is expected to have the main branch checked out in this folder. +MAIN_BRANCH_DIR=_canbench_main_branch + +CANBENCH_OUTPUT=/tmp/canbench_output.txt + +CANBENCH_RESULTS_FILE="$CANISTER_PATH/canbench_results.yml" +MAIN_BRANCH_RESULTS_FILE="$MAIN_BRANCH_DIR/$CANBENCH_RESULTS_FILE" + +# Install canbench +cargo install canbench + +# Verify that canbench results are available. +if [ ! -f "$CANBENCH_RESULTS_FILE" ]; then + echo "$CANBENCH_RESULTS_FILE not found. Did you forget to run \`canbench --persist\`?"; + exit 1 +fi + +# Detect if canbench results file is up to date. +pushd "$CANISTER_PATH" +canbench --less-verbose > $CANBENCH_OUTPUT +if grep -q "(regress\|(improved by \|(new)" "$CANBENCH_OUTPUT"; then + UPDATED_MSG="**\`$CANBENCH_RESULTS_FILE\` is not up to date ❌** + If the performance change is expected, run \`canbench --persist\` to save the updated benchmark results."; + + # canbench results file not up to date. Fail the job. + echo "EXIT_STATUS=1" >> "$GITHUB_ENV" +else + UPDATED_MSG="**\`$CANBENCH_RESULTS_FILE\` is up to date ✅**"; + + # canbench results file is up to date. The job succeeds. + echo "EXIT_STATUS=0" >> "$GITHUB_ENV" +fi +popd + + +echo "# \`canbench\` 🏋" > $COMMENT_MESSAGE_PATH + +# Detect if there are performance changes relative to the main branch. +if [ -f "$MAIN_BRANCH_RESULTS_FILE" ]; then + # Move the results of the main branch into the current branch. + mv "$MAIN_BRANCH_RESULTS_FILE" "$CANBENCH_RESULTS_FILE" + + # Run canbench to compare result to main branch. + pushd "$CANISTER_PATH" + canbench --less-verbose > $CANBENCH_OUTPUT + popd + + if grep -q "(regress\|(improved by" "${CANBENCH_OUTPUT}"; then + echo "**Significant performance change detected! ⚠️** + " >> $COMMENT_MESSAGE_PATH; + else + echo "**No significant performance changes detected ✅** + " >> $COMMENT_MESSAGE_PATH + fi +fi + +## Add the output of canbench to the file. +{ + echo "$UPDATED_MSG" + echo "" + echo "\`\`\`" + cat "$CANBENCH_OUTPUT" + echo "\`\`\`" +} >> $COMMENT_MESSAGE_PATH + +# Output the comment to stdout. +cat $COMMENT_MESSAGE_PATH diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de0dcfcf..c6fe0ce8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,10 +72,20 @@ jobs: bash examples/test.sh benchmark: - runs-on: ubuntu-20.04 - + runs-on: ubuntu-latest + needs: build + env: + PROJECT_DIR: . steps: - - uses: actions/checkout@v3 + - name: Checkout current PR + uses: actions/checkout@v4 + + - name: Checkout master branch + uses: actions/checkout@v4 + with: + ref: master + path: _canbench_main_branch + - uses: actions/cache@v3 with: path: | @@ -90,9 +100,19 @@ jobs: rustup default ${{ matrix.rust }} rustup target add wasm32-unknown-unknown - - name: Run benchmark test + - name: Benchmark + run: | + bash .github/workflows/canbench_ci_run_benchmark.sh $PROJECT_DIR + + - name: Post comment + uses: thollander/actions-comment-pull-request@v2 + with: + filePath: /tmp/canbench_comment_message.txt + comment_tag: ${{ env.PROJECT_DIR }} + + - name: Pass or fail run: | - bash .github/workflows/benchmark_ci.sh + bash .github/workflows/canbench_ci_post_run_benchmark.sh checks-pass: # Always run this job! diff --git a/Cargo.lock b/Cargo.lock index e82cd976..8f2ec96d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,69 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "anstream" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" version = "1.0.79" @@ -77,49 +14,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "benchmarks" version = "0.1.0" dependencies = [ - "canbench", + "canbench-rs", "candid", "ic-cdk", "ic-cdk-macros", @@ -188,12 +93,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - [[package]] name = "byteorder" version = "1.5.0" @@ -201,79 +100,56 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "bytes" -version = "1.5.0" +name = "canbench-rs" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "canbench" -version = "0.1.0" +checksum = "fe5d551419a1547b5064111df7bfa6e87818750e7f6df611067a02e63a9cbb31" dependencies = [ - "canbench-macros", + "canbench-rs-macros", "candid", "ic-cdk", - "maplit", "serde", ] [[package]] -name = "canbench-bin" -version = "0.1.0" -dependencies = [ - "canbench", - "candid", - "clap", - "colored", - "flate2", - "hex", - "reqwest", - "serde_yaml", - "sha256", - "tempfile", - "wasmparser", -] - -[[package]] -name = "canbench-macros" +name = "canbench-rs-macros" version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5acd4a41fd2e7018508f7442d7ae90957a913c6fa0e4b767e5be9a8cc5848c8" dependencies = [ + "proc-macro2", "quote", "syn 1.0.109", ] [[package]] name = "candid" -version = "0.9.11" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c1ce01d8089ee5b49ba20d3a9da15a28bba64c35cdff2aa256d37e319625d" +checksum = "182543fbc03b4ad0bfc384e6b68346e0b0aad0b11d075b71b4fcaa5d07f8862c" dependencies = [ "anyhow", "binread", "byteorder", "candid_derive", - "codespan-reporting", - "crc32fast", - "data-encoding", "hex", + "ic_principal", "leb128", "num-bigint", "num-traits", - "num_enum", "paste", "pretty", "serde", "serde_bytes", - "sha2", "stacker", "thiserror", ] [[package]] name = "candid_derive" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201ea498d901add0822653ac94cb0f8a92f9b1758a5273f4dafbb6673c9a5020" +checksum = "970c220da8aa2fa6f7ef5dbbf3ea5b620a59eb3ac107cfb95ae8c6eebdfb7a08" dependencies = [ "lazy_static", "proc-macro2", @@ -296,88 +172,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "clap" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - [[package]] name = "cpufeatures" version = "0.2.12" @@ -428,21 +222,6 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "errno" version = "0.3.8" @@ -450,7 +229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -459,94 +238,12 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -568,131 +265,17 @@ dependencies = [ "wasi", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" - [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "ic-cdk" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d4c0b932bf454d5d60e61e13c3c944972fcfd74dc82b9ed5c8b0a75979cf50" +checksum = "9f3d204af0b11c45715169c997858edb58fa8407d08f4fae78a6b415dd39a362" dependencies = [ "candid", "ic-cdk-macros", @@ -703,9 +286,9 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.7.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c0dd4c149132b68e679274d397053332ee29996c6a541075895881916333b" +checksum = "a5a618e4020cea88e933d8d2f8c7f86d570ec06213506a80d4f2c520a9bba512" dependencies = [ "candid", "proc-macro2", @@ -719,7 +302,7 @@ dependencies = [ name = "ic-stable-structures" version = "0.6.2" dependencies = [ - "canbench", + "canbench-rs", "candid", "hex", "ic-cdk", @@ -733,55 +316,21 @@ dependencies = [ [[package]] name = "ic0" -version = "0.18.11" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576c539151d4769fb4d1a0c25c4108dd18facd04c5695b02cf2d226ab4e43aa5" +checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" [[package]] name = "ic_principal" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ - "wasm-bindgen", + "crc32fast", + "data-encoding", + "serde", + "sha2", + "thiserror", ] [[package]] @@ -814,12 +363,6 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - [[package]] name = "maplit" version = "1.0.2" @@ -827,58 +370,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" +name = "num-bigint" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ @@ -908,126 +401,12 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl" -version = "0.10.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1045,16 +424,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - [[package]] name = "proc-macro2" version = "1.0.78" @@ -1162,50 +531,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "reqwest" -version = "0.11.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - [[package]] name = "rustix" version = "0.38.30" @@ -1216,7 +541,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1237,50 +562,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - [[package]] name = "serde" version = "1.0.195" @@ -1310,17 +591,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "itoa", - "ryu", - "serde", -] - [[package]] name = "serde_tokenstream" version = "0.1.7" @@ -1332,31 +602,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "sha2" version = "0.10.8" @@ -1368,38 +613,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha256" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" -dependencies = [ - "async-trait", - "bytes", - "hex", - "sha2", - "tokio", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "stacker" version = "0.1.15" @@ -1413,12 +626,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "structmeta" version = "0.2.0" @@ -1464,27 +671,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tempfile" version = "3.9.0" @@ -1495,16 +681,7 @@ dependencies = [ "fastrand", "redox_syscall", "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", + "windows-sys", ] [[package]] @@ -1545,109 +722,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d63628286617a0c67ee3c4ef92ccf62044e3813ed7376bb82a4586d2ff7974dd" -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "typed-arena" version = "2.0.2" @@ -1666,62 +740,18 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" @@ -1737,108 +767,12 @@ dependencies = [ "libc", ] -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasm-bindgen" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" - -[[package]] -name = "wasmparser" -version = "0.119.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c35daf77afb4f9b14016625144a391085ec2ca99ca9cc53ed291bb53ab5278d" -dependencies = [ - "bitflags 2.4.2", - "indexmap", - "semver", -] - -[[package]] -name = "web-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "winapi" version = "0.3.9" @@ -1855,52 +789,19 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -1909,114 +810,53 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] diff --git a/Cargo.toml b/Cargo.toml index 4334e063..4772ae20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,8 @@ repository = "https://github.com/dfinity/stable-structures" [dependencies] ic_principal = { version = "0.1.1", default-features = false } -# An optional dependency to profile parts of the code. -canbench = { path = "./canbench-rs", optional = true } +# An optional dependency to benchmark parts of the code. +canbench-rs = { version = "0.1.1", optional = true } [dev-dependencies] candid.workspace = true @@ -27,9 +27,9 @@ tempfile = "3.3.0" test-strategy = "0.3.1" [workspace] -members = ["benchmarks", "canbench-bin", "canbench-rs", "canbench-rs-macros"] +members = ["benchmarks"] [workspace.dependencies] -candid = "0.9.11" -ic-cdk = "0.10.0" -ic-cdk-macros = "0.7.1" +candid = "0.10.3" +ic-cdk = "0.12.1" +ic-cdk-macros = "0.8.4" diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 58d71982..d3437d8b 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -canbench = { path = "../canbench-rs" } +canbench-rs = "0.1.1" candid.workspace = true ic-cdk.workspace = true ic-cdk-macros.workspace = true -ic-stable-structures = { path = "../", features = ["canbench"] } +ic-stable-structures = { path = "../", features = ["canbench-rs"] } maplit = "1.0.2" serde = "1.0" tiny-rng = "0.2.0" diff --git a/benchmarks/src/btreemap.rs b/benchmarks/src/btreemap.rs index 868dbd91..3af06f37 100644 --- a/benchmarks/src/btreemap.rs +++ b/benchmarks/src/btreemap.rs @@ -1,205 +1,205 @@ use crate::Random; -use canbench::{benchmark, macros::bench, BenchResult}; +use canbench_rs::{bench, bench_fn, BenchResult}; use ic_stable_structures::{storable::Blob, BTreeMap, DefaultMemoryImpl, Storable}; use tiny_rng::{Rand, Rng}; -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_4_1024() -> BenchResult { insert_blob_helper::<4, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_4_1024_v2() -> BenchResult { insert_blob_helper_v2::<4, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_8_1024() -> BenchResult { insert_blob_helper::<8, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_8_1024_v2() -> BenchResult { insert_blob_helper_v2::<8, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_16_1024() -> BenchResult { insert_blob_helper::<16, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_16_1024_v2() -> BenchResult { insert_blob_helper_v2::<16, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_32_1024() -> BenchResult { insert_blob_helper::<32, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_32_1024_v2() -> BenchResult { insert_blob_helper_v2::<32, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_64_1024() -> BenchResult { insert_blob_helper::<64, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_64_1024_v2() -> BenchResult { insert_blob_helper_v2::<64, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_128_1024() -> BenchResult { insert_blob_helper::<128, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_128_1024_v2() -> BenchResult { insert_blob_helper_v2::<128, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_256_1024() -> BenchResult { insert_blob_helper::<256, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_256_1024_v2() -> BenchResult { insert_blob_helper_v2::<256, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_512_1024() -> BenchResult { insert_blob_helper::<512, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_512_1024_v2() -> BenchResult { insert_blob_helper_v2::<512, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_4() -> BenchResult { insert_blob_helper::<1024, 4>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_4_v2() -> BenchResult { insert_blob_helper_v2::<1024, 4>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_8() -> BenchResult { insert_blob_helper::<1024, 8>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_8_v2() -> BenchResult { insert_blob_helper_v2::<1024, 8>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_16() -> BenchResult { insert_blob_helper::<1024, 16>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_16_v2() -> BenchResult { insert_blob_helper_v2::<1024, 16>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_32() -> BenchResult { insert_blob_helper::<1024, 32>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_32_v2() -> BenchResult { insert_blob_helper_v2::<1024, 32>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_64() -> BenchResult { insert_blob_helper::<1024, 64>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_64_v2() -> BenchResult { insert_blob_helper_v2::<1024, 64>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_128() -> BenchResult { insert_blob_helper::<1024, 128>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_128_v2() -> BenchResult { insert_blob_helper_v2::<1024, 128>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_256() -> BenchResult { insert_blob_helper::<1024, 256>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_256_v2() -> BenchResult { insert_blob_helper_v2::<1024, 256>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_512() -> BenchResult { insert_blob_helper::<1024, 512>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_1024_512_v2() -> BenchResult { insert_blob_helper_v2::<1024, 512>() } -#[bench] +#[bench(raw)] pub fn btreemap_insert_u64_u64() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); insert_helper::(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_insert_u64_u64_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); insert_helper::(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_insert_u64_blob_8() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); insert_helper::>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_insert_u64_blob_8_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); insert_helper::>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_8_u64() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); insert_helper::, u64>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_insert_blob_8_u64_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); insert_helper::, u64>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_insert_10mib_values() -> BenchResult { let mut btree = BTreeMap::new(DefaultMemoryImpl::default()); @@ -210,7 +210,7 @@ pub fn btreemap_insert_10mib_values() -> BenchResult { values.push(rng.iter(Rand::rand_u8).take(10 * 1024).collect::>()); } - benchmark(|| { + bench_fn(|| { let mut i = 0u64; for value in values.into_iter() { btree.insert(i, value); @@ -220,231 +220,231 @@ pub fn btreemap_insert_10mib_values() -> BenchResult { } /// Benchmarks removing keys from a BTreeMap. -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_4_1024() -> BenchResult { remove_blob_helper::<4, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_4_1024_v2() -> BenchResult { remove_blob_helper_v2::<4, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_8_1024() -> BenchResult { remove_blob_helper::<8, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_8_1024_v2() -> BenchResult { remove_blob_helper_v2::<8, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_16_1024() -> BenchResult { remove_blob_helper::<16, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_16_1024_v2() -> BenchResult { remove_blob_helper_v2::<16, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_32_1024() -> BenchResult { remove_blob_helper::<32, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_32_1024_v2() -> BenchResult { remove_blob_helper_v2::<32, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_64_1024() -> BenchResult { remove_blob_helper::<64, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_64_1024_v2() -> BenchResult { remove_blob_helper_v2::<64, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_128_1024() -> BenchResult { remove_blob_helper::<128, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_128_1024_v2() -> BenchResult { remove_blob_helper_v2::<128, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_256_1024() -> BenchResult { remove_blob_helper::<256, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_256_1024_v2() -> BenchResult { remove_blob_helper_v2::<256, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_512_1024() -> BenchResult { remove_blob_helper::<512, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_512_1024_v2() -> BenchResult { remove_blob_helper_v2::<512, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_remove_u64_u64() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); remove_helper::(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_remove_u64_u64_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); remove_helper::(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_remove_u64_blob_8() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); remove_helper::>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_remove_u64_blob_8_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); remove_helper::>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_8_u64() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); remove_helper::, u64>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_remove_blob_8_u64_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); remove_helper::, u64>(btree) } /// Benchmarks getting keys from a BTreeMap. -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_4_1024() -> BenchResult { get_blob_helper::<4, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_4_1024_v2() -> BenchResult { get_blob_helper_v2::<4, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_8_1024() -> BenchResult { get_blob_helper::<8, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_8_1024_v2() -> BenchResult { get_blob_helper_v2::<8, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_16_1024() -> BenchResult { get_blob_helper::<16, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_16_1024_v2() -> BenchResult { get_blob_helper_v2::<16, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_32_1024() -> BenchResult { get_blob_helper::<32, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_32_1024_v2() -> BenchResult { get_blob_helper_v2::<32, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_64_1024() -> BenchResult { get_blob_helper::<64, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_64_1024_v2() -> BenchResult { get_blob_helper_v2::<64, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_128_1024() -> BenchResult { get_blob_helper::<128, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_128_1024_v2() -> BenchResult { get_blob_helper_v2::<128, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_256_1024() -> BenchResult { get_blob_helper::<256, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_256_1024_v2() -> BenchResult { get_blob_helper_v2::<256, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_512_1024() -> BenchResult { get_blob_helper::<512, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_512_1024_v2() -> BenchResult { get_blob_helper_v2::<512, 1024>() } -#[bench] +#[bench(raw)] pub fn btreemap_get_u64_u64() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); get_helper::(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_get_u64_u64_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); get_helper::(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_get_u64_blob_8() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); get_helper::>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_get_u64_blob_8_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); get_helper::>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_8_u64() -> BenchResult { let btree = BTreeMap::new_v1(DefaultMemoryImpl::default()); get_helper::, u64>(btree) } -#[bench] +#[bench(raw)] pub fn btreemap_get_blob_8_u64_v2() -> BenchResult { let btree = BTreeMap::new(DefaultMemoryImpl::default()); get_helper::, u64>(btree) @@ -475,7 +475,7 @@ fn insert_helper( random_values.push(V::random(&mut rng)); } - benchmark(|| { + bench_fn(|| { // Insert the keys into the btree. for (k, v) in random_keys.into_iter().zip(random_values.into_iter()) { btree.insert(k, v); @@ -513,7 +513,7 @@ fn get_helper( } // Get all the keys from the map. - benchmark(|| { + bench_fn(|| { for k in random_keys.into_iter() { btree.get(&k).unwrap(); } @@ -549,7 +549,7 @@ fn remove_helper( btree.insert(k.clone(), v); } - benchmark(|| { + bench_fn(|| { // Remove the keys from the btree. for k in random_keys.into_iter() { btree.remove(&k); diff --git a/benchmarks/src/memory_manager.rs b/benchmarks/src/memory_manager.rs index 8bd93ca1..53497d02 100644 --- a/benchmarks/src/memory_manager.rs +++ b/benchmarks/src/memory_manager.rs @@ -1,4 +1,4 @@ -use canbench::{benchmark, macros::bench, BenchResult}; +use canbench_rs::{bench_fn, bench, BenchResult}; use ic_stable_structures::memory_manager::{MemoryId, MemoryManager}; use ic_stable_structures::{DefaultMemoryImpl, Memory}; @@ -7,7 +7,7 @@ const MB: usize = 1024 * 1024; const MB_IN_PAGES: usize = MB / WASM_PAGE_SIZE; /// Benchmarks accessing stable memory without using a `MemoryManager` to establish a baseline. -#[bench] +#[bench(raw)] pub fn memory_manager_baseline() -> BenchResult { // A buffer of 100MiB. let buf_size = 100 * MB; @@ -15,7 +15,7 @@ pub fn memory_manager_baseline() -> BenchResult { let mut buf = vec![0; buf_size]; let memory = DefaultMemoryImpl::default(); - benchmark(|| { + bench_fn(|| { // Write the buffer 5 times consecutively in memory. for i in 0..5 { memory.grow(buf_size_in_pages); @@ -32,7 +32,7 @@ pub fn memory_manager_baseline() -> BenchResult { /// Benchmarks the `MemoryManager` by writing a 100MiB buffer to 5 memories. /// The virtual memories of the `MemoryManager` are written in small chunks so that they are /// interleaved in the underlying stable memory. -#[bench] +#[bench(raw)] pub fn memory_manager_overhead() -> BenchResult { // A buffer of 100MiB. let num_chunks = 100; @@ -41,7 +41,7 @@ pub fn memory_manager_overhead() -> BenchResult { let mem_mgr = MemoryManager::init(DefaultMemoryImpl::default()); let num_memories = 5; - benchmark(|| { + bench_fn(|| { for i in 0..num_memories { let memory = mem_mgr.get(MemoryId::new(i)); for j in 0..num_chunks { @@ -58,7 +58,7 @@ pub fn memory_manager_overhead() -> BenchResult { } /// Benchmarks the `MemoryManager`'s `grow` method. -#[bench] +#[bench(raw)] pub fn memory_manager_grow() -> BenchResult { let mem_mgr = MemoryManager::init_with_bucket_size(DefaultMemoryImpl::default(), 1); @@ -66,7 +66,7 @@ pub fn memory_manager_grow() -> BenchResult { let memory = mem_mgr.get(MemoryId::new(0)); - benchmark(|| { + bench_fn(|| { for _ in 0..buckets_per_memory { memory.grow(1); } diff --git a/benchmarks/src/vec.rs b/benchmarks/src/vec.rs index 6ae0ec01..9bebe9ff 100644 --- a/benchmarks/src/vec.rs +++ b/benchmarks/src/vec.rs @@ -1,75 +1,75 @@ use crate::Random; -use canbench::{benchmark, macros::bench, BenchResult}; +use canbench_rs::{bench_fn, bench, BenchResult}; use ic_stable_structures::storable::Blob; use ic_stable_structures::{DefaultMemoryImpl, StableVec, Storable}; use tiny_rng::{Rand, Rng}; -#[bench] +#[bench(raw)] pub fn vec_insert_blob_4() -> BenchResult { vec_insert_blob::<4>() } -#[bench] +#[bench(raw)] pub fn vec_insert_blob_8() -> BenchResult { vec_insert_blob::<8>() } -#[bench] +#[bench(raw)] pub fn vec_insert_blob_16() -> BenchResult { vec_insert_blob::<16>() } -#[bench] +#[bench(raw)] pub fn vec_insert_blob_32() -> BenchResult { vec_insert_blob::<32>() } -#[bench] +#[bench(raw)] pub fn vec_insert_blob_64() -> BenchResult { vec_insert_blob::<64>() } -#[bench] +#[bench(raw)] pub fn vec_insert_blob_128() -> BenchResult { vec_insert_blob::<128>() } -#[bench] +#[bench(raw)] pub fn vec_insert_u64() -> BenchResult { vec_insert::() } -#[bench] +#[bench(raw)] pub fn vec_get_blob_4() -> BenchResult { vec_get_blob::<4>() } -#[bench] +#[bench(raw)] pub fn vec_get_blob_8() -> BenchResult { vec_get_blob::<8>() } -#[bench] +#[bench(raw)] pub fn vec_get_blob_16() -> BenchResult { vec_get_blob::<16>() } -#[bench] +#[bench(raw)] pub fn vec_get_blob_32() -> BenchResult { vec_get_blob::<32>() } -#[bench] +#[bench(raw)] pub fn vec_get_blob_64() -> BenchResult { vec_get_blob::<64>() } -#[bench] +#[bench(raw)] pub fn vec_get_blob_128() -> BenchResult { vec_get_blob::<128>() } -#[bench] +#[bench(raw)] pub fn vec_get_u64() -> BenchResult { vec_get::() } @@ -89,7 +89,7 @@ fn vec_insert() -> BenchResult { random_items.push(T::random(&mut rng)); } - benchmark(|| { + bench_fn(|| { for item in random_items.iter() { svec.push(item).unwrap(); } @@ -110,7 +110,7 @@ fn vec_get() -> BenchResult { svec.push(&T::random(&mut rng)).unwrap(); } - benchmark(|| { + bench_fn(|| { for i in 0..num_items { svec.get(i as u64).unwrap(); } diff --git a/canbench-bin/Cargo.toml b/canbench-bin/Cargo.toml deleted file mode 100644 index d972b175..00000000 --- a/canbench-bin/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "canbench-bin" -version = "0.1.0" -edition = "2021" - -[[bin]] -name = "canbench" -path = "src/main.rs" - -[dependencies] -canbench = { path = "../canbench-rs" } -candid.workspace = true -clap = { version = "4.0.11", features = ["derive"] } -colored = "2.0.4" -flate2 = "1.0.28" -hex = "0.4.3" -reqwest = { version = "0.11.23", features = ["blocking"] } -serde_yaml = "0.9" -sha256 = "1.5.0" -tempfile = "3.3.0" -wasmparser = "0.119.0" diff --git a/canbench-bin/src/lib.rs b/canbench-bin/src/lib.rs deleted file mode 100644 index bc9d0499..00000000 --- a/canbench-bin/src/lib.rs +++ /dev/null @@ -1,281 +0,0 @@ -//! A module for running benchmarks. -use canbench::BenchResult; -use candid::Decode; -use colored::Colorize; -use flate2::read::GzDecoder; -use std::{ - collections::BTreeMap, - env, - fs::File, - io::{Read, Write}, - path::{Path, PathBuf}, - process::Command, -}; -use wasmparser::Parser as WasmParser; - -// The prefix benchmarks are expected to have in their name. -// Other queries exposed by the canister are ignored. -const BENCH_PREFIX: &str = "__canbench__"; - -/// Runs the benchmarks on the canister available in the provided `canister_wasm_path`. -pub fn run_benchmarks( - canister_wasm_path: &PathBuf, - pattern: Option, - persist: bool, - results_file: &PathBuf, -) { - // Parse the Wasm to determine all the benchmarks to run. - // All query endpoints are assumed to be benchmarks. - let benchmark_canister_wasm = std::fs::read(canister_wasm_path).unwrap(); - - let prefix = format!("canister_query {BENCH_PREFIX}"); - - let benchmark_fns: Vec<_> = WasmParser::new(0) - .parse_all(&benchmark_canister_wasm) - .filter_map(|section| match section { - Ok(wasmparser::Payload::ExportSection(export_section)) => { - let queries: Vec<_> = export_section - .into_iter() - .filter_map(|export| { - if let Ok(export) = export { - if export.name.starts_with(&prefix) { - return Some( - export - .name - .split(&prefix) - .last() - .expect("query must have a name."), - ); - } - } - - None - }) - .collect(); - - Some(queries) - } - _ => None, - }) - .flatten() - .collect(); - - maybe_download_drun(); - - let current_results = read_current_results(results_file); - - let mut results = BTreeMap::new(); - - for bench_fn in benchmark_fns { - if let Some(pattern) = &pattern { - if !bench_fn.contains(pattern) { - continue; - } - } - - println!(); - println!("---------------------------------------------------"); - println!(); - - let result = run_benchmark(canister_wasm_path, &bench_fn); - - // Compare result to previous result if that exists. - if let Some(current_result) = current_results.get(&bench_fn.to_string()) { - println!("Benchmark: {}", bench_fn.bold()); - compare(current_result, &result); - } else { - println!("Benchmark: {} {}", bench_fn.bold(), "(new)".blue().bold()); - let yaml = serde_yaml::to_string(&result).unwrap(); - println!("{}", yaml); - } - - results.insert(bench_fn, result); - } - - // Persist the result if requested. - if persist { - // Open a file in write-only mode, returns `io::Result` - let mut file = File::create(results_file).unwrap(); - file.write_all(serde_yaml::to_string(&results).unwrap().as_bytes()) - .unwrap(); - println!( - "Successfully persisted results to {}", - results_file.display() - ); - } -} - -// Path to the canbench directory where we keep internal data. -fn canbench_dir() -> PathBuf { - PathBuf::new() - .join(env::current_dir().unwrap()) - .join(".canbench") -} - -// Path to drun. -fn drun_path() -> PathBuf { - canbench_dir().join("drun") -} - -// Downloads drun if it's not already downloaded. -fn maybe_download_drun() { - const DRUN_LINUX_SHA: &str = "7bf08d5f1c1a7cd44f62c03f8554f07aa2430eb3ae81c7c0a143a68ff52dc7f7"; - const DRUN_MAC_SHA: &str = "57b506d05a6f42f7461198f79f648ad05434c72f3904834db2ced30853d01a62"; - - if drun_path().exists() { - // Drun found. Verify that it's the version we expect it to be. - let expected_sha = match env::consts::OS { - "linux" => DRUN_LINUX_SHA, - "macos" => DRUN_MAC_SHA, - _ => panic!("only linux and macos are currently supported."), - }; - - let drun_sha = sha256::try_digest(drun_path()).unwrap(); - - if drun_sha == expected_sha { - // Shas match. No need to download drun. - return; - } - } - - // The expected version of drun isn't present. Download it. - download_drun(); -} - -fn download_drun() { - const DRUN_URL_PREFIX: &str = - "https://github.com/dfinity/ic/releases/download/release-2023-09-27_23-01%2Bquic/drun-x86_64-"; - - println!("Downloading drun (will be cached for future uses)..."); - - // Create the canbench directory if it doesn't exist. - std::fs::create_dir_all(canbench_dir()).unwrap(); - - let os = if cfg!(target_os = "linux") { - "linux" - } else if cfg!(target_os = "macos") { - "darwin" - } else { - panic!("Unsupported operating system"); - }; - - let url = format!("{}{}.gz", DRUN_URL_PREFIX, os); - let drun_compressed = reqwest::blocking::get(url) - .unwrap() - .bytes() - .expect("Failed to download drun"); - - let mut decoder = GzDecoder::new(&drun_compressed[..]); - let mut file = File::create(drun_path()).expect("Failed to create drun file"); - - std::io::copy(&mut decoder, &mut file).expect("Failed to write drun file"); - - // Make the file executable. - Command::new("chmod") - .arg("+x") - .arg(drun_path()) - .status() - .unwrap(); -} - -// Runs the given benchmark. -fn run_benchmark(canister_wasm_path: &Path, bench_fn: &str) -> BenchResult { - // drun is used for running the benchmark. - // First, we create a temporary file with steps for drun to execute the benchmark. - let mut temp_file = tempfile::Builder::new().tempfile().unwrap(); - write!( - temp_file, - "create -install rwlgt-iiaaa-aaaaa-aaaaa-cai {} \"\" -query rwlgt-iiaaa-aaaaa-aaaaa-cai {}{} \"DIDL\x00\x00\"", - canister_wasm_path.display(), - BENCH_PREFIX, - bench_fn - ) - .unwrap(); - - // Run the benchmark with drun. - let drun_output = Command::new(drun_path()) - .args(vec![ - temp_file.into_temp_path().to_str().unwrap(), - "--instruction-limit", - "99999999999999", - ]) - .output() - .unwrap(); - - // Extract the hex response. - let result_hex = String::from_utf8(drun_output.stdout) - .unwrap() - .split_whitespace() - .last() - .unwrap() - .to_string(); - - // Decode the response. - Decode!( - &hex::decode(&result_hex[2..]).expect(&format!( - "error parsing result of benchmark {}. Result: {}", - bench_fn, result_hex - )), - BenchResult - ) - .expect("error decoding benchmark result {:?}") -} - -// Prints a measurement along with its percentage change relative to the old value. -fn print_measurement(measurement: &str, value: u64, diff: f64) { - if diff == 0.0 { - println!(" {measurement}: {value} ({:.2}%) (no change)", diff); - } else if diff.abs() < 2.0 { - println!( - " {measurement}: {value} ({:.2}%) (change within noise threshold)", - diff - ); - } else if diff > 0.0 { - println!( - " {}", - format!("{}: {value} (regressed by {:.2}%)", measurement, diff,) - .red() - .bold() - ); - } else { - println!( - " {}", - format!("{}: {value} (improved by {:.2}%)", measurement, diff.abs(),) - .green() - .bold() - ); - } -} - -// Prints out a measurement of the new value along with a comparison with the old value. -fn compare(old: &BenchResult, new: &BenchResult) { - println!(" measurements:"); - for (measurement, value) in new.measurements.iter() { - match old.measurements.get(measurement) { - Some(old_value) => { - let diff = ((*value as f64 - *old_value as f64) / *old_value as f64) * 100.0; - print_measurement(measurement, *value, diff); - } - None => println!(" {measurement}: {value} (new)"), - } - } -} - -fn read_current_results(results_file: &PathBuf) -> BTreeMap { - // Create a path to the desired file - let mut file = match File::open(results_file) { - Err(_) => { - // No current results found. - return BTreeMap::new(); - } - Ok(file) => file, - }; - - // Read the current results. - let mut results_str = String::new(); - file.read_to_string(&mut results_str) - .expect("error reading results file"); - serde_yaml::from_str(&results_str).unwrap() -} diff --git a/canbench-bin/src/main.rs b/canbench-bin/src/main.rs deleted file mode 100644 index cee07164..00000000 --- a/canbench-bin/src/main.rs +++ /dev/null @@ -1,71 +0,0 @@ -//! A script for running benchmarks on a canister. -//! To run this script, run `cargo bench`. -use clap::Parser; -use std::{collections::BTreeMap, fs::File, io::Read, path::PathBuf, process::Command}; - -const CFG_FILE_NAME: &str = "canbench.yml"; -const DEFAULT_RESULTS_FILE: &str = "canbench_results.yml"; - -#[derive(Parser, Debug)] -#[command(author, version, about, long_about = None)] -struct Args { - // If provided, only benchmarks that match this pattern will be executed. - pattern: Option, - - // A necessary flag to keep `cargo bench` happy. - #[clap(long)] - bench: bool, - - // Whether or not results should be persisted to disk. - #[clap(long)] - persist: bool, -} - -fn main() { - let args = Args::parse(); - - // Read and parse the configuration file. - let mut file = match File::open(CFG_FILE_NAME) { - Ok(file) => file, - Err(err) => { - match err.kind() { - std::io::ErrorKind::NotFound => { - println!("{} not found in current directory.", CFG_FILE_NAME) - } - other => println!("Error while opening `{}`: {}", CFG_FILE_NAME, other), - } - - std::process::exit(1); - } - }; - - let mut config_str = String::new(); - file.read_to_string(&mut config_str).unwrap(); - let cfg: BTreeMap = serde_yaml::from_str(&config_str).unwrap(); - - let wasm_path = PathBuf::from( - cfg.get("wasm_path") - .expect("`wasm_path` in bench.yml must be specified."), - ); - - let results_path = PathBuf::from( - cfg.get("results_path") - .unwrap_or(&DEFAULT_RESULTS_FILE.to_string()), - ); - - // Build the canister if a build command is specified. - if let Some(build_cmd) = cfg.get("build_cmd") { - assert!( - Command::new("bash") - .arg("-c") - .arg(build_cmd) - .status() - .unwrap() - .success(), - "failed to unwrap build command" - ); - } - - // Run the benchmarks. - canbench_bin::run_benchmarks(&wasm_path, args.pattern, args.persist, &results_path); -} diff --git a/canbench-rs-macros/Cargo.lock b/canbench-rs-macros/Cargo.lock deleted file mode 100644 index 723d2d5c..00000000 --- a/canbench-rs-macros/Cargo.lock +++ /dev/null @@ -1,1808 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "anstream" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "binread" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16598dfc8e6578e9b597d9910ba2e73618385dc9f4b1d43dd92c349d6be6418f" -dependencies = [ - "binread_derive", - "lazy_static", - "rustversion", -] - -[[package]] -name = "binread_derive" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9672209df1714ee804b1f4d4f68c8eb2a90b1f7a07acf472f88ce198ef1fed" -dependencies = [ - "either", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "canbench" -version = "0.1.0" -dependencies = [ - "candid", - "clap", - "colored", - "flate2", - "hex", - "reqwest", - "serde", - "serde_yaml", - "sha256", - "tempfile", - "wasmparser", -] - -[[package]] -name = "candid" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c1ce01d8089ee5b49ba20d3a9da15a28bba64c35cdff2aa256d37e319625d" -dependencies = [ - "anyhow", - "binread", - "byteorder", - "candid_derive", - "codespan-reporting", - "crc32fast", - "data-encoding", - "hex", - "leb128", - "num-bigint", - "num-traits", - "num_enum", - "paste", - "pretty", - "serde", - "serde_bytes", - "sha2", - "stacker", - "thiserror", -] - -[[package]] -name = "candid_derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201ea498d901add0822653ac94cb0f8a92f9b1758a5273f4dafbb6673c9a5020" -dependencies = [ - "lazy_static", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clap" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "ic-cdk" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d4c0b932bf454d5d60e61e13c3c944972fcfd74dc82b9ed5c8b0a75979cf50" -dependencies = [ - "candid", - "ic-cdk-macros", - "ic0", - "serde", - "serde_bytes", -] - -[[package]] -name = "ic-cdk-macros" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c0dd4c149132b68e679274d397053332ee29996c6a541075895881916333b" -dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream", - "syn 1.0.109", -] - -[[package]] -name = "ic0" -version = "0.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576c539151d4769fb4d1a0c25c4108dd18facd04c5695b02cf2d226ab4e43aa5" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl" -version = "0.10.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "pretty" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55c4d17d994b637e2f4daf6e5dc5d660d209d5642377d675d7a1c3ab69fa579" -dependencies = [ - "arrayvec", - "typed-arena", - "unicode-width", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "profiler" -version = "0.1.0" -dependencies = [ - "candid", - "clap", - "colored", - "flate2", - "hex", - "ic-cdk", - "maplit", - "reqwest", - "serde", - "serde_yaml", - "sha256", - "tempfile", - "wasmparser", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "reqwest" -version = "0.11.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustix" -version = "0.38.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "serde" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_tokenstream" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" -dependencies = [ - "proc-macro2", - "serde", - "syn 1.0.109", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha256" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" -dependencies = [ - "async-trait", - "bytes", - "hex", - "sha2", - "tokio", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" - -[[package]] -name = "wasmparser" -version = "0.119.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c35daf77afb4f9b14016625144a391085ec2ca99ca9cc53ed291bb53ab5278d" -dependencies = [ - "bitflags 2.4.2", - "indexmap", - "semver", -] - -[[package]] -name = "web-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] diff --git a/canbench-rs-macros/Cargo.toml b/canbench-rs-macros/Cargo.toml deleted file mode 100644 index 1746d5b7..00000000 --- a/canbench-rs-macros/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "canbench-macros" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -proc-macro = true - -[dependencies] -quote = "1.0" -syn = "1.0" diff --git a/canbench-rs-macros/src/lib.rs b/canbench-rs-macros/src/lib.rs deleted file mode 100644 index 1fda8582..00000000 --- a/canbench-rs-macros/src/lib.rs +++ /dev/null @@ -1,54 +0,0 @@ -use proc_macro::TokenStream; -use quote::quote; -use syn::{parse_macro_input, ItemFn}; - -#[proc_macro_attribute] -pub fn bench(_attr: TokenStream, item: TokenStream) -> TokenStream { - // Parse the input as a function - let input = parse_macro_input!(item as ItemFn); - - // Extract function name, inputs, and output - let func_name = &input.sig.ident; - let inputs = &input.sig.inputs; - let output = &input.sig.output; - - // Check that there are no function arguments - if !inputs.is_empty() { - return syn::Error::new_spanned(inputs, "Benchmark should not take any arguments") - .to_compile_error() - .into(); - } - - // Check that the return type is BenchResult - match output { - syn::ReturnType::Default => { - return syn::Error::new_spanned(output, "Benchmark should return BenchResult") - .to_compile_error() - .into(); - } - syn::ReturnType::Type(_, ty) => { - if quote!(#ty).to_string() != "BenchResult" { - return syn::Error::new_spanned(ty, "Benchmark should return BenchResult") - .to_compile_error() - .into(); - } - } - } - - // Prefix the benchmark name with "__canbench__". - // This is to inform that the `canbench` binary that this query is a benchmark - // that it should run. - let renamed_func_name = - syn::Ident::new(&format!("__canbench__{}", func_name), func_name.span()); - let expanded = quote! { - #input - - #[ic_cdk::query] - #[allow(non_snake_case)] - fn #renamed_func_name() -> BenchResult { - #func_name() - } - }; - - TokenStream::from(expanded) -} diff --git a/canbench-rs/Cargo.lock b/canbench-rs/Cargo.lock deleted file mode 100644 index 723d2d5c..00000000 --- a/canbench-rs/Cargo.lock +++ /dev/null @@ -1,1808 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "anstream" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "binread" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16598dfc8e6578e9b597d9910ba2e73618385dc9f4b1d43dd92c349d6be6418f" -dependencies = [ - "binread_derive", - "lazy_static", - "rustversion", -] - -[[package]] -name = "binread_derive" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9672209df1714ee804b1f4d4f68c8eb2a90b1f7a07acf472f88ce198ef1fed" -dependencies = [ - "either", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "canbench" -version = "0.1.0" -dependencies = [ - "candid", - "clap", - "colored", - "flate2", - "hex", - "reqwest", - "serde", - "serde_yaml", - "sha256", - "tempfile", - "wasmparser", -] - -[[package]] -name = "candid" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c1ce01d8089ee5b49ba20d3a9da15a28bba64c35cdff2aa256d37e319625d" -dependencies = [ - "anyhow", - "binread", - "byteorder", - "candid_derive", - "codespan-reporting", - "crc32fast", - "data-encoding", - "hex", - "leb128", - "num-bigint", - "num-traits", - "num_enum", - "paste", - "pretty", - "serde", - "serde_bytes", - "sha2", - "stacker", - "thiserror", -] - -[[package]] -name = "candid_derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201ea498d901add0822653ac94cb0f8a92f9b1758a5273f4dafbb6673c9a5020" -dependencies = [ - "lazy_static", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clap" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "ic-cdk" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d4c0b932bf454d5d60e61e13c3c944972fcfd74dc82b9ed5c8b0a75979cf50" -dependencies = [ - "candid", - "ic-cdk-macros", - "ic0", - "serde", - "serde_bytes", -] - -[[package]] -name = "ic-cdk-macros" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c0dd4c149132b68e679274d397053332ee29996c6a541075895881916333b" -dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream", - "syn 1.0.109", -] - -[[package]] -name = "ic0" -version = "0.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576c539151d4769fb4d1a0c25c4108dd18facd04c5695b02cf2d226ab4e43aa5" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl" -version = "0.10.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "pretty" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55c4d17d994b637e2f4daf6e5dc5d660d209d5642377d675d7a1c3ab69fa579" -dependencies = [ - "arrayvec", - "typed-arena", - "unicode-width", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "profiler" -version = "0.1.0" -dependencies = [ - "candid", - "clap", - "colored", - "flate2", - "hex", - "ic-cdk", - "maplit", - "reqwest", - "serde", - "serde_yaml", - "sha256", - "tempfile", - "wasmparser", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "reqwest" -version = "0.11.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustix" -version = "0.38.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "serde" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_tokenstream" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" -dependencies = [ - "proc-macro2", - "serde", - "syn 1.0.109", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha256" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" -dependencies = [ - "async-trait", - "bytes", - "hex", - "sha2", - "tokio", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" - -[[package]] -name = "wasmparser" -version = "0.119.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c35daf77afb4f9b14016625144a391085ec2ca99ca9cc53ed291bb53ab5278d" -dependencies = [ - "bitflags 2.4.2", - "indexmap", - "semver", -] - -[[package]] -name = "web-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] diff --git a/canbench-rs/Cargo.toml b/canbench-rs/Cargo.toml deleted file mode 100644 index 95e81c04..00000000 --- a/canbench-rs/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "canbench" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -name = "canbench" -path = "src/lib.rs" - -[dependencies] -canbench-macros = { path = "../canbench-rs-macros" } -candid.workspace = true -ic-cdk.workspace= true -maplit = "1.0.2" -serde = "1.0" diff --git a/canbench-rs/src/lib.rs b/canbench-rs/src/lib.rs deleted file mode 100644 index e6408df8..00000000 --- a/canbench-rs/src/lib.rs +++ /dev/null @@ -1,97 +0,0 @@ -//! A module for profiling canisters. -use candid::CandidType; -use maplit::btreemap; -use serde::{Deserialize, Serialize}; -use std::cell::RefCell; -use std::collections::BTreeMap; - -pub use canbench_macros as macros; - -thread_local! { - static PROFILING: RefCell> = RefCell::new(BTreeMap::new()); -} - -/// Starts profiling the instructions consumed. -/// -/// Instructions are counted and recorded under the given name until the -/// `Profile` object returned is dropped. -pub fn profile(name: &'static str) -> Profile { - Profile::new(name) -} - -/// Clears all profiling data. -pub fn reset() { - PROFILING.with(|p| p.borrow_mut().clear()); -} - -/// Returns the number of instructions used for each of the profile names. -pub fn get_results() -> std::collections::BTreeMap<&'static str, u64> { - PROFILING.with(|p| p.borrow().clone()) -} - -pub struct Profile { - name: &'static str, - start_instructions: u64, -} - -impl Profile { - fn new(name: &'static str) -> Self { - Self { - name, - start_instructions: instruction_count(), - } - } -} - -impl Drop for Profile { - fn drop(&mut self) { - let instructions_count = instruction_count() - self.start_instructions; - - PROFILING.with(|p| { - let mut p = p.borrow_mut(); - let entry = p.entry(self.name).or_insert(0); - *entry += instructions_count; - }); - } -} - -fn instruction_count() -> u64 { - #[cfg(target_arch = "wasm32")] - { - ic_cdk::api::performance_counter(0) - } - - #[cfg(not(target_arch = "wasm32"))] - { - // Consider using cpu time here. - 0 - } -} - -/// The results of a benchmark. -#[derive(Debug, PartialEq, Serialize, Deserialize, CandidType)] -pub struct BenchResult { - pub measurements: BTreeMap, -} - -/// Benchmarks the given function. -pub fn benchmark(f: impl FnOnce() -> R) -> BenchResult { - let start = ic_cdk::api::performance_counter(0); - reset(); - f(); - let total_instructions = ic_cdk::api::performance_counter(0) - start; - - let mut measurements = btreemap! { - "instructions".to_string() => total_instructions, - "stable_memory_size".to_string() => ic_cdk::api::stable::stable64_size() - }; - - let mut profiling_results: std::collections::BTreeMap<_, _> = get_results() - .into_iter() - .map(|(k, v)| (k.to_string(), v)) - .collect(); - - measurements.append(&mut profiling_results); - - BenchResult { measurements } -} diff --git a/canbench_results.yml b/canbench_results.yml index 8ad5889d..af5d4b92 100644 --- a/canbench_results.yml +++ b/canbench_results.yml @@ -1,544 +1,602 @@ -btreemap_get_blob_128_1024: - measurements: - instructions: 1006573538 - node_load_v1: 832328557 - stable_memory_size: 261 -btreemap_get_blob_128_1024_v2: - measurements: - instructions: 1123805990 - node_load_v2: 938155476 - stable_memory_size: 196 -btreemap_get_blob_16_1024: - measurements: - instructions: 487229806 - node_load_v1: 339804418 - stable_memory_size: 216 -btreemap_get_blob_16_1024_v2: - measurements: - instructions: 583474971 - node_load_v2: 430852270 - stable_memory_size: 162 -btreemap_get_blob_256_1024: - measurements: - instructions: 1510660940 - node_load_v1: 1309093774 - stable_memory_size: 293 -btreemap_get_blob_256_1024_v2: - measurements: - instructions: 1626341678 - node_load_v2: 1410845462 - stable_memory_size: 220 -btreemap_get_blob_32_1024: - measurements: - instructions: 534895222 - node_load_v1: 378516147 - stable_memory_size: 231 -btreemap_get_blob_32_1024_v2: - measurements: - instructions: 633048491 - node_load_v2: 471574348 - stable_memory_size: 174 -btreemap_get_blob_4_1024: - measurements: - instructions: 355650535 - node_load_v1: 231720942 - stable_memory_size: 124 -btreemap_get_blob_4_1024_v2: - measurements: - instructions: 446660432 - node_load_v2: 313869359 - stable_memory_size: 93 -btreemap_get_blob_512_1024: - measurements: - instructions: 2506597898 - node_load_v1: 2251570705 - stable_memory_size: 352 -btreemap_get_blob_512_1024_v2: - measurements: - instructions: 2625838052 - node_load_v2: 2356816367 - stable_memory_size: 264 -btreemap_get_blob_64_1024: - measurements: - instructions: 780061526 - node_load_v1: 616669297 - stable_memory_size: 246 -btreemap_get_blob_64_1024_v2: - measurements: - instructions: 878745163 - node_load_v2: 706540951 - stable_memory_size: 184 -btreemap_get_blob_8_1024: - measurements: - instructions: 406432578 - node_load_v1: 259168629 - stable_memory_size: 184 -btreemap_get_blob_8_1024_v2: - measurements: - instructions: 493282925 - node_load_v2: 336415667 - stable_memory_size: 139 -btreemap_get_blob_8_u64: - measurements: - instructions: 368106593 - node_load_v1: 253569163 - stable_memory_size: 7 -btreemap_get_blob_8_u64_v2: - measurements: - instructions: 466009078 - node_load_v2: 345475118 - stable_memory_size: 5 -btreemap_get_u64_blob_8: - measurements: - instructions: 351156467 - node_load_v1: 250986516 - stable_memory_size: 8 -btreemap_get_u64_blob_8_v2: - measurements: - instructions: 413554294 - node_load_v2: 309705639 - stable_memory_size: 6 -btreemap_get_u64_u64: - measurements: - instructions: 353621464 - node_load_v1: 249502481 - stable_memory_size: 8 -btreemap_get_u64_u64_v2: - measurements: - instructions: 422146359 - node_load_v2: 312364993 - stable_memory_size: 7 -btreemap_insert_10mib_values: - measurements: - instructions: 107942355 - node_load_v2: 10057317 - node_save_v2: 77823608 - stable_memory_size: 33 -btreemap_insert_blob_1024_128: - measurements: - instructions: 5115889431 - node_load_v1: 4062772095 - node_save_v1: 185771186 - stable_memory_size: 263 -btreemap_insert_blob_1024_128_v2: - measurements: - instructions: 5394772440 - node_load_v2: 4190686429 - node_save_v2: 206085822 - stable_memory_size: 197 -btreemap_insert_blob_1024_16: - measurements: - instructions: 5074839717 - node_load_v1: 4058526995 - node_save_v1: 172957200 - stable_memory_size: 242 -btreemap_insert_blob_1024_16_v2: - measurements: - instructions: 5358731374 - node_load_v2: 4195507437 - node_save_v2: 193208733 - stable_memory_size: 182 -btreemap_insert_blob_1024_256: - measurements: - instructions: 5130740072 - node_load_v1: 4039224210 - node_save_v1: 201310396 - stable_memory_size: 293 -btreemap_insert_blob_1024_256_v2: - measurements: - instructions: 5352948952 - node_load_v2: 4171364974 - node_save_v2: 221531887 - stable_memory_size: 220 -btreemap_insert_blob_1024_32: - measurements: - instructions: 5089791785 - node_load_v1: 4079908295 - node_save_v1: 173954636 - stable_memory_size: 240 -btreemap_insert_blob_1024_32_v2: - measurements: - instructions: 5357513466 - node_load_v2: 4214236378 - node_save_v2: 194114909 - stable_memory_size: 181 -btreemap_insert_blob_1024_4: - measurements: - instructions: 4968257212 - node_load_v1: 4058890666 - node_save_v1: 162657999 - stable_memory_size: 236 -btreemap_insert_blob_1024_4_v2: - measurements: - instructions: 5264404231 - node_load_v2: 4189301776 - node_save_v2: 182905394 - stable_memory_size: 177 -btreemap_insert_blob_1024_512: - measurements: - instructions: 5224338924 - node_load_v1: 4064093845 - node_save_v1: 236696639 - stable_memory_size: 349 -btreemap_insert_blob_1024_512_v2: - measurements: - instructions: 5481571968 - node_load_v2: 4201549676 - node_save_v2: 257610609 - stable_memory_size: 262 -btreemap_insert_blob_1024_64: - measurements: - instructions: 5110806943 - node_load_v1: 4075394290 - node_save_v1: 178905580 - stable_memory_size: 251 -btreemap_insert_blob_1024_64_v2: - measurements: - instructions: 5377434456 - node_load_v2: 4214020891 - node_save_v2: 199157099 - stable_memory_size: 189 -btreemap_insert_blob_1024_8: - measurements: - instructions: 5053776980 - node_load_v1: 4051194851 - node_save_v1: 167362943 - stable_memory_size: 238 -btreemap_insert_blob_1024_8_v2: - measurements: - instructions: 5331593907 - node_load_v2: 4181516149 - node_save_v2: 187604446 - stable_memory_size: 179 -btreemap_insert_blob_128_1024: - measurements: - instructions: 1577091213 - node_load_v1: 812526962 - node_save_v1: 301462572 - stable_memory_size: 261 -btreemap_insert_blob_128_1024_v2: - measurements: - instructions: 1726441521 - node_load_v2: 925130424 - node_save_v2: 322015815 - stable_memory_size: 196 -btreemap_insert_blob_16_1024: - measurements: - instructions: 992366717 - node_load_v1: 322073344 - node_save_v1: 291094888 - stable_memory_size: 216 -btreemap_insert_blob_16_1024_v2: - measurements: - instructions: 1108674244 - node_load_v2: 419541518 - node_save_v2: 310638874 - stable_memory_size: 162 -btreemap_insert_blob_256_1024: - measurements: - instructions: 2114284649 - node_load_v1: 1278881721 - node_save_v1: 300728644 - stable_memory_size: 293 -btreemap_insert_blob_256_1024_v2: - measurements: - instructions: 2273386999 - node_load_v2: 1395147359 - node_save_v2: 321544817 - stable_memory_size: 220 -btreemap_insert_blob_32_1024: - measurements: - instructions: 1041724177 - node_load_v1: 358626551 - node_save_v1: 298295476 - stable_memory_size: 231 -btreemap_insert_blob_32_1024_v2: - measurements: - instructions: 1156895178 - node_load_v2: 459271136 - node_save_v2: 316798162 - stable_memory_size: 174 -btreemap_insert_blob_4_1024: - measurements: - instructions: 772106359 - node_load_v1: 212848724 - node_save_v1: 267119730 - stable_memory_size: 124 -btreemap_insert_blob_4_1024_v2: - measurements: - instructions: 862904908 - node_load_v2: 286322995 - node_save_v2: 284380143 - stable_memory_size: 93 -btreemap_insert_blob_512_1024: - measurements: - instructions: 3195541992 - node_load_v1: 2200910325 - node_save_v1: 306828402 - stable_memory_size: 352 -btreemap_insert_blob_512_1024_v2: - measurements: - instructions: 3317431106 - node_load_v2: 2302979370 - node_save_v2: 323365428 - stable_memory_size: 264 -btreemap_insert_blob_64_1024: - measurements: - instructions: 1305958991 - node_load_v1: 584672643 - node_save_v1: 300400388 - stable_memory_size: 246 -btreemap_insert_blob_64_1024_v2: - measurements: - instructions: 1439210453 - node_load_v2: 692993072 - node_save_v2: 319569550 - stable_memory_size: 184 -btreemap_insert_blob_8_1024: - measurements: - instructions: 905706875 - node_load_v1: 247335003 - node_save_v1: 284445265 - stable_memory_size: 184 -btreemap_insert_blob_8_1024_v2: - measurements: - instructions: 1002633716 - node_load_v2: 325787553 - node_save_v2: 303101882 - stable_memory_size: 139 -btreemap_insert_blob_8_u64: - measurements: - instructions: 589493749 - node_load_v1: 243685209 - node_save_v1: 164111004 - stable_memory_size: 7 -btreemap_insert_blob_8_u64_v2: - measurements: - instructions: 697133799 - node_load_v2: 329438301 - node_save_v2: 184403609 - stable_memory_size: 5 -btreemap_insert_u64_blob_8: - measurements: - instructions: 611656296 - node_load_v1: 233854938 - node_save_v1: 203753854 - stable_memory_size: 8 -btreemap_insert_u64_blob_8_v2: - measurements: - instructions: 679823522 - node_load_v2: 294338080 - node_save_v2: 211575679 - stable_memory_size: 6 -btreemap_insert_u64_u64: - measurements: - instructions: 627664728 - node_load_v1: 234409394 - node_save_v1: 211208718 - stable_memory_size: 8 -btreemap_insert_u64_u64_v2: - measurements: - instructions: 703623870 - node_load_v2: 300411584 - node_save_v2: 220348622 - stable_memory_size: 7 -btreemap_remove_blob_128_1024: - measurements: - instructions: 1957356649 - node_load_v1: 914434789 - node_save_v1: 514074570 - stable_memory_size: 261 -btreemap_remove_blob_128_1024_v2: - measurements: - instructions: 2117203127 - node_load_v2: 1032337866 - node_save_v2: 556162319 - stable_memory_size: 196 -btreemap_remove_blob_16_1024: - measurements: - instructions: 1247951670 - node_load_v1: 371456037 - node_save_v1: 473518008 - stable_memory_size: 216 -btreemap_remove_blob_16_1024_v2: - measurements: - instructions: 1391842517 - node_load_v2: 479235617 - node_save_v2: 512046945 - stable_memory_size: 162 -btreemap_remove_blob_256_1024: - measurements: - instructions: 2573453911 - node_load_v1: 1428465620 - node_save_v1: 511120662 - stable_memory_size: 293 -btreemap_remove_blob_256_1024_v2: - measurements: - instructions: 2738027594 - node_load_v2: 1548255619 - node_save_v2: 551257725 - stable_memory_size: 220 -btreemap_remove_blob_32_1024: - measurements: - instructions: 1324817959 - node_load_v1: 403513191 - node_save_v1: 492234126 - stable_memory_size: 231 -btreemap_remove_blob_32_1024_v2: - measurements: - instructions: 1476050369 - node_load_v2: 519013227 - node_save_v2: 532132813 - stable_memory_size: 174 -btreemap_remove_blob_4_1024: - measurements: - instructions: 807721649 - node_load_v1: 233144442 - node_save_v1: 306452731 - stable_memory_size: 124 -btreemap_remove_blob_4_1024_v2: - measurements: - instructions: 913517563 - node_load_v2: 314086802 - node_save_v2: 331046095 - stable_memory_size: 93 -btreemap_remove_blob_512_1024: - measurements: - instructions: 3867652464 - node_load_v1: 2474030645 - node_save_v1: 527547819 - stable_memory_size: 352 -btreemap_remove_blob_512_1024_v2: - measurements: - instructions: 4041285449 - node_load_v2: 2600718246 - node_save_v2: 569534896 - stable_memory_size: 264 -btreemap_remove_blob_64_1024: - measurements: - instructions: 1639040548 - node_load_v1: 661396112 - node_save_v1: 505335855 - stable_memory_size: 246 -btreemap_remove_blob_64_1024_v2: - measurements: - instructions: 1795315618 - node_load_v2: 778335609 - node_save_v2: 546167574 - stable_memory_size: 184 -btreemap_remove_blob_8_1024: - measurements: - instructions: 1038596601 - node_load_v1: 278756927 - node_save_v1: 408063372 - stable_memory_size: 184 -btreemap_remove_blob_8_1024_v2: - measurements: - instructions: 1150784585 - node_load_v2: 359148126 - node_save_v2: 441289916 - stable_memory_size: 139 -btreemap_remove_blob_8_u64: - measurements: - instructions: 756190189 - node_load_v1: 271109869 - node_save_v1: 258955340 - stable_memory_size: 7 -btreemap_remove_blob_8_u64_v2: - measurements: - instructions: 902070967 - node_load_v2: 371425008 - node_save_v2: 300237913 - stable_memory_size: 5 -btreemap_remove_u64_blob_8: - measurements: - instructions: 846321611 - node_load_v1: 263317086 - node_save_v1: 354096302 - stable_memory_size: 8 -btreemap_remove_u64_blob_8_v2: - measurements: - instructions: 935942012 - node_load_v2: 329460173 - node_save_v2: 373120565 - stable_memory_size: 6 -btreemap_remove_u64_u64: - measurements: - instructions: 874256488 - node_load_v1: 264707458 - node_save_v1: 370018389 - stable_memory_size: 8 -btreemap_remove_u64_u64_v2: - measurements: - instructions: 976419924 - node_load_v2: 337138522 - node_save_v2: 394608862 - stable_memory_size: 7 -memory_manager_baseline: - measurements: - instructions: 1144 - stable_memory_size: 8000 -memory_manager_grow: - measurements: - instructions: 287018881 - stable_memory_size: 32001 -memory_manager_overhead: - measurements: - instructions: 4605248 - stable_memory_size: 8321 -vec_get_blob_128: - measurements: - instructions: 22055455 - stable_memory_size: 20 -vec_get_blob_16: - measurements: - instructions: 11055138 - stable_memory_size: 3 -vec_get_blob_32: - measurements: - instructions: 11849080 - stable_memory_size: 6 -vec_get_blob_4: - measurements: - instructions: 6830239 - stable_memory_size: 1 -vec_get_blob_64: - measurements: - instructions: 16495665 - stable_memory_size: 10 -vec_get_blob_8: - measurements: - instructions: 8222880 - stable_memory_size: 2 -vec_get_u64: - measurements: - instructions: 7450346 - stable_memory_size: 2 -vec_insert_blob_128: - measurements: - instructions: 4942837 - stable_memory_size: 20 -vec_insert_blob_16: - measurements: - instructions: 4880610 - stable_memory_size: 3 -vec_insert_blob_32: - measurements: - instructions: 4941003 - stable_memory_size: 6 -vec_insert_blob_4: - measurements: - instructions: 4940348 - stable_memory_size: 1 -vec_insert_blob_64: - measurements: - instructions: 4941527 - stable_memory_size: 10 -vec_insert_blob_8: - measurements: - instructions: 4940479 - stable_memory_size: 2 -vec_insert_u64: - measurements: - instructions: 7600479 - stable_memory_size: 2 +benches: + btreemap_get_blob_128_1024: + total: + instructions: 977661653 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_128_1024_v2: + total: + instructions: 1102117043 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_16_1024: + total: + instructions: 456892689 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_16_1024_v2: + total: + instructions: 559097739 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_256_1024: + total: + instructions: 1478345301 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_256_1024_v2: + total: + instructions: 1601806623 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_32_1024: + total: + instructions: 505726421 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_32_1024_v2: + total: + instructions: 609474726 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_4_1024: + total: + instructions: 331386843 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_4_1024_v2: + total: + instructions: 426973070 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_512_1024: + total: + instructions: 2474274311 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_512_1024_v2: + total: + instructions: 2601487688 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_64_1024: + total: + instructions: 752570223 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_64_1024_v2: + total: + instructions: 856922443 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_8_1024: + total: + instructions: 374110766 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_8_1024_v2: + total: + instructions: 467375447 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_8_u64: + total: + instructions: 336454022 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_blob_8_u64_v2: + total: + instructions: 440446739 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_u64_blob_8: + total: + instructions: 318887564 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_u64_blob_8_v2: + total: + instructions: 385562789 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_u64_u64: + total: + instructions: 321567820 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_get_u64_u64_v2: + total: + instructions: 394823797 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_insert_10mib_values: + total: + instructions: 108248684 + heap_increase: 0 + stable_memory_increase: 32 + scopes: {} + btreemap_insert_blob_1024_128: + total: + instructions: 5079697826 + heap_increase: 0 + stable_memory_increase: 262 + scopes: {} + btreemap_insert_blob_1024_128_v2: + total: + instructions: 5494311781 + heap_increase: 0 + stable_memory_increase: 196 + scopes: {} + btreemap_insert_blob_1024_16: + total: + instructions: 5040013834 + heap_increase: 0 + stable_memory_increase: 241 + scopes: {} + btreemap_insert_blob_1024_16_v2: + total: + instructions: 5456153654 + heap_increase: 0 + stable_memory_increase: 181 + scopes: {} + btreemap_insert_blob_1024_256: + total: + instructions: 5092136091 + heap_increase: 0 + stable_memory_increase: 292 + scopes: {} + btreemap_insert_blob_1024_256_v2: + total: + instructions: 5507746910 + heap_increase: 0 + stable_memory_increase: 219 + scopes: {} + btreemap_insert_blob_1024_32: + total: + instructions: 5056052214 + heap_increase: 0 + stable_memory_increase: 239 + scopes: {} + btreemap_insert_blob_1024_32_v2: + total: + instructions: 5471370370 + heap_increase: 0 + stable_memory_increase: 180 + scopes: {} + btreemap_insert_blob_1024_4: + total: + instructions: 4934111732 + heap_increase: 0 + stable_memory_increase: 235 + scopes: {} + btreemap_insert_blob_1024_4_v2: + total: + instructions: 5354320602 + heap_increase: 0 + stable_memory_increase: 176 + scopes: {} + btreemap_insert_blob_1024_512: + total: + instructions: 5182176900 + heap_increase: 0 + stable_memory_increase: 348 + scopes: {} + btreemap_insert_blob_1024_512_v2: + total: + instructions: 5605886956 + heap_increase: 0 + stable_memory_increase: 261 + scopes: {} + btreemap_insert_blob_1024_64: + total: + instructions: 5075777064 + heap_increase: 0 + stable_memory_increase: 250 + scopes: {} + btreemap_insert_blob_1024_64_v2: + total: + instructions: 5491333818 + heap_increase: 0 + stable_memory_increase: 188 + scopes: {} + btreemap_insert_blob_1024_8: + total: + instructions: 5019814842 + heap_increase: 0 + stable_memory_increase: 237 + scopes: {} + btreemap_insert_blob_1024_8_v2: + total: + instructions: 5437515291 + heap_increase: 0 + stable_memory_increase: 178 + scopes: {} + btreemap_insert_blob_128_1024: + total: + instructions: 1536409021 + heap_increase: 0 + stable_memory_increase: 260 + scopes: {} + btreemap_insert_blob_128_1024_v2: + total: + instructions: 1687642343 + heap_increase: 0 + stable_memory_increase: 195 + scopes: {} + btreemap_insert_blob_16_1024: + total: + instructions: 951388361 + heap_increase: 0 + stable_memory_increase: 215 + scopes: {} + btreemap_insert_blob_16_1024_v2: + total: + instructions: 1062863507 + heap_increase: 0 + stable_memory_increase: 161 + scopes: {} + btreemap_insert_blob_256_1024: + total: + instructions: 2060795775 + heap_increase: 0 + stable_memory_increase: 292 + scopes: {} + btreemap_insert_blob_256_1024_v2: + total: + instructions: 2275084292 + heap_increase: 0 + stable_memory_increase: 219 + scopes: {} + btreemap_insert_blob_32_1024: + total: + instructions: 1007074380 + heap_increase: 0 + stable_memory_increase: 230 + scopes: {} + btreemap_insert_blob_32_1024_v2: + total: + instructions: 1113557741 + heap_increase: 0 + stable_memory_increase: 173 + scopes: {} + btreemap_insert_blob_4_1024: + total: + instructions: 735053637 + heap_increase: 0 + stable_memory_increase: 123 + scopes: {} + btreemap_insert_blob_4_1024_v2: + total: + instructions: 825941796 + heap_increase: 0 + stable_memory_increase: 92 + scopes: {} + btreemap_insert_blob_512_1024: + total: + instructions: 3139046499 + heap_increase: 0 + stable_memory_increase: 351 + scopes: {} + btreemap_insert_blob_512_1024_v2: + total: + instructions: 3425690686 + heap_increase: 0 + stable_memory_increase: 263 + scopes: {} + btreemap_insert_blob_64_1024: + total: + instructions: 1274024384 + heap_increase: 0 + stable_memory_increase: 245 + scopes: {} + btreemap_insert_blob_64_1024_v2: + total: + instructions: 1395193885 + heap_increase: 0 + stable_memory_increase: 183 + scopes: {} + btreemap_insert_blob_8_1024: + total: + instructions: 863854010 + heap_increase: 0 + stable_memory_increase: 183 + scopes: {} + btreemap_insert_blob_8_1024_v2: + total: + instructions: 962333391 + heap_increase: 0 + stable_memory_increase: 138 + scopes: {} + btreemap_insert_blob_8_u64: + total: + instructions: 545636080 + heap_increase: 0 + stable_memory_increase: 6 + scopes: {} + btreemap_insert_blob_8_u64_v2: + total: + instructions: 661580061 + heap_increase: 0 + stable_memory_increase: 4 + scopes: {} + btreemap_insert_u64_blob_8: + total: + instructions: 573146081 + heap_increase: 0 + stable_memory_increase: 7 + scopes: {} + btreemap_insert_u64_blob_8_v2: + total: + instructions: 639811616 + heap_increase: 0 + stable_memory_increase: 5 + scopes: {} + btreemap_insert_u64_u64: + total: + instructions: 587088393 + heap_increase: 0 + stable_memory_increase: 7 + scopes: {} + btreemap_insert_u64_u64_v2: + total: + instructions: 658648981 + heap_increase: 0 + stable_memory_increase: 6 + scopes: {} + btreemap_remove_blob_128_1024: + total: + instructions: 1908733808 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_128_1024_v2: + total: + instructions: 2069887328 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_16_1024: + total: + instructions: 1193102422 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_16_1024_v2: + total: + instructions: 1341709311 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_256_1024: + total: + instructions: 2520902632 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_256_1024_v2: + total: + instructions: 2691298366 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_32_1024: + total: + instructions: 1273281888 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_32_1024_v2: + total: + instructions: 1426541560 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_4_1024: + total: + instructions: 766088096 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_4_1024_v2: + total: + instructions: 873890895 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_512_1024: + total: + instructions: 3815387805 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_512_1024_v2: + total: + instructions: 3990988900 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_64_1024: + total: + instructions: 1591287725 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_64_1024_v2: + total: + instructions: 1746766027 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_8_1024: + total: + instructions: 985702502 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_8_1024_v2: + total: + instructions: 1108650833 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_8_u64: + total: + instructions: 705188477 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_blob_8_u64_v2: + total: + instructions: 859065955 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_u64_blob_8: + total: + instructions: 795377675 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_u64_blob_8_v2: + total: + instructions: 888125291 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_u64_u64: + total: + instructions: 824367113 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + btreemap_remove_u64_u64_v2: + total: + instructions: 929150432 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + memory_manager_baseline: + total: + instructions: 1052 + heap_increase: 0 + stable_memory_increase: 8000 + scopes: {} + memory_manager_grow: + total: + instructions: 286667074 + heap_increase: 2 + stable_memory_increase: 32000 + scopes: {} + memory_manager_overhead: + total: + instructions: 4612430 + heap_increase: 0 + stable_memory_increase: 8320 + scopes: {} + vec_get_blob_128: + total: + instructions: 22383822 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_get_blob_16: + total: + instructions: 11331427 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_get_blob_32: + total: + instructions: 12152133 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_get_blob_4: + total: + instructions: 7041316 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_get_blob_64: + total: + instructions: 16822266 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_get_blob_8: + total: + instructions: 8467007 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_get_u64: + total: + instructions: 7680243 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_insert_blob_128: + total: + instructions: 5112753 + heap_increase: 0 + stable_memory_increase: 19 + scopes: {} + vec_insert_blob_16: + total: + instructions: 5050509 + heap_increase: 0 + stable_memory_increase: 2 + scopes: {} + vec_insert_blob_32: + total: + instructions: 5110905 + heap_increase: 0 + stable_memory_increase: 5 + scopes: {} + vec_insert_blob_4: + total: + instructions: 5110245 + heap_increase: 0 + stable_memory_increase: 0 + scopes: {} + vec_insert_blob_64: + total: + instructions: 5111433 + heap_increase: 0 + stable_memory_increase: 9 + scopes: {} + vec_insert_blob_8: + total: + instructions: 5110377 + heap_increase: 0 + stable_memory_increase: 1 + scopes: {} + vec_insert_u64: + total: + instructions: 8060377 + heap_increase: 0 + stable_memory_increase: 1 + scopes: {} +version: 0.1.1 diff --git a/src/btreemap.rs b/src/btreemap.rs index 9ce8318c..e2a38413 100644 --- a/src/btreemap.rs +++ b/src/btreemap.rs @@ -146,7 +146,7 @@ where /// Initializes a v1 `BTreeMap`. /// /// This is exposed only in testing and benchmarking. - #[cfg(any(feature = "canbench", test))] + #[cfg(any(feature = "canbench-rs", test))] pub fn init_v1(memory: M) -> Self { if memory.size() == 0 { // Memory is empty. Create a new map. @@ -222,7 +222,7 @@ where /// Create a v1 instance of the BTree. /// /// This is only exposed for testing and benchmarking. - #[cfg(any(feature = "canbench", test))] + #[cfg(any(feature = "canbench-rs", test))] pub fn new_v1(memory: M) -> Self { let max_key_size = K::BOUND.max_size(); let max_value_size = V::BOUND.max_size(); From 11acb805e72bca6ad0d7f172e538beb44553955e Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Mon, 12 Feb 2024 11:58:36 +0100 Subject: [PATCH 2/5] . --- canbench_results.yml | 198 +++++++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/canbench_results.yml b/canbench_results.yml index af5d4b92..96f9a89b 100644 --- a/canbench_results.yml +++ b/canbench_results.yml @@ -1,499 +1,499 @@ benches: btreemap_get_blob_128_1024: total: - instructions: 977661653 + instructions: 878062290 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_128_1024_v2: total: - instructions: 1102117043 + instructions: 976048733 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_16_1024: total: - instructions: 456892689 + instructions: 361111644 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_16_1024_v2: total: - instructions: 559097739 + instructions: 445035580 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_256_1024: total: - instructions: 1478345301 + instructions: 1376454247 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_256_1024_v2: total: - instructions: 1601806623 + instructions: 1475809402 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_32_1024: total: - instructions: 505726421 + instructions: 405064351 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_32_1024_v2: total: - instructions: 609474726 + instructions: 488777878 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_4_1024: total: - instructions: 331386843 + instructions: 242790863 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_4_1024_v2: total: - instructions: 426973070 + instructions: 324656308 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_512_1024: total: - instructions: 2474274311 + instructions: 2372451103 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_512_1024_v2: total: - instructions: 2601487688 + instructions: 2472995457 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_64_1024: total: - instructions: 752570223 + instructions: 649031563 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_64_1024_v2: total: - instructions: 856922443 + instructions: 732957639 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_8_1024: total: - instructions: 374110766 + instructions: 282185767 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_8_1024_v2: total: - instructions: 467375447 + instructions: 363313956 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_8_u64: total: - instructions: 336454022 + instructions: 252253558 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_blob_8_u64_v2: total: - instructions: 440446739 + instructions: 334300748 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_u64_blob_8: total: - instructions: 318887564 + instructions: 231996637 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_u64_blob_8_v2: total: - instructions: 385562789 + instructions: 290957570 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_u64_u64: total: - instructions: 321567820 + instructions: 234867637 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_get_u64_u64_v2: total: - instructions: 394823797 + instructions: 298873070 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_insert_10mib_values: total: - instructions: 108248684 + instructions: 99513298 heap_increase: 0 stable_memory_increase: 32 scopes: {} btreemap_insert_blob_1024_128: total: - instructions: 5079697826 + instructions: 4932437171 heap_increase: 0 stable_memory_increase: 262 scopes: {} btreemap_insert_blob_1024_128_v2: total: - instructions: 5494311781 + instructions: 5320898591 heap_increase: 0 stable_memory_increase: 196 scopes: {} btreemap_insert_blob_1024_16: total: - instructions: 5040013834 + instructions: 4894250002 heap_increase: 0 stable_memory_increase: 241 scopes: {} btreemap_insert_blob_1024_16_v2: total: - instructions: 5456153654 + instructions: 5284630493 heap_increase: 0 stable_memory_increase: 181 scopes: {} btreemap_insert_blob_1024_256: total: - instructions: 5092136091 + instructions: 4944651078 heap_increase: 0 stable_memory_increase: 292 scopes: {} btreemap_insert_blob_1024_256_v2: total: - instructions: 5507746910 + instructions: 5333518681 heap_increase: 0 stable_memory_increase: 219 scopes: {} btreemap_insert_blob_1024_32: total: - instructions: 5056052214 + instructions: 4909263380 heap_increase: 0 stable_memory_increase: 239 scopes: {} btreemap_insert_blob_1024_32_v2: total: - instructions: 5471370370 + instructions: 5298675249 heap_increase: 0 stable_memory_increase: 180 scopes: {} btreemap_insert_blob_1024_4: total: - instructions: 4934111732 + instructions: 4790950889 heap_increase: 0 stable_memory_increase: 235 scopes: {} btreemap_insert_blob_1024_4_v2: total: - instructions: 5354320602 + instructions: 5185472451 heap_increase: 0 stable_memory_increase: 176 scopes: {} btreemap_insert_blob_1024_512: total: - instructions: 5182176900 + instructions: 5030151861 heap_increase: 0 stable_memory_increase: 348 scopes: {} btreemap_insert_blob_1024_512_v2: total: - instructions: 5605886956 + instructions: 5426022185 heap_increase: 0 stable_memory_increase: 261 scopes: {} btreemap_insert_blob_1024_64: total: - instructions: 5075777064 + instructions: 4928608138 heap_increase: 0 stable_memory_increase: 250 scopes: {} btreemap_insert_blob_1024_64_v2: total: - instructions: 5491333818 + instructions: 5317541232 heap_increase: 0 stable_memory_increase: 188 scopes: {} btreemap_insert_blob_1024_8: total: - instructions: 5019814842 + instructions: 4875408971 heap_increase: 0 stable_memory_increase: 237 scopes: {} btreemap_insert_blob_1024_8_v2: total: - instructions: 5437515291 + instructions: 5267475770 heap_increase: 0 stable_memory_increase: 178 scopes: {} btreemap_insert_blob_128_1024: total: - instructions: 1536409021 + instructions: 1381031376 heap_increase: 0 stable_memory_increase: 260 scopes: {} btreemap_insert_blob_128_1024_v2: total: - instructions: 1687642343 + instructions: 1510646032 heap_increase: 0 stable_memory_increase: 195 scopes: {} btreemap_insert_blob_16_1024: total: - instructions: 951388361 + instructions: 802983818 heap_increase: 0 stable_memory_increase: 215 scopes: {} btreemap_insert_blob_16_1024_v2: total: - instructions: 1062863507 + instructions: 900358652 heap_increase: 0 stable_memory_increase: 161 scopes: {} btreemap_insert_blob_256_1024: total: - instructions: 2060795775 + instructions: 1906432263 heap_increase: 0 stable_memory_increase: 292 scopes: {} btreemap_insert_blob_256_1024_v2: total: - instructions: 2275084292 + instructions: 2096024018 heap_increase: 0 stable_memory_increase: 219 scopes: {} btreemap_insert_blob_32_1024: total: - instructions: 1007074380 + instructions: 852439720 heap_increase: 0 stable_memory_increase: 230 scopes: {} btreemap_insert_blob_32_1024_v2: total: - instructions: 1113557741 + instructions: 944156278 heap_increase: 0 stable_memory_increase: 173 scopes: {} btreemap_insert_blob_4_1024: total: - instructions: 735053637 + instructions: 601819649 heap_increase: 0 stable_memory_increase: 123 scopes: {} btreemap_insert_blob_4_1024_v2: total: - instructions: 825941796 + instructions: 685719671 heap_increase: 0 stable_memory_increase: 92 scopes: {} btreemap_insert_blob_512_1024: total: - instructions: 3139046499 + instructions: 2985018960 heap_increase: 0 stable_memory_increase: 351 scopes: {} btreemap_insert_blob_512_1024_v2: total: - instructions: 3425690686 + instructions: 3244662757 heap_increase: 0 stable_memory_increase: 263 scopes: {} btreemap_insert_blob_64_1024: total: - instructions: 1274024384 + instructions: 1116942462 heap_increase: 0 stable_memory_increase: 245 scopes: {} btreemap_insert_blob_64_1024_v2: total: - instructions: 1395193885 + instructions: 1219328855 heap_increase: 0 stable_memory_increase: 183 scopes: {} btreemap_insert_blob_8_1024: total: - instructions: 863854010 + instructions: 720470828 heap_increase: 0 stable_memory_increase: 183 scopes: {} btreemap_insert_blob_8_1024_v2: total: - instructions: 962333391 + instructions: 811304273 heap_increase: 0 stable_memory_increase: 138 scopes: {} btreemap_insert_blob_8_u64: total: - instructions: 545636080 + instructions: 416168832 heap_increase: 0 stable_memory_increase: 6 scopes: {} btreemap_insert_blob_8_u64_v2: total: - instructions: 661580061 + instructions: 514617225 heap_increase: 0 stable_memory_increase: 4 scopes: {} btreemap_insert_u64_blob_8: total: - instructions: 573146081 + instructions: 426450307 heap_increase: 0 stable_memory_increase: 7 scopes: {} btreemap_insert_u64_blob_8_v2: total: - instructions: 639811616 + instructions: 492818493 heap_increase: 0 stable_memory_increase: 5 scopes: {} btreemap_insert_u64_u64: total: - instructions: 587088393 + instructions: 438058583 heap_increase: 0 stable_memory_increase: 7 scopes: {} btreemap_insert_u64_u64_v2: total: - instructions: 658648981 + instructions: 508135036 heap_increase: 0 stable_memory_increase: 6 scopes: {} btreemap_remove_blob_128_1024: total: - instructions: 1908733808 + instructions: 1693092896 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_128_1024_v2: total: - instructions: 2069887328 + instructions: 1834843882 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_16_1024: total: - instructions: 1193102422 + instructions: 994045948 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_16_1024_v2: total: - instructions: 1341709311 + instructions: 1127685703 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_256_1024: total: - instructions: 2520902632 + instructions: 2307255652 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_256_1024_v2: total: - instructions: 2691298366 + instructions: 2456187441 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_32_1024: total: - instructions: 1273281888 + instructions: 1066324254 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_32_1024_v2: total: - instructions: 1426541560 + instructions: 1202125590 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_4_1024: total: - instructions: 766088096 + instructions: 616566216 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_4_1024_v2: total: - instructions: 873890895 + instructions: 716542736 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_512_1024: total: - instructions: 3815387805 + instructions: 3596249202 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_512_1024_v2: total: - instructions: 3990988900 + instructions: 3748172387 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_64_1024: total: - instructions: 1591287725 + instructions: 1376819825 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_64_1024_v2: total: - instructions: 1746766027 + instructions: 1514472314 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_8_1024: total: - instructions: 985702502 + instructions: 805394764 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_8_1024_v2: total: - instructions: 1108650833 + instructions: 921132101 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_8_u64: total: - instructions: 705188477 + instructions: 538725231 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_blob_8_u64_v2: total: - instructions: 859065955 + instructions: 672706816 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_u64_blob_8: total: - instructions: 795377675 + instructions: 597013331 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_u64_blob_8_v2: total: - instructions: 888125291 + instructions: 693174306 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_u64_u64: total: - instructions: 824367113 + instructions: 620591054 heap_increase: 0 stable_memory_increase: 0 scopes: {} btreemap_remove_u64_u64_v2: total: - instructions: 929150432 + instructions: 725619289 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -505,97 +505,97 @@ benches: scopes: {} memory_manager_grow: total: - instructions: 286667074 + instructions: 286247872 heap_increase: 2 stable_memory_increase: 32000 scopes: {} memory_manager_overhead: total: - instructions: 4612430 + instructions: 4545062 heap_increase: 0 stable_memory_increase: 8320 scopes: {} vec_get_blob_128: total: - instructions: 22383822 + instructions: 20896057 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_16: total: - instructions: 11331427 + instructions: 9789410 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_32: total: - instructions: 12152133 + instructions: 10620310 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_4: total: - instructions: 7041316 + instructions: 5789429 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_64: total: - instructions: 16822266 + instructions: 15306283 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_blob_8: total: - instructions: 8467007 + instructions: 7026042 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_get_u64: total: - instructions: 7680243 + instructions: 6270307 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_insert_blob_128: total: - instructions: 5112753 + instructions: 3782818 heap_increase: 0 stable_memory_increase: 19 scopes: {} vec_insert_blob_16: total: - instructions: 5050509 + instructions: 3780574 heap_increase: 0 stable_memory_increase: 2 scopes: {} vec_insert_blob_32: total: - instructions: 5110905 + instructions: 3780970 heap_increase: 0 stable_memory_increase: 5 scopes: {} vec_insert_blob_4: total: - instructions: 5110245 + instructions: 3780310 heap_increase: 0 stable_memory_increase: 0 scopes: {} vec_insert_blob_64: total: - instructions: 5111433 + instructions: 3781498 heap_increase: 0 stable_memory_increase: 9 scopes: {} vec_insert_blob_8: total: - instructions: 5110377 + instructions: 3780442 heap_increase: 0 stable_memory_increase: 1 scopes: {} vec_insert_u64: total: - instructions: 8060377 + instructions: 5850442 heap_increase: 0 stable_memory_increase: 1 scopes: {} From 0e2e90c5b83ab08d8a6f458d5a326b90c6991fa8 Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Mon, 12 Feb 2024 12:04:53 +0100 Subject: [PATCH 3/5] . --- benchmarks/src/memory_manager.rs | 2 +- benchmarks/src/vec.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/src/memory_manager.rs b/benchmarks/src/memory_manager.rs index 53497d02..ecbb999b 100644 --- a/benchmarks/src/memory_manager.rs +++ b/benchmarks/src/memory_manager.rs @@ -1,4 +1,4 @@ -use canbench_rs::{bench_fn, bench, BenchResult}; +use canbench_rs::{bench, bench_fn, BenchResult}; use ic_stable_structures::memory_manager::{MemoryId, MemoryManager}; use ic_stable_structures::{DefaultMemoryImpl, Memory}; diff --git a/benchmarks/src/vec.rs b/benchmarks/src/vec.rs index 9bebe9ff..564e1ff8 100644 --- a/benchmarks/src/vec.rs +++ b/benchmarks/src/vec.rs @@ -1,5 +1,5 @@ use crate::Random; -use canbench_rs::{bench_fn, bench, BenchResult}; +use canbench_rs::{bench, bench_fn, BenchResult}; use ic_stable_structures::storable::Blob; use ic_stable_structures::{DefaultMemoryImpl, StableVec, Storable}; use tiny_rng::{Rand, Rng}; From aaa4fbe80adb1958717af41ce7c173b74ac8826a Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Mon, 12 Feb 2024 13:07:19 +0100 Subject: [PATCH 4/5] . --- .github/workflows/canbench_ci_run_benchmark.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/canbench_ci_run_benchmark.sh b/.github/workflows/canbench_ci_run_benchmark.sh index 64be66c8..44408462 100644 --- a/.github/workflows/canbench_ci_run_benchmark.sh +++ b/.github/workflows/canbench_ci_run_benchmark.sh @@ -54,15 +54,20 @@ if [ -f "$MAIN_BRANCH_RESULTS_FILE" ]; then # Run canbench to compare result to main branch. pushd "$CANISTER_PATH" + set +e canbench --less-verbose > $CANBENCH_OUTPUT + RES=$? + set -e popd - if grep -q "(regress\|(improved by" "${CANBENCH_OUTPUT}"; then - echo "**Significant performance change detected! ⚠️** - " >> $COMMENT_MESSAGE_PATH; - else - echo "**No significant performance changes detected ✅** - " >> $COMMENT_MESSAGE_PATH + if [ "$RES" -eq 0 ]; then + if grep -q "(regress\|(improved by" "${CANBENCH_OUTPUT}"; then + echo "**Significant performance change detected! ⚠️** + " >> $COMMENT_MESSAGE_PATH; + else + echo "**No significant performance changes detected ✅** + " >> $COMMENT_MESSAGE_PATH + fi fi fi From 425a746606b4c1e219076379582bf8ade18d15ca Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Mon, 12 Feb 2024 13:08:42 +0100 Subject: [PATCH 5/5] . --- .github/workflows/canbench_ci_run_benchmark.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/canbench_ci_run_benchmark.sh b/.github/workflows/canbench_ci_run_benchmark.sh index 44408462..a3dca99c 100644 --- a/.github/workflows/canbench_ci_run_benchmark.sh +++ b/.github/workflows/canbench_ci_run_benchmark.sh @@ -68,6 +68,9 @@ if [ -f "$MAIN_BRANCH_RESULTS_FILE" ]; then echo "**No significant performance changes detected ✅** " >> $COMMENT_MESSAGE_PATH fi + else + echo "Failed to run \`canbench\` against main branch ⚠️ + " >> $COMMENT_MESSAGE_PATH fi fi