Struct frame_benchmarking_cli::BenchmarkCmd
source · [−]pub struct BenchmarkCmd {Show 19 fields
pub pallet: String,
pub extrinsic: String,
pub steps: Vec<u32>,
pub lowest_range_values: Vec<u32>,
pub highest_range_values: Vec<u32>,
pub 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 heap_pages: Option<u64>,
pub no_verify: bool,
pub extra: bool,
pub shared_params: SharedParams,
pub execution: Option<ExecutionStrategy>,
pub wasm_method: WasmExecutionMethod,
pub database_cache_size: u32,
}
Expand description
The benchmark
command used to benchmark FRAME Pallets.
Fields
pallet: String
Select a FRAME Pallet to benchmark, or *
for all (in which case extrinsic
must be *
).
extrinsic: String
Select an extrinsic inside the pallet to benchmark, or *
for all.
steps: Vec<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.
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)
heap_pages: Option<u64>
Set the heap pages while running benchmarks.
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.
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.
Implementations
sourceimpl BenchmarkCmd
impl BenchmarkCmd
Trait Implementations
sourceimpl CliConfiguration<()> for BenchmarkCmd
impl CliConfiguration<()> for BenchmarkCmd
Get the SharedParams for this object
sourcefn import_params(&self) -> Option<&ImportParams>
fn import_params(&self) -> Option<&ImportParams>
Get the ImportParams for this object
sourcefn pruning_params(&self) -> Option<&PruningParams>
fn pruning_params(&self) -> Option<&PruningParams>
Get the PruningParams for this object
sourcefn keystore_params(&self) -> Option<&KeystoreParams>
fn keystore_params(&self) -> Option<&KeystoreParams>
Get the KeystoreParams for this object
sourcefn network_params(&self) -> Option<&NetworkParams>
fn network_params(&self) -> Option<&NetworkParams>
Get the NetworkParams for this object
sourcefn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
Get a reference to OffchainWorkerParams
for this object.
sourcefn node_key_params(&self) -> Option<&NodeKeyParams>
fn node_key_params(&self) -> Option<&NodeKeyParams>
Get the NodeKeyParams for this object
sourcefn database_params(&self) -> Option<&DatabaseParams>
fn database_params(&self) -> Option<&DatabaseParams>
Get the DatabaseParams for this object
sourcefn base_path(&self) -> Result<Option<BasePath>, Error>
fn base_path(&self) -> Result<Option<BasePath>, Error>
Get the base path of the configuration (if any) Read more
sourcefn is_dev(&self) -> Result<bool, Error>
fn is_dev(&self) -> Result<bool, Error>
Returns true
if the node is for development or not Read more
sourcefn transaction_pool(&self) -> Result<Options, Error>
fn transaction_pool(&self) -> Result<Options, Error>
Get the transaction pool options Read more
sourcefn network_config(
&self,
chain_spec: &Box<dyn ChainSpec + 'static, Global>,
is_dev: 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,
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
sourcefn 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
sourcefn database_cache_size(&self) -> Result<Option<usize>, Error>
fn database_cache_size(&self) -> Result<Option<usize>, Error>
Get the database cache size. Read more
sourcefn database_transaction_storage(&self) -> Result<TransactionStorageMode, Error>
fn database_transaction_storage(&self) -> Result<TransactionStorageMode, Error>
Get the database transaction storage scheme.
sourcefn database(&self) -> Result<Option<Database>, Error>
fn database(&self) -> Result<Option<Database>, Error>
Get the database backend variant. Read more
sourcefn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSettingsSrc, Error>
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSettingsSrc, Error>
Get the database configuration object for the parameters provided
sourcefn state_cache_child_ratio(&self) -> Result<Option<usize>, Error>
fn state_cache_child_ratio(&self) -> Result<Option<usize>, Error>
Get the state cache child ratio (if any). Read more
sourcefn state_pruning(
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode, Error>
fn state_pruning(
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode, Error>
Get the state pruning mode. Read more
sourcefn keep_blocks(&self) -> Result<KeepBlocks, Error>
fn keep_blocks(&self) -> Result<KeepBlocks, Error>
Get the block pruning mode. Read more
sourcefn wasm_method(&self) -> Result<WasmExecutionMethod, Error>
fn wasm_method(&self) -> Result<WasmExecutionMethod, Error>
Get the WASM execution method. Read more
sourcefn wasm_runtime_overrides(&self) -> Option<PathBuf>
fn wasm_runtime_overrides(&self) -> Option<PathBuf>
Get the path where WASM overrides live. Read more
sourcefn 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
sourcefn rpc_http(
&self,
_default_listen_port: u16
) -> Result<Option<SocketAddr>, Error>
fn rpc_http(
&self,
_default_listen_port: u16
) -> Result<Option<SocketAddr>, Error>
Get the RPC HTTP address (None
if disabled). Read more
sourcefn rpc_ipc(&self) -> Result<Option<String>, Error>
fn rpc_ipc(&self) -> Result<Option<String>, Error>
Get the RPC IPC path (None
if disabled). Read more
sourcefn rpc_ws(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>, Error>
fn rpc_ws(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>, Error>
Get the RPC websocket address (None
if disabled). Read more
sourcefn rpc_methods(&self) -> Result<RpcMethods, Error>
fn rpc_methods(&self) -> Result<RpcMethods, Error>
Returns the RPC method set to expose. Read more
sourcefn rpc_ws_max_connections(&self) -> Result<Option<usize>, Error>
fn rpc_ws_max_connections(&self) -> Result<Option<usize>, Error>
Get the RPC websockets maximum connections (None
if unlimited). Read more
sourcefn rpc_cors(&self, _is_dev: bool) -> Result<Option<Vec<String, Global>>, Error>
fn rpc_cors(&self, _is_dev: bool) -> Result<Option<Vec<String, Global>>, Error>
Get the RPC cors (None
if disabled) Read more
sourcefn 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
sourcefn 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
sourcefn telemetry_external_transport(&self) -> Result<Option<ExtTransport>, Error>
fn telemetry_external_transport(&self) -> Result<Option<ExtTransport>, Error>
Get the telemetry external transport Read more
sourcefn default_heap_pages(&self) -> Result<Option<u64>, Error>
fn default_heap_pages(&self) -> Result<Option<u64>, Error>
Get the default value for heap pages Read more
sourcefn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig, Error>
fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig, Error>
Returns an offchain worker config wrapped in Ok(_)
Read more
Returns Ok(true)
if authoring should be forced Read more
sourcefn disable_grandpa(&self) -> Result<bool, Error>
fn disable_grandpa(&self) -> Result<bool, Error>
Returns Ok(true)
if grandpa should be disabled Read more
sourcefn dev_key_seed(&self, _is_dev: bool) -> Result<Option<String>, Error>
fn dev_key_seed(&self, _is_dev: bool) -> Result<Option<String>, Error>
Get the development key seed from the current object Read more
sourcefn tracing_targets(&self) -> Result<Option<String>, Error>
fn tracing_targets(&self) -> Result<Option<String>, Error>
Get the tracing targets from the current object (if any) Read more
sourcefn tracing_receiver(&self) -> Result<TracingReceiver, Error>
fn tracing_receiver(&self) -> Result<TracingReceiver, Error>
Get the TracingReceiver value from the current object Read more
sourcefn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig, Error>
fn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig, Error>
Get the node key from the current object Read more
sourcefn max_runtime_instances(&self) -> Result<Option<usize>, Error>
fn max_runtime_instances(&self) -> Result<Option<usize>, Error>
Get maximum runtime instances Read more
sourcefn announce_block(&self) -> Result<bool, Error>
fn announce_block(&self) -> Result<bool, Error>
Activate or not the automatic announcing of blocks after import Read more
sourcefn create_configuration<C>(
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration, Error> where
C: SubstrateCli,
fn create_configuration<C>(
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration, Error> where
C: SubstrateCli,
Create a Configuration object from the current object
sourcefn is_log_filter_reloading_disabled(&self) -> Result<bool, Error>
fn is_log_filter_reloading_disabled(&self) -> Result<bool, Error>
Is log reloading disabled (enabled by default)
sourcefn disable_log_color(&self) -> Result<bool, Error>
fn disable_log_color(&self) -> Result<bool, Error>
Should the log color output be disabled?
sourcefn init<C>(&self) -> Result<TelemetryWorker, Error> where
C: SubstrateCli,
fn init<C>(&self) -> Result<TelemetryWorker, Error> where
C: SubstrateCli,
Initialize substrate. This must be done only once per process. Read more
sourceimpl Debug for BenchmarkCmd
impl Debug for BenchmarkCmd
sourceimpl StructOpt for BenchmarkCmd
impl StructOpt for BenchmarkCmd
sourcefn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
. Read more
sourcefn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
sourcepub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
sourcepub 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).
sourcepub 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.
sourcepub 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.
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcepub fn unique_saturated_into(self) -> T
pub fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more