Skip to content

Commit f6fb695

Browse files
authored
Merge branch 'master' into jack/crp-1559
2 parents e1a5113 + bdd0822 commit f6fb695

File tree

18 files changed

+223
-154
lines changed

18 files changed

+223
-154
lines changed

.github/workflows/schedule-rust-bench.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ jobs:
6060
run: |
6161
echo -e "\e[34mRunning rust benchmarks on dedicated machine fr1-spm15!\e[0m"
6262
63+
CRITERION_HOME=$(mktemp -d)
64+
trap "rm -rf $CRITERION_HOME" INT TERM EXIT
65+
6366
while IFS= read -r tgt; do
64-
bazel run "$tgt"
67+
bazel run "$tgt" -- --criterion-home "$CRITERION_HOME"
6568
done < <(bazel query "attr(tags, 'rust_bench', ${{ matrix.target }})")
6669
6770
while IFS= read -r bench_dir; do
@@ -82,6 +85,6 @@ jobs:
8285
>report.json
8386
curl --fail --retry 2 -sS -o /dev/null -X POST -H 'Content-Type: application/json' --data @report.json \
8487
"https://elasticsearch.testnet.dfinity.network/ci-performance-test/_doc"
85-
done < <(find -L ./bazel-out -type d -path '*/new')
88+
done < <(find -L "$CRITERION_HOME" -type d -path '*/new')
8689
8790
echo -e "\e[34mRust benchmarks on dedicated machine fr1-spm15 finished.\e[0m"

Cargo.lock

Lines changed: 16 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,14 +683,12 @@ ic-cdk-timers = "1.0.0"
683683
ic-certificate-verification = "3"
684684
ic-certification = "3"
685685
ic-doge-interface = { git = "https://github.com/dfinity/dogecoin-canister", rev = "74e6dc9a10ba64d2dbad013282c26d74cd49863f" }
686-
ic-ed25519 = "0.4.0"
687686
ic-gateway = { git = "https://github.com/dfinity/ic-gateway", rev = "92ee522a4514584ccf6de487ba40d92063effd9a", default-features = false }
688687
ic-http-certification = "3.0.3"
689688
ic-http-gateway = { git = "https://github.com/dfinity/http-gateway", rev = "c17ad1b378df3a85441ce2c6853ec61b6f83f730" }
690689
ic-identity-hsm = "0.40.1"
691690
ic-management-canister-types = "0.5.0"
692691
ic-response-verification = "3"
693-
ic-secp256k1 = "0.3.0"
694692
ic-sha3 = "1.0.0"
695693
ic-stable-structures = "0.6.8"
696694
ic-transport-types = { version = "0.40.1" }

bazel/generic_rust_bench.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
set -euo pipefail
44

5+
# criterion supports specifying a "home" where it places its benchmark result tree.
6+
# at the time of writing, our bazel version (.bazelversion) is outdated and sh_binary
7+
# does not support `env_inherit` so add (or rather intercept) a new CLI argument
8+
# `--criterion-home` which we convert into `CRITERION_HOME`, which is read by
9+
# criterion.rs.
10+
#
11+
# https://github.com/criterion-rs/criterion.rs/blob/950c3b727a09d10067ea686e2ac6f1f23569168f/src/lib.rs#L142-L142
12+
13+
# store passthru args
14+
args=()
15+
while [[ $# -gt 0 ]]; do
16+
case $1 in
17+
--criterion-home)
18+
shift
19+
export CRITERION_HOME="$1"
20+
;;
21+
*)
22+
# passthru
23+
args+=("$1")
24+
shift
25+
;;
26+
esac
27+
done
28+
529
# When Cargo runs benchmarks, it passes the --bench or --test command-line arguments to
630
# the benchmark executables. Criterion.rs looks for these arguments and tries to either
731
# run benchmarks or run in test mode. In particular, when you run cargo test --benches
@@ -11,7 +35,7 @@ set -euo pipefail
1135
# present, or when --bench and --test are both present.
1236
#
1337
# https://bheisler.github.io/criterion.rs/book/faq.html#when-i-run-benchmark-executables-directly-without-using-cargo-they-just-print-success-why
14-
CMD="${BAZEL_DEFS_BENCH_PREFIX}${BAZEL_DEFS_BENCH_BIN} --bench $@"
38+
CMD="${BAZEL_DEFS_BENCH_PREFIX}${BAZEL_DEFS_BENCH_BIN} --bench ${args[@]}"
1539

1640
echo "running ${CMD}"
1741
${CMD}

mainnet-canister-revisions.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@
8484
"sha256": "bce508df3db43b47b158c0aab9a7c9a3709a78e055a7ced76d5ff89832f9e778"
8585
},
8686
"governance": {
87-
"rev": "724ae4101bfdd8d4443126a6a8b1ec5ca9b68a12",
88-
"sha256": "f00255c9e776ee375c2846e310031219f154b75bc6bd6e1b1e3bb62e59a50b97"
87+
"rev": "c9ab58bfd048522d56401b879ddb890626e111e5",
88+
"sha256": "ba8493ec7bc2be6360e62c5e9297d7f4c548992d944185cf4e3508fb7b23da4d"
8989
},
9090
"governance-canister_test": {
91-
"rev": "724ae4101bfdd8d4443126a6a8b1ec5ca9b68a12",
92-
"sha256": "6069543d0fdcb35f1a757542844b811b1a5cffc1fe12d03986e49fc1adde12a1"
91+
"rev": "c9ab58bfd048522d56401b879ddb890626e111e5",
92+
"sha256": "94d064aaae624d159ece411533965a12794582bb78e089e221597337c1269cf3"
9393
},
9494
"index": {
9595
"rev": "3ae3649a2366aaca83404b692fc58e4c6e604a25",
@@ -112,16 +112,16 @@
112112
"sha256": "2bcf1c2c8adba6f7bff5e7abda164f22e0a8f6a07120fbe3596c94234727d04c"
113113
},
114114
"nns_dapp_test": {
115-
"sha256": "ab640ac8df064da1c4b9feb3b9938b3cc0a8f578b702a34e99ca9a0e36da7b85",
116-
"tag": "proposal-139482"
115+
"sha256": "37935da32289fb7f42d5b166b1e858322a7144422eccd9b03c6081da51b878f3",
116+
"tag": "proposal-139676"
117117
},
118118
"node-rewards": {
119-
"rev": "a23bb5a4a5b8824bddf103c5fdcadbbae8d6ae05",
120-
"sha256": "eefe64585ebba5283f6ad03eadff6600fdfd577e3c1f0854756b4bef1c6764aa"
119+
"rev": "d2a13f0ecb29c96818d24076925d5da19ae61e93",
120+
"sha256": "53cc70006aa957e655c28d30198ba945dffda4d71515954c4c7e596c0caede59"
121121
},
122122
"registry": {
123-
"rev": "724ae4101bfdd8d4443126a6a8b1ec5ca9b68a12",
124-
"sha256": "4842f2cb8fbe9b57d08edf5c66608be7a56eec27bced313c3ed194da263d36c0"
123+
"rev": "c9ab58bfd048522d56401b879ddb890626e111e5",
124+
"sha256": "c5ceecda0dbc8bc50d246ef0fa6aa93fb02138e09192533bb9ca150fd9e348ee"
125125
},
126126
"root": {
127127
"rev": "c558689f2aed7dbd745474a3cbda84ba0825b4a8",

0 commit comments

Comments
 (0)