mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
frame-benchmarking-cli: Remove native dispatch requirement (#14474)
* frame-benchmarking-cli: Remove native dispatch requirement No need for this, we can just use the `WasmExecutor` directly. * Fixes * Pass benchmarking host functions * Ensure we can pass custom host functions
This commit is contained in:
@@ -246,22 +246,21 @@ pub use v1::*;
|
||||
/// of impls and structs required by the benchmarking engine. Additionally, a benchmark
|
||||
/// function is also generated that resembles the function definition you provide, with a few
|
||||
/// modifications:
|
||||
/// 1. The function name is transformed from i.e. `original_name` to `_original_name` so as not
|
||||
/// to collide with the struct `original_name` that is created for some of the benchmarking
|
||||
/// engine impls.
|
||||
/// 2. Appropriate `T: Config` and `I` (if this is an instance benchmark) generics are added to
|
||||
/// the function automatically during expansion, so you should not add these manually on
|
||||
/// your function definition (but you may make use of `T` and `I` anywhere within your
|
||||
/// benchmark function, in any of the three sections (setup, call, verification).
|
||||
/// 1. The function name is transformed from i.e. `original_name` to `_original_name` so as not to
|
||||
/// collide with the struct `original_name` that is created for some of the benchmarking engine
|
||||
/// impls.
|
||||
/// 2. Appropriate `T: Config` and `I` (if this is an instance benchmark) generics are added to the
|
||||
/// function automatically during expansion, so you should not add these manually on your
|
||||
/// function definition (but you may make use of `T` and `I` anywhere within your benchmark
|
||||
/// function, in any of the three sections (setup, call, verification).
|
||||
/// 3. Arguments such as `u: Linear<10, 100>` are converted to `u: u32` to make the function
|
||||
/// directly callable.
|
||||
/// 4. A `verify: bool` param is added as the last argument. Specifying `true` will result in
|
||||
/// the verification section of your function executing, while a value of `false` will skip
|
||||
/// 4. A `verify: bool` param is added as the last argument. Specifying `true` will result in the
|
||||
/// verification section of your function executing, while a value of `false` will skip
|
||||
/// verification.
|
||||
/// 5. If you specify a return type on the function definition, it must conform to the [rules
|
||||
/// below](#support-for-result-benchmarkerror-and-the--operator), and the last statement of
|
||||
/// the function definition must resolve to something compatible with `Result<(),
|
||||
/// BenchmarkError>`.
|
||||
/// below](#support-for-result-benchmarkerror-and-the--operator), and the last statement of the
|
||||
/// function definition must resolve to something compatible with `Result<(), BenchmarkError>`.
|
||||
///
|
||||
/// The reason we generate an actual function as part of the expansion is to allow the compiler
|
||||
/// to enforce several constraints that would otherwise be difficult to enforce and to reduce
|
||||
|
||||
Reference in New Issue
Block a user