mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
* Add storage benchmarking Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
d946582707
commit
86f2d65a72
Generated
+185
-162
File diff suppressed because it is too large
Load Diff
@@ -54,6 +54,9 @@ pub enum Subcommand {
|
||||
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
#[clap(name = "benchmark-storage", about = "Benchmark storage speed.")]
|
||||
BenchmarkStorage(frame_benchmarking_cli::StorageCmd),
|
||||
|
||||
/// Runs performance checks such as PVF compilation in order to measure machine
|
||||
/// capabilities of running a validator.
|
||||
HostPerfCheck,
|
||||
|
||||
@@ -475,6 +475,22 @@ pub fn run() -> Result<()> {
|
||||
#[cfg(not(feature = "polkadot-native"))]
|
||||
panic!("No runtime feature (polkadot, kusama, westend, rococo) is enabled")
|
||||
},
|
||||
Some(Subcommand::BenchmarkStorage(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
let chain_spec = &runner.config().chain_spec;
|
||||
set_default_ss58_version(chain_spec);
|
||||
|
||||
Ok(runner.async_run(|mut config| {
|
||||
let (client, backend, _, task_manager) = service::new_chain_ops(&mut config, None)?;
|
||||
let db = backend.expose_db();
|
||||
let storage = backend.expose_storage();
|
||||
|
||||
Ok((
|
||||
cmd.run(config, client, db, storage).map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
))
|
||||
})?)
|
||||
},
|
||||
Some(Subcommand::HostPerfCheck) => {
|
||||
let mut builder = sc_cli::LoggerBuilder::new("");
|
||||
builder.with_colors(true);
|
||||
|
||||
Reference in New Issue
Block a user