Identity pallet benchmark
- Add benchmark for the Identity pallet.
Merge request reports
Activity
added RN-runtime label
changed milestone to %runtime-500
added 13 commits
-
fb1916de...4d5e08be - 12 commits from branch
nodes/rust:master
- c1a1bbfe - feat: add pallet identity benchmark
-
fb1916de...4d5e08be - 12 commits from branch
- Resolved by Benjamin Gallois
added 4 commits
-
a693f9f8...aac91ac9 - 2 commits from branch
nodes/rust:master
- b3fd4a9b - feat(node): add genesis builder for benchmarking
- bc6ca328 - feat: add pallet identity benchmark
-
a693f9f8...aac91ac9 - 2 commits from branch
- Added a genesis builder with prepared identities to run the benchmark using
--chain=gdev-benchmark
. - Added pallet identity benchmark.
- Updated the runtime configuration to use the computed weights using a placeholder until
runtime/common/src/weights/pallet_identity.rs
has been generated using the reference machine.
- Added a genesis builder with prepared identities to run the benchmark using
added 1 commit
- e3231808 - doc(benchmark): add some air in the benchmark doc
- Resolved by Hugo Trentesaux
I tried
./target/release/duniter benchmark pallet --chain=gdev-benchmark --steps=1 --repeat=1 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=.
and got
Error: Input("No benchmarks found which match your input.")
Where is the mistake?
Yes, I will commit the
Cargo.lock
with the "sp-keystore" that is necessary to run the tests of the pallet.To clarify the point 5 of the documentation:
At the beginning, thepallets/identity/src/weights.rs
does not exist at all and the pallet doesn't use any weight info. We run the benchmark to create automaticallyruntime/common/src/weights/pallet_identity.rs
. We use this file to create manually thepallets/identity/src/weights.rs
that will contain the trait definition and a dummy implementation for testing purpose. After that, we can use the weight info inside the pallet that will run on test and runtime. At the end, the benchmark can be run again, but on the reference machine to regenerateruntime/common/src/weights/pallet_identity.rs
.As we will not squash the commits from this MR, I suggest:
- detailing point 5 of the doc with what you describe in previous post
- create
runtime/common/src/weights/pallet_<pallet>.rs
automatically - add
pallets/<pallet>/src/weights.rs
manually
- create
- reflect these steps in the commit history so that the topological order matches the previous chronological order
This way, the commits from this MR could serve as an example of the steps detailed in the doc.
- detailing point 5 of the doc with what you describe in previous post