Very good question!
The weights that you mentioned are also generated by the
It has several sub-commands which are explained in the README:
$ cargo run --profile=production -- benchmark
Sub-commands concerned with benchmarking.
substrate benchmark <SUBCOMMAND>
-h, --help Print help information
-V, --version Print version information
block Benchmark the execution time of historic blocks
machine Command to benchmark the hardware.
overhead Benchmark the execution overhead per-block and per-extrinsic
pallet Benchmark the extrinsic weight of FRAME Pallets
storage Benchmark the storage speed of a chain snapshot
The equivalence here is:
benchmark storage creates
benchmark overhead creates
All this is documented in the linked README above.
You can get an impression what parameters to use for these commands when looking at the header of each weigh file in Polkadot. There you will see something like:
//! DATABASE: `ParityDb`, RUNTIME: `Polkadot`
//! BLOCK-NUM: `BlockId::Number(9653477)`
//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1`
//! STATE-VERSION: `V0`, STATE-CACHE-SIZE: `0`
//! WEIGHT-PATH: `runtime/polkadot/constants/src/weights/`
//! METRIC: `Average`, WEIGHT-MUL: `1.1`, WEIGHT-ADD: `0`
// Executed Command:
// benchmark storage
Which tells you how it was called.
PS: The commands had a
- in the name formerly which got removed now.