Sub-commands for benchmark #11164
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
bot rebase |
|
Rebasing |
| }, | ||
| _ => Err("Sub-command is not supported".into()), | ||
| }) | ||
| }, |
There was a problem hiding this comment.
Why not add the other sub commands to the node template? Seems like they would be helpful if someone is basing a new project off the template
There was a problem hiding this comment.
Yea that's a good follow-up, I'll put it in an issue. Just wanted to get it done faster 😄
The node-template currently uses the weights from frame_support, so even when you run the benchmarks yourself, it would require some updating to actually use them in the node-template.
There was a problem hiding this comment.
Okay I added it now in the last commit since @shawntabrizi also wanted it.
There is infrastructure missing in the node-template, therefore the copy&paste from the substrate node.
emostov
left a comment
There was a problem hiding this comment.
LGTM - just had some optional suggestions
Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
bot merge |
* Restructure benchmark commands Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add benchmark block test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup imports Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Extend error message Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add commands to node-template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
Needed after substrate `benchmark` sub-command change PR paritytech/substrate#11164
* chore: bump deps to Polkadot v0.9.19 * fix: LengthToFee https://github.com/paritytech/substrate/pull/10785/files * fix: remove u32_trait paritytech/substrate#10850 * fix: client paritytech/substrate#11164 paritytech/cumulus#963 paritytech/cumulus#1069 paritytech/substrate#10878 * fix: clippy runtime * fix: clippy clone * feat: add para runtime enum for client * ci: bump paritytech/ci-linux image * fix: clippy * refactor: benchmark cmd match * fix: peregrune runtime api
* chore: bump deps to Polkadot v0.9.19 * fix: LengthToFee https://github.com/paritytech/substrate/pull/10785/files * fix: remove u32_trait paritytech/substrate#10850 * fix: client paritytech/substrate#11164 paritytech/cumulus#963 paritytech/cumulus#1069 paritytech/substrate#10878 * fix: clippy runtime * fix: clippy clone * feat: add para runtime enum for client * ci: bump paritytech/ci-linux image * fix: clippy * refactor: benchmark cmd match * fix: peregrune runtime api (cherry picked from commit 6f2016b)
* Restructure benchmark commands Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add benchmark block test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup imports Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Extend error message Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add commands to node-template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
* Restructure benchmark commands Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add benchmark block test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup imports Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Extend error message Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add commands to node-template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
Changes:
benchmark palletsub-command.sharedmodulebenchmark blockMany of the changes are just moved files, the interesting part is in
node/cli/src/.The output of the
benchmarkcommand now looks like this:Polkadot companion: paritytech/polkadot#5247
Cumulus companion: paritytech/cumulus#1156
Closes #11140, #11153