Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Co #11456: Match statement fallthrough for benchmark commands #1350

Merged
merged 5 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion parachain-template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,12 @@ pub fn run() -> Result<()> {

cmd.run(config, partials.client.clone(), db, storage)
}),
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
BenchmarkCmd::Machine(cmd) =>
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())),
// NOTE: this allows the Client to leniently implement
// new benchmark commands without requiring a companion MR.
#[allow(unreachable_patterns)]
_ => Err("Benchmarking sub-command unsupported".into()),
}
},
Some(Subcommand::TryRuntime(cmd)) => {
Expand Down
5 changes: 4 additions & 1 deletion polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,12 @@ pub fn run() -> Result<()> {
cmd.run(config, partials.client.clone(), db, storage)
})
}),
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
BenchmarkCmd::Machine(cmd) =>
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())),
// NOTE: this allows the Client to leniently implement
// new benchmark commands without requiring a companion MR.
#[allow(unreachable_patterns)]
_ => Err("Benchmarking sub-command unsupported".into()),
}
},
Some(Subcommand::TryRuntime(cmd)) => {
Expand Down