refactor(benchmarking): rebrand pallet → pezpallet in CLI and scripts
- Rename CLI argument --pallet to --pezpallet (with --pallet as alias) - Rename --pallets to --pezpallet, --exclude-pallets to --exclude-pezpallets - Update benchmark subcommand from 'pallet' to 'pezpallet' - Rename check-frame-omni-bencher.yml to check-pezframe-omni-bencher.yml - Update all benchmark scripts to use new argument names - Update cmd.py to use pezframe-omni-bencher and --pezpallet
This commit is contained in:
@@ -29,8 +29,8 @@ run_benchmark() {
|
||||
echo "Outputting to '$output_file'"
|
||||
|
||||
WASMTIME_BACKTRACE_DETAILS=1 RUST_LOG=${LOG} \
|
||||
../../../../../target/release/pezframe-omni-bencher v1 benchmark pallet \
|
||||
--pallet "$pallet_name" \
|
||||
../../../../../target/release/pezframe-omni-bencher v1 benchmark pezpallet \
|
||||
--pezpallet "$pallet_name" \
|
||||
--extrinsic "*" \
|
||||
--runtime "$WASM_BLOB_PATH" \
|
||||
--steps "$STEPS" \
|
||||
|
||||
@@ -133,11 +133,11 @@ for PALLET in "${PALLETS[@]}"; do
|
||||
echo "[+] Benchmarking $PALLET with weight file $WEIGHT_FILE";
|
||||
|
||||
OUTPUT=$(
|
||||
$BIZINIKIWI benchmark pallet \
|
||||
$BIZINIKIWI benchmark pezpallet \
|
||||
--chain=dev \
|
||||
--steps=50 \
|
||||
--repeat=20 \
|
||||
--pallet="$PALLET" \
|
||||
--pezpallet="$PALLET" \
|
||||
--extrinsic="*" \
|
||||
--wasm-execution=compiled \
|
||||
--heap-pages=4096 \
|
||||
|
||||
@@ -633,13 +633,13 @@ impl PalletCmd {
|
||||
|
||||
/// Whether this pezpallet should be run.
|
||||
fn pezpallet_selected(&self, pezpallet: &Vec<u8>) -> bool {
|
||||
let include = self.pallets.clone();
|
||||
let include = self.pezpallet.clone();
|
||||
|
||||
let included = include.is_empty()
|
||||
|| include.iter().any(|p| p.as_bytes() == pezpallet)
|
||||
|| include.iter().any(|p| p == "*")
|
||||
|| include.iter().any(|p| p == "all");
|
||||
let excluded = self.exclude_pallets.iter().any(|p| p.as_bytes() == pezpallet);
|
||||
let excluded = self.exclude_pezpallets.iter().any(|p| p.as_bytes() == pezpallet);
|
||||
|
||||
included && !excluded
|
||||
}
|
||||
|
||||
@@ -50,18 +50,18 @@ pub enum ListOutput {
|
||||
/// Benchmark the extrinsic weight of FRAME Pallets.
|
||||
#[derive(Debug, clap::Parser)]
|
||||
pub struct PalletCmd {
|
||||
/// Select a FRAME Pallets to benchmark, or `*` for all (in which case `extrinsic` must be
|
||||
/// Select a FRAME Pezpallets to benchmark, or `*` for all (in which case `extrinsic` must be
|
||||
/// `*`).
|
||||
#[arg(short, long, alias = "pezpallet", num_args = 1.., value_delimiter = ',', value_parser = parse_pallet_name, required_unless_present_any = ["list", "json_input", "all"], default_value_if("all", "true", Some("*".into())))]
|
||||
pub pallets: Vec<String>,
|
||||
#[arg(short, long, alias = "pallet", num_args = 1.., value_delimiter = ',', value_parser = parse_pallet_name, required_unless_present_any = ["list", "json_input", "all"], default_value_if("all", "true", Some("*".into())))]
|
||||
pub pezpallet: Vec<String>,
|
||||
|
||||
/// Select an extrinsic inside the pezpallet to benchmark, or `*` or 'all' for all.
|
||||
#[arg(short, long, required_unless_present_any = ["list", "json_input", "all"], default_value_if("all", "true", Some("*".into())))]
|
||||
pub extrinsic: Option<String>,
|
||||
|
||||
/// Comma separated list of pallets that should be excluded from the benchmark.
|
||||
/// Comma separated list of pezpallets that should be excluded from the benchmark.
|
||||
#[arg(long, value_parser, num_args = 1.., value_delimiter = ',')]
|
||||
pub exclude_pallets: Vec<String>,
|
||||
pub exclude_pezpallets: Vec<String>,
|
||||
|
||||
/// Comma separated list of `pezpallet::extrinsic` combinations that should not be run.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user