pub struct PalletCmd {
Show 27 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 json_output: bool, pub json_file: Option<PathBuf>, pub no_median_slopes: bool, pub no_min_squares: bool, pub output: Option<PathBuf>, pub header: Option<PathBuf>, pub template: Option<PathBuf>, pub hostinfo_params: HostInfoParams, 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 wasmtime_instantiation_strategy: WasmtimeInstantiationStrategy, pub database_cache_size: u32, pub list: bool, pub no_storage_info: bool,
}
Expand description

Benchmark the extrinsic weight of 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.

§json_output: bool

Print the raw results in JSON format.

§json_file: Option<PathBuf>

Write the raw results in JSON format into the given file.

§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)

§hostinfo_params: HostInfoParams§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.

§shared_params: SharedParams§execution: Option<ExecutionStrategy>

The execution strategy that should be used for benchmarks.

§wasm_method: WasmExecutionMethod

Method for executing Wasm runtime code.

§wasmtime_instantiation_strategy: WasmtimeInstantiationStrategy

The WASM instantiation method to use.

Only has an effect when wasm-execution is set to compiled.

§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.

§no_storage_info: bool

If enabled, the storage info is not displayed in the output next to the analysis.

This is independent of the storage info appearing in the output file. Use a Handlebar template for that purpose.

Implementations§

Runs the command and benchmarks the chain.

Trait Implementations§

Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Get the SharedParams for this object
Get the chain ID (string). Read more
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
Gets the role Read more
Get the transaction pool options Read more
Get the network configuration Read more
Get the keystore configuration. Read more
Get the database cache size. Read more
Get the database backend variant. Read more
Get the database configuration object for the parameters provided
Get the trie cache maximum size. Read more
Get the state pruning mode. Read more
Get the block pruning mode. Read more
Get the name of the node. Read more
Get the WASM execution method. Read more
Get the path where WASM overrides live. Read more
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 cors (None if disabled) Read more
Get maximum RPC payload.
Get maximum RPC request payload size.
Get maximum RPC response payload size.
Get maximum number of subscriptions per connection.
Get maximum WS output buffer capacity.
Get the prometheus configuration (None if disabled) Read more
Get the telemetry endpoints (if any) 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
Get maximum different runtimes in cache Read more
Activate or not the automatic announcing of blocks after import Read more
Create a Configuration object from the current object
Get the filters for the logging. Read more
Should the detailed log output be enabled.
Is log reloading enabled?
Should the log color output be disabled?
Initialize substrate. This must be done only once per process. Read more
👎Deprecated since 3.1.0: Replaced with `CommandFactory::command
Deprecated, replaced with CommandFactory::command
👎Deprecated since 3.1.0: Replaced with `CommandFactory::command_for_update
Deprecated, replaced with CommandFactory::command_for_update
Build a Command that can instantiate Self. Read more
Build a Command that can update self. Read more
Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Parse from std::env::args_os(), exit on error
Parse from std::env::args_os(), return Err on error.
Parse from iterator, exit on error
Parse from iterator, return Err on error.
Update from iterator, exit on error
Update from iterator, return Err on error.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert from a value of T into an equivalent instance of Option<Self>. Read more
Consume self to return Some equivalent value of Option<T>. Read more
Converts self into T using Into<T>. Read more
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
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
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
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more
Causes self to use its Binary implementation when Debug-formatted. Read more
Causes self to use its Display implementation when Debug-formatted. Read more
Causes self to use its LowerExp implementation when Debug-formatted. Read more
Causes self to use its LowerHex implementation when Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted. Read more
Causes self to use its Pointer implementation when Debug-formatted. Read more
Causes self to use its UpperExp implementation when Debug-formatted. Read more
Causes self to use its UpperHex implementation when Debug-formatted. Read more
Formats each item in a sequence. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Cast reference.
Cast reference.
Cast mutable reference.
Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function. Read more
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Convert from a value of T into an equivalent instance of Self. Read more
Consume self to return an equivalent value of T. Read more
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
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
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