Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update pallet-multisig benches #12558

Merged
merged 5 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
249 changes: 108 additions & 141 deletions frame/multisig/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -18,22 +18,26 @@
//! Autogenerated weights for pallet_multisig
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-10-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/substrate
// /home/benchbot/cargo_target_dir/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_multisig
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --template=./.maintain/frame-weight-template.hbs
// --heap-pages=4096
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json
// --pallet=pallet_multisig
// --chain=dev
// --header=./HEADER-APACHE2
// --output=./frame/multisig/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -46,213 +50,176 @@ use sp_std::marker::PhantomData;
pub trait WeightInfo {
fn as_multi_threshold_1(z: u32, ) -> Weight;
fn as_multi_create(s: u32, z: u32, ) -> Weight;
fn as_multi_create_store(s: u32, z: u32, ) -> Weight;
fn as_multi_approve(s: u32, z: u32, ) -> Weight;
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight;
fn as_multi_complete(s: u32, z: u32, ) -> Weight;
fn approve_as_multi_create(s: u32, ) -> Weight;
fn approve_as_multi_approve(s: u32, ) -> Weight;
fn approve_as_multi_complete(s: u32, ) -> Weight;
fn cancel_as_multi(s: u32, ) -> Weight;
}

/// Weights for pallet_multisig using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn as_multi_threshold_1(_z: u32, ) -> Weight {
Weight::from_ref_time(17_537_000 as u64)
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Minimum execution time: 19_552 nanoseconds.
Weight::from_ref_time(20_363_885 as u64)
// Standard Error: 3
.saturating_add(Weight::from_ref_time(571 as u64).saturating_mul(z as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(36_535_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
// Minimum execution time: 53_338 nanoseconds.
Weight::from_ref_time(41_415_084 as u64)
// Standard Error: 909
.saturating_add(Weight::from_ref_time(132_862 as u64).saturating_mul(s as u64))
// Standard Error: 8
.saturating_add(Weight::from_ref_time(1_449 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(39_918_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(25_524_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
// Minimum execution time: 40_227 nanoseconds.
Weight::from_ref_time(28_583_459 as u64)
// Standard Error: 542
.saturating_add(Weight::from_ref_time(132_201 as u64).saturating_mul(s as u64))
// Standard Error: 5
.saturating_add(Weight::from_ref_time(1_499 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(39_923_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(45_877_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 54_521 nanoseconds.
Weight::from_ref_time(41_890_356 as u64)
// Standard Error: 815
.saturating_add(Weight::from_ref_time(151_961 as u64).saturating_mul(s as u64))
// Standard Error: 7
.saturating_add(Weight::from_ref_time(1_506 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
Weight::from_ref_time(34_309_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
// Minimum execution time: 38_213 nanoseconds.
Weight::from_ref_time(39_857_224 as u64)
// Standard Error: 1_025
.saturating_add(Weight::from_ref_time(127_258 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
Weight::from_ref_time(22_848_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
// Minimum execution time: 26_043 nanoseconds.
Weight::from_ref_time(27_731_620 as u64)
// Standard Error: 777
.saturating_add(Weight::from_ref_time(128_947 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn approve_as_multi_complete(s: u32, ) -> Weight {
Weight::from_ref_time(63_239_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
Weight::from_ref_time(51_254_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(118_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 36_039 nanoseconds.
Weight::from_ref_time(38_373_335 as u64)
// Standard Error: 894
.saturating_add(Weight::from_ref_time(129_511 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
fn as_multi_threshold_1(_z: u32, ) -> Weight {
Weight::from_ref_time(17_537_000 as u64)
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Minimum execution time: 19_552 nanoseconds.
Weight::from_ref_time(20_363_885 as u64)
// Standard Error: 3
.saturating_add(Weight::from_ref_time(571 as u64).saturating_mul(z as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(36_535_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
// Minimum execution time: 53_338 nanoseconds.
Weight::from_ref_time(41_415_084 as u64)
// Standard Error: 909
.saturating_add(Weight::from_ref_time(132_862 as u64).saturating_mul(s as u64))
// Standard Error: 8
.saturating_add(Weight::from_ref_time(1_449 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(39_918_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(25_524_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
// Minimum execution time: 40_227 nanoseconds.
Weight::from_ref_time(28_583_459 as u64)
// Standard Error: 542
.saturating_add(Weight::from_ref_time(132_201 as u64).saturating_mul(s as u64))
// Standard Error: 5
.saturating_add(Weight::from_ref_time(1_499 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(39_923_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
Weight::from_ref_time(45_877_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(s as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 54_521 nanoseconds.
Weight::from_ref_time(41_890_356 as u64)
// Standard Error: 815
.saturating_add(Weight::from_ref_time(151_961 as u64).saturating_mul(s as u64))
// Standard Error: 7
.saturating_add(Weight::from_ref_time(1_506 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
Weight::from_ref_time(34_309_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
// Minimum execution time: 38_213 nanoseconds.
Weight::from_ref_time(39_857_224 as u64)
// Standard Error: 1_025
.saturating_add(Weight::from_ref_time(127_258 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
Weight::from_ref_time(22_848_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
// Minimum execution time: 26_043 nanoseconds.
Weight::from_ref_time(27_731_620 as u64)
// Standard Error: 777
.saturating_add(Weight::from_ref_time(128_947 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn approve_as_multi_complete(s: u32, ) -> Weight {
Weight::from_ref_time(63_239_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
Weight::from_ref_time(51_254_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(118_000 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 36_039 nanoseconds.
Weight::from_ref_time(38_373_335 as u64)
// Standard Error: 894
.saturating_add(Weight::from_ref_time(129_511 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
}
2 changes: 1 addition & 1 deletion frame/transaction-payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ where
Self(fee)
}

/// Returns the tip as being choosen by the transaction sender.
/// Returns the tip as being chosen by the transaction sender.
pub fn tip(&self) -> BalanceOf<T> {
self.0
}
Expand Down
2 changes: 1 addition & 1 deletion frame/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub mod pallet {
// Align the call size to 1KB. As we are currently compiling the runtime for native/wasm
// the `size_of` of the `Call` can be different. To ensure that this don't leads to
// mismatches between native/wasm or to different metadata for the same runtime, we
// algin the call size. The value is choosen big enough to hopefully never reach it.
// algin the call size. The value is chosen big enough to hopefully never reach it.
const CALL_ALIGN: u32 = 1024;

#[pallet::extra_constants]
Expand Down