$ 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.")
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.