mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 13:37:57 +00:00
Support running the pallet benchmarks analysis without running the benchmarks (#12361)
* Support running the pallet benchmarks analysis without running the benchmarks * Rename `override-results` to `json-input` and update the help comment * ".git/.scripts/fmt.sh" 1 Co-authored-by: command-bot <>
This commit is contained in:
@@ -35,11 +35,11 @@ fn parse_pallet_name(pallet: &str) -> String {
|
||||
#[derive(Debug, clap::Parser)]
|
||||
pub struct PalletCmd {
|
||||
/// Select a FRAME Pallet to benchmark, or `*` for all (in which case `extrinsic` must be `*`).
|
||||
#[clap(short, long, parse(from_str = parse_pallet_name), required_unless_present = "list")]
|
||||
#[clap(short, long, parse(from_str = parse_pallet_name), required_unless_present_any = ["list", "json-input"])]
|
||||
pub pallet: Option<String>,
|
||||
|
||||
/// Select an extrinsic inside the pallet to benchmark, or `*` for all.
|
||||
#[clap(short, long, required_unless_present = "list")]
|
||||
#[clap(short, long, required_unless_present_any = ["list", "json-input"])]
|
||||
pub extrinsic: Option<String>,
|
||||
|
||||
/// Select how many samples we should take across the variable components.
|
||||
@@ -166,4 +166,10 @@ pub struct PalletCmd {
|
||||
/// template for that purpose.
|
||||
#[clap(long)]
|
||||
pub no_storage_info: bool,
|
||||
|
||||
/// A path to a `.json` file with existing benchmark results generated with `--json` or
|
||||
/// `--json-file`. When specified the benchmarks are not actually executed, and the data for
|
||||
/// the analysis is read from this file.
|
||||
#[clap(long)]
|
||||
pub json_input: Option<PathBuf>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user