mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
Add benchmark-block command (#11091)
* Add benchmark-block command Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Beauty fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Beauty fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
879960a815
commit
fa8fa8fa33
@@ -42,6 +42,13 @@ pub enum Subcommand {
|
||||
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// Benchmark the execution time of historic blocks and compare it to their consumed weight.
|
||||
#[clap(
|
||||
name = "benchmark-block",
|
||||
about = "Benchmark the execution time of historic blocks and compare it to their consumed weight."
|
||||
)]
|
||||
BenchmarkBlock(frame_benchmarking_cli::BlockCmd),
|
||||
|
||||
/// Sub command for benchmarking the per-block and per-extrinsic execution overhead.
|
||||
#[clap(
|
||||
name = "benchmark-overhead",
|
||||
|
||||
@@ -98,6 +98,13 @@ pub fn run() -> Result<()> {
|
||||
You can enable it with `--features runtime-benchmarks`."
|
||||
.into())
|
||||
},
|
||||
Some(Subcommand::BenchmarkBlock(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
runner.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, .. } = new_partial(&config)?;
|
||||
Ok((cmd.run(client), task_manager))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::BenchmarkOverhead(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
runner.async_run(|mut config| {
|
||||
|
||||
Reference in New Issue
Block a user