mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
Benchmarking also benchmark for decoding the call (#9343)
* benchmark for decoding of call * better names * fix benchmarks * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_lottery --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update frame/system/src/weights.rs Co-authored-by: Parity Benchmarking Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c5f5c9c28c
commit
e18f388dac
@@ -302,12 +302,21 @@ macro_rules! benchmarks_iter {
|
||||
{ $( $where_clause )* }
|
||||
( $( $names )* )
|
||||
( $( $names_extra )* )
|
||||
$name { $( $code )* }: {
|
||||
$name {
|
||||
$( $code )*
|
||||
let __benchmarked_call_encoded = $crate::frame_support::codec::Encode::encode(
|
||||
&<Call<T $(, $instance )?>>::$dispatch($( $arg ),*)
|
||||
);
|
||||
}: {
|
||||
let call_decoded = <
|
||||
Call<T $(, $instance )?>
|
||||
as $crate::frame_support::codec::Decode
|
||||
>::decode(&mut &__benchmarked_call_encoded[..])
|
||||
.expect("call is encoded above, encoding must be correct");
|
||||
|
||||
<
|
||||
Call<T $(, $instance)? > as $crate::frame_support::traits::UnfilteredDispatchable
|
||||
>::dispatch_bypass_filter(
|
||||
Call::<T $(, $instance)? >::$dispatch($($arg),*), $origin.into()
|
||||
)?;
|
||||
>::dispatch_bypass_filter(call_decoded, $origin.into())?;
|
||||
}
|
||||
verify $postcode
|
||||
$( $rest )*
|
||||
|
||||
Reference in New Issue
Block a user