mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Consolidate frame benchmarking into a frame crate (#4977)
This prs cleans up some of the frame benchmarking stuff: - Move CLI into `frame-benchmarking-cli`. No frame related CLI should exists in the default Substrate CLI. - Move all traits and types related to frame benchmarking into the `frame-benchmarking` trait. Frame types should be isolated in Frame.
This commit is contained in:
@@ -53,6 +53,13 @@ pub enum Subcommand {
|
||||
about = "Decode given block or extrinsic using current native runtime."
|
||||
)]
|
||||
Inspect(node_inspect::cli::InspectCmd),
|
||||
|
||||
/// The custom benchmark subcommmand benchmarking runtime pallets.
|
||||
#[structopt(
|
||||
name = "benchmark",
|
||||
about = "Benchmark runtime pallets."
|
||||
)]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
}
|
||||
|
||||
/// The `factory` command used to generate transactions.
|
||||
|
||||
@@ -43,12 +43,17 @@ where
|
||||
cmd.init(&mut config, load_spec, &version)?;
|
||||
|
||||
let client = sc_service::new_full_client::<
|
||||
node_runtime::Block,node_runtime::RuntimeApi, node_executor::Executor, _, _,
|
||||
node_runtime::Block, node_runtime::RuntimeApi, node_executor::Executor, _, _,
|
||||
>(&config)?;
|
||||
let inspect = node_inspect::Inspector::<node_runtime::Block>::new(client);
|
||||
|
||||
cmd.run(inspect)
|
||||
},
|
||||
Some(Subcommand::Benchmark(cmd)) => {
|
||||
cmd.init(&mut config, load_spec, &version)?;
|
||||
|
||||
cmd.run::<_, _, node_runtime::Block, node_executor::Executor>(config)
|
||||
},
|
||||
Some(Subcommand::Factory(cli_args)) => {
|
||||
sc_cli::init(&cli_args.shared_params, &version)?;
|
||||
sc_cli::init_config(&mut config, &cli_args.shared_params, &version, load_spec)?;
|
||||
|
||||
Reference in New Issue
Block a user