I'm following along this benchmark docs to run benchmarking on my Substrate node (dependencies on branch = "polkadot-v0.9.25"
) with the command cargo build --release --features runtime-benchmarks
and it works successfully. But then, when I tried to run the next step with this command:
./target/release/my-node benchmark pallet \
--chain=dev \
--execution=wasm \
--wasm-execution=compiled \
--pallet "*" \
--extrinsic "*" \
--steps 50 \
--repeat 20 \
--output pallets/all-weight.rs
I got an error:
Error: Input("Runtime benchmarking wasn't enabled when building the node. You can enable it with `--features runtime-benchmarks`.")
I've checked the runtime-benchmarks
features in Cargo.toml and define_benchmarks!
in the Runtime but I don't think something missing there.
I suspected that the problem could probably come from runner.sync_run
in node's command.rs
but couldn't get a good grasp of the root cause.
What else could I miss here?