-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Batch benchmarks together with * notation.
#5436
Conversation
| fn dispatch_benchmark( | ||
| module: Vec<u8>, | ||
| extrinsic: Vec<u8>, | ||
| pallet: Vec<u8>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pallet: Vec<u8>, | |
| pallet: &[u8], |
Shouldn't these also use slice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values from from structopt, so I think they will be Vecs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Tested locally and works well.
I made a PR #5445
Which iterates on this and does the following:
- Moves the macro to
frame_benchmarking - Updates the name from
pallet!toadd_benchmark! - Update the syntax and construction of the macro just a little bit to pass the non-local variables to the rust macro.
Its a little bit nasty, but imo not that bad.
- Adds some docs.
If you like it, please merge before committing. Else, this is good as is too.
* Move macro into `frame_benchmarking` * Update docs * Extra line * Return error if `batches` is empty
gui1117
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
…aritytech#948) * Use `add_benchmark` macro * Return error if `batches` is empty * Update Cargo.lock * Companion for paritytech#5463 (paritytech#953) * Fix test with genesis block 0 * Update Cargo.lock
polkadot companion: paritytech/polkadot#948