$ cargo build --release --features runtime-benchmarks
$ ./target/release/dorafactory-node benchmark --chain dev --execution=wasm --wasm-execution=compiled --pallet pallet_template --extrinsic do_something -
-steps 20 --repeat 50 --json-file=raw.json --output ./
=====report=====
2022-03-27 03:38:52 assembling new collators for new session 0 at #0
2022-03-27 03:38:52 assembling new collators for new session 1 at #0
Error: Input("No benchmarks found which match your input.")
2 Answers
Looks like this line is missing:
list_benchmark!(list, extra, pallet_dao_core, DaoCoreModule);
(or whatever pallet your do_something extrinsic is in)
(./target/release/dorafactory-node benchmark --chain=dev --list
did not seem to show the benchmark)
Using “—-dev” instead of “—-chain dev” is a better option for these kinds of tests. The reason is “—-dev” has an implicit “——tmp” which makes sure you don’t need to deal with the previous history of your development tests. It starts a fresh chain for you. In your case I’m afraid that while you’re running a new client with the benchmark features built-in, your runtime is still coming from your previous builds, meaning it doesn’t feature the benchmark option. This is because the runtime would only change on a runtime upgrade. But when you start a fresh dev blockchain the currently built runtime will be used as your runtime.
-
-
Can you instead of pallet_template and doSomthing pass “*” and check if it runs?– Alex SedMar 27, 2022 at 1:32
add-fees
. thanks! github.com/doraFactory/dorafactory-node/blob/add-fees/pallets/…./target/release/dorafactory-node benchmark --chain=dev --list
? This should list all of your available benchmarks.