Struct frame_benchmarking_cli::BenchmarkCmd [−][src]
pub struct BenchmarkCmd {}Show fields
pub pallet: Option<String>, pub extrinsic: Option<String>, pub steps: u32, pub lowest_range_values: Vec<u32>, pub highest_range_values: Vec<u32>, pub repeat: u32, pub external_repeat: u32, pub raw_data: bool, pub no_median_slopes: bool, pub no_min_squares: bool, pub output: Option<PathBuf>, pub header: Option<PathBuf>, pub template: Option<PathBuf>, pub output_analysis: Option<String>, pub heap_pages: Option<u64>, pub no_verify: bool, pub extra: bool, pub record_proof: bool, pub shared_params: SharedParams, pub execution: Option<ExecutionStrategy>, pub wasm_method: WasmExecutionMethod, pub database_cache_size: u32, pub list: bool,
Expand description
The benchmark
command used to benchmark FRAME Pallets.
Fields
pallet: Option<String>
Select a FRAME Pallet to benchmark, or *
for all (in which case extrinsic
must be *
).
extrinsic: Option<String>
Select an extrinsic inside the pallet to benchmark, or *
for all.
steps: u32
Select how many samples we should take across the variable components.
lowest_range_values: Vec<u32>
Indicates lowest values for each of the component ranges.
highest_range_values: Vec<u32>
Indicates highest values for each of the component ranges.
repeat: u32
Select how many repetitions of this benchmark should run from within the wasm.
external_repeat: u32
Select how many repetitions of this benchmark should run from the client.
NOTE: Using this alone may give slower results, but will afford you maximum Wasm memory.
raw_data: bool
Print the raw results.
no_median_slopes: bool
Don’t print the median-slopes linear regression analysis.
no_min_squares: bool
Don’t print the min-squares linear regression analysis.
output: Option<PathBuf>
Output the benchmarks to a Rust file at the given path.
header: Option<PathBuf>
Add a header file to your outputted benchmarks
template: Option<PathBuf>
Path to Handlebars template file used for outputting benchmark results. (Optional)
output_analysis: Option<String>
Which analysis function to use when outputting benchmarks:
- min-squares (default)
- median-slopes
- max (max of min squares and median slopes for each value)
heap_pages: Option<u64>
Set the heap pages while running benchmarks. If not set, the default value from the client is used.
no_verify: bool
Disable verification logic when running benchmarks.
extra: bool
Display and run extra benchmarks that would otherwise not be needed for weight construction.
record_proof: bool
Estimate PoV size.
execution: Option<ExecutionStrategy>
The execution strategy that should be used for benchmarks
wasm_method: WasmExecutionMethod
Method for executing Wasm runtime code.
database_cache_size: u32
Limit the memory the database cache can use.
list: bool
List the benchmarks that match your query rather than running them.
When nothing is provided, we list all benchmarks.
Implementations
Trait Implementations
Get the SharedParams for this object
Get the ImportParams for this object
Get the PruningParams for this object
Get the KeystoreParams for this object
Get the NetworkParams for this object
Get a reference to OffchainWorkerParams
for this object.
Get the NodeKeyParams for this object
Get the DatabaseParams for this object
Get the base path of the configuration (if any) Read more
Returns true
if the node is for development or not Read more
fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec + 'static, Global>,
is_dev: bool,
is_validator: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration, Error>
fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec + 'static, Global>,
is_dev: bool,
is_validator: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration, Error>
Get the network configuration Read more
fn keystore_config(
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig), Error>
fn keystore_config(
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig), Error>
Get the keystore configuration. Read more
Get the database cache size. Read more
Get the database transaction storage scheme.
Get the database backend variant. Read more
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSource, Error>
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSource, Error>
Get the database configuration object for the parameters provided
Get the state cache child ratio (if any). Read more
Get the state pruning mode. Read more
Get the block pruning mode. Read more
Get the WASM execution method. Read more
Get the path where WASM overrides live. Read more
fn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies, Error>
fn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies, Error>
Get the execution strategies. Read more
Get the RPC HTTP address (None
if disabled). Read more
Get the RPC IPC path (None
if disabled). Read more
Get the RPC websocket address (None
if disabled). Read more
Returns the RPC method set to expose. Read more
Get the RPC websockets maximum connections (None
if unlimited). Read more
Get the RPC HTTP thread pool size (None
for a default 4-thread pool config). Read more
Get the RPC cors (None
if disabled) Read more
fn prometheus_config(
&self,
_default_listen_port: u16
) -> Result<Option<PrometheusConfig>, Error>
fn prometheus_config(
&self,
_default_listen_port: u16
) -> Result<Option<PrometheusConfig>, Error>
Get the prometheus configuration (None
if disabled) Read more
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec + 'static, Global>
) -> Result<Option<TelemetryEndpoints>, Error>
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec + 'static, Global>
) -> Result<Option<TelemetryEndpoints>, Error>
Get the telemetry endpoints (if any) Read more
Get the telemetry external transport Read more
Get the default value for heap pages Read more
Returns an offchain worker config wrapped in Ok(_)
Read more
Returns Ok(true)
if authoring should be forced Read more
Returns Ok(true)
if grandpa should be disabled Read more
Get the development key seed from the current object Read more
Get the tracing targets from the current object (if any) Read more
Get the TracingReceiver value from the current object Read more
Get the node key from the current object Read more
Get maximum runtime instances Read more
Activate or not the automatic announcing of blocks after import Read more
fn create_configuration<C>(
&self,
cli: &C,
task_executor: TaskExecutor
) -> Result<Configuration, Error> where
C: SubstrateCli,
fn create_configuration<C>(
&self,
cli: &C,
task_executor: TaskExecutor
) -> Result<Configuration, Error> where
C: SubstrateCli,
Create a Configuration object from the current object
Is log reloading disabled (enabled by default)
Should the log color output be disabled?
Builds the struct from clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by [StructOpt::clap
] called on
the same type, otherwise it must panic. Read more
fn from_args() -> Self
fn from_args() -> Self
Builds the struct from the command line arguments (std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program. Read more
fn from_args_safe() -> Result<Self, Error>
fn from_args_safe() -> Result<Self, Error>
Builds the struct from the command line arguments (std::env::args_os
).
Unlike [StructOpt::from_args
], returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you. Read more
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making.
Print the error message and quit the program in case of failure. Read more
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
Auto Trait Implementations
impl RefUnwindSafe for BenchmarkCmd
impl Send for BenchmarkCmd
impl Sync for BenchmarkCmd
impl Unpin for BenchmarkCmd
impl UnwindSafe for BenchmarkCmd
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,