Skip to content

Commit bbf0075

Browse files
ggwpezshawntabrizi
authored andcommitted
Update pallet-multisig benches (paritytech#12558)
* Typo Signed-off-by: Oliver Tale-Yazdi <[email protected]> * ".git/.scripts/bench-bot.sh" pallet dev pallet_multisig * remove functions * ".git/.scripts/bench-bot.sh" pallet dev pallet_multisig Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Shawn Tabrizi <[email protected]>
1 parent f8c8efc commit bbf0075

File tree

4 files changed

+110
-145
lines changed

4 files changed

+110
-145
lines changed

frame/multisig/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ pub mod pallet {
370370
let z = call.using_encoded(|d| d.len()) as u32;
371371
372372
T::WeightInfo::as_multi_create(s, z)
373-
.max(T::WeightInfo::as_multi_create_store(s, z))
374373
.max(T::WeightInfo::as_multi_approve(s, z))
375374
.max(T::WeightInfo::as_multi_complete(s, z))
376375
.saturating_add(*max_weight)
@@ -434,7 +433,6 @@ pub mod pallet {
434433
435434
T::WeightInfo::approve_as_multi_create(s)
436435
.max(T::WeightInfo::approve_as_multi_approve(s))
437-
.max(T::WeightInfo::approve_as_multi_complete(s))
438436
.saturating_add(*max_weight)
439437
})]
440438
pub fn approve_as_multi(

frame/multisig/src/weights.rs

Lines changed: 108 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// you may not use this file except in compliance with the License.
88
// You may obtain a copy of the License at
99
//
10-
// http://www.apache.org/licenses/LICENSE-2.0
10+
// http://www.apache.org/licenses/LICENSE-2.0
1111
//
1212
// Unless required by applicable law or agreed to in writing, software
1313
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,22 +18,26 @@
1818
//! Autogenerated weights for pallet_multisig
1919
//!
2020
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21-
//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
21+
//! DATE: 2022-10-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
22+
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
2223
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
2324
2425
// Executed Command:
25-
// ./target/production/substrate
26+
// /home/benchbot/cargo_target_dir/production/substrate
2627
// benchmark
2728
// pallet
28-
// --chain=dev
2929
// --steps=50
3030
// --repeat=20
31-
// --pallet=pallet_multisig
3231
// --extrinsic=*
3332
// --execution=wasm
3433
// --wasm-execution=compiled
35-
// --template=./.maintain/frame-weight-template.hbs
34+
// --heap-pages=4096
35+
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json
36+
// --pallet=pallet_multisig
37+
// --chain=dev
38+
// --header=./HEADER-APACHE2
3639
// --output=./frame/multisig/src/weights.rs
40+
// --template=./.maintain/frame-weight-template.hbs
3741

3842
#![cfg_attr(rustfmt, rustfmt_skip)]
3943
#![allow(unused_parens)]
@@ -46,213 +50,176 @@ use sp_std::marker::PhantomData;
4650
pub trait WeightInfo {
4751
fn as_multi_threshold_1(z: u32, ) -> Weight;
4852
fn as_multi_create(s: u32, z: u32, ) -> Weight;
49-
fn as_multi_create_store(s: u32, z: u32, ) -> Weight;
5053
fn as_multi_approve(s: u32, z: u32, ) -> Weight;
51-
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight;
5254
fn as_multi_complete(s: u32, z: u32, ) -> Weight;
5355
fn approve_as_multi_create(s: u32, ) -> Weight;
5456
fn approve_as_multi_approve(s: u32, ) -> Weight;
55-
fn approve_as_multi_complete(s: u32, ) -> Weight;
5657
fn cancel_as_multi(s: u32, ) -> Weight;
5758
}
5859

5960
/// Weights for pallet_multisig using the Substrate node and recommended hardware.
6061
pub struct SubstrateWeight<T>(PhantomData<T>);
6162
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
62-
fn as_multi_threshold_1(_z: u32, ) -> Weight {
63-
Weight::from_ref_time(17_537_000 as u64)
63+
/// The range of component `z` is `[0, 10000]`.
64+
fn as_multi_threshold_1(z: u32, ) -> Weight {
65+
// Minimum execution time: 20_283 nanoseconds.
66+
Weight::from_ref_time(20_861_089 as u64)
67+
// Standard Error: 5
68+
.saturating_add(Weight::from_ref_time(583 as u64).saturating_mul(z as u64))
6469
}
6570
// Storage: Multisig Multisigs (r:1 w:1)
6671
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
72+
/// The range of component `s` is `[2, 100]`.
73+
/// The range of component `z` is `[0, 10000]`.
6774
fn as_multi_create(s: u32, z: u32, ) -> Weight {
68-
Weight::from_ref_time(36_535_000 as u64)
69-
// Standard Error: 0
70-
.saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64))
71-
// Standard Error: 0
72-
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
75+
// Minimum execution time: 52_699 nanoseconds.
76+
Weight::from_ref_time(40_874_603 as u64)
77+
// Standard Error: 546
78+
.saturating_add(Weight::from_ref_time(131_727 as u64).saturating_mul(s as u64))
79+
// Standard Error: 5
80+
.saturating_add(Weight::from_ref_time(1_537 as u64).saturating_mul(z as u64))
7381
.saturating_add(T::DbWeight::get().reads(2 as u64))
7482
.saturating_add(T::DbWeight::get().writes(1 as u64))
7583
}
7684
// Storage: Multisig Multisigs (r:1 w:1)
77-
// Storage: Multisig Calls (r:1 w:1)
78-
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
79-
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
80-
Weight::from_ref_time(39_918_000 as u64)
81-
// Standard Error: 1_000
82-
.saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64))
83-
// Standard Error: 0
84-
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
85-
.saturating_add(T::DbWeight::get().reads(3 as u64))
86-
.saturating_add(T::DbWeight::get().writes(2 as u64))
87-
}
88-
// Storage: Multisig Multisigs (r:1 w:1)
85+
/// The range of component `s` is `[3, 100]`.
86+
/// The range of component `z` is `[0, 10000]`.
8987
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
90-
Weight::from_ref_time(25_524_000 as u64)
91-
// Standard Error: 0
92-
.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(s as u64))
93-
// Standard Error: 0
94-
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
88+
// Minimum execution time: 39_843 nanoseconds.
89+
Weight::from_ref_time(28_912_325 as u64)
90+
// Standard Error: 734
91+
.saturating_add(Weight::from_ref_time(125_761 as u64).saturating_mul(s as u64))
92+
// Standard Error: 7
93+
.saturating_add(Weight::from_ref_time(1_542 as u64).saturating_mul(z as u64))
9594
.saturating_add(T::DbWeight::get().reads(1 as u64))
9695
.saturating_add(T::DbWeight::get().writes(1 as u64))
9796
}
9897
// Storage: Multisig Multisigs (r:1 w:1)
99-
// Storage: Multisig Calls (r:1 w:1)
100-
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
101-
Weight::from_ref_time(39_923_000 as u64)
102-
// Standard Error: 1_000
103-
.saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(s as u64))
104-
// Standard Error: 0
105-
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
106-
.saturating_add(T::DbWeight::get().reads(2 as u64))
107-
.saturating_add(T::DbWeight::get().writes(2 as u64))
108-
}
109-
// Storage: Multisig Multisigs (r:1 w:1)
110-
// Storage: Multisig Calls (r:1 w:1)
11198
// Storage: System Account (r:1 w:1)
99+
/// The range of component `s` is `[2, 100]`.
100+
/// The range of component `z` is `[0, 10000]`.
112101
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
113-
Weight::from_ref_time(45_877_000 as u64)
114-
// Standard Error: 1_000
115-
.saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(s as u64))
116-
// Standard Error: 0
117-
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
118-
.saturating_add(T::DbWeight::get().reads(3 as u64))
119-
.saturating_add(T::DbWeight::get().writes(3 as u64))
102+
// Minimum execution time: 54_980 nanoseconds.
103+
Weight::from_ref_time(42_087_213 as u64)
104+
// Standard Error: 786
105+
.saturating_add(Weight::from_ref_time(153_935 as u64).saturating_mul(s as u64))
106+
// Standard Error: 7
107+
.saturating_add(Weight::from_ref_time(1_545 as u64).saturating_mul(z as u64))
108+
.saturating_add(T::DbWeight::get().reads(2 as u64))
109+
.saturating_add(T::DbWeight::get().writes(2 as u64))
120110
}
121111
// Storage: Multisig Multisigs (r:1 w:1)
122112
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
113+
/// The range of component `s` is `[2, 100]`.
123114
fn approve_as_multi_create(s: u32, ) -> Weight {
124-
Weight::from_ref_time(34_309_000 as u64)
125-
// Standard Error: 1_000
126-
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
115+
// Minimum execution time: 37_802 nanoseconds.
116+
Weight::from_ref_time(39_933_623 as u64)
117+
// Standard Error: 1_059
118+
.saturating_add(Weight::from_ref_time(121_891 as u64).saturating_mul(s as u64))
127119
.saturating_add(T::DbWeight::get().reads(2 as u64))
128120
.saturating_add(T::DbWeight::get().writes(1 as u64))
129121
}
130122
// Storage: Multisig Multisigs (r:1 w:1)
131-
// Storage: Multisig Calls (r:1 w:0)
123+
/// The range of component `s` is `[2, 100]`.
132124
fn approve_as_multi_approve(s: u32, ) -> Weight {
133-
Weight::from_ref_time(22_848_000 as u64)
134-
// Standard Error: 0
135-
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
125+
// Minimum execution time: 25_738 nanoseconds.
126+
Weight::from_ref_time(27_676_766 as u64)
127+
// Standard Error: 710
128+
.saturating_add(Weight::from_ref_time(125_733 as u64).saturating_mul(s as u64))
136129
.saturating_add(T::DbWeight::get().reads(1 as u64))
137130
.saturating_add(T::DbWeight::get().writes(1 as u64))
138131
}
139132
// Storage: Multisig Multisigs (r:1 w:1)
140-
// Storage: Multisig Calls (r:1 w:1)
141-
// Storage: System Account (r:1 w:1)
142-
fn approve_as_multi_complete(s: u32, ) -> Weight {
143-
Weight::from_ref_time(63_239_000 as u64)
144-
// Standard Error: 1_000
145-
.saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(s as u64))
146-
.saturating_add(T::DbWeight::get().reads(3 as u64))
147-
.saturating_add(T::DbWeight::get().writes(3 as u64))
148-
}
149-
// Storage: Multisig Multisigs (r:1 w:1)
150-
// Storage: Multisig Calls (r:1 w:1)
133+
/// The range of component `s` is `[2, 100]`.
151134
fn cancel_as_multi(s: u32, ) -> Weight {
152-
Weight::from_ref_time(51_254_000 as u64)
153-
// Standard Error: 1_000
154-
.saturating_add(Weight::from_ref_time(118_000 as u64).saturating_mul(s as u64))
155-
.saturating_add(T::DbWeight::get().reads(2 as u64))
156-
.saturating_add(T::DbWeight::get().writes(2 as u64))
135+
// Minimum execution time: 36_591 nanoseconds.
136+
Weight::from_ref_time(38_707_543 as u64)
137+
// Standard Error: 881
138+
.saturating_add(Weight::from_ref_time(126_198 as u64).saturating_mul(s as u64))
139+
.saturating_add(T::DbWeight::get().reads(1 as u64))
140+
.saturating_add(T::DbWeight::get().writes(1 as u64))
157141
}
158142
}
159143

160144
// For backwards compatibility and tests
161145
impl WeightInfo for () {
162-
fn as_multi_threshold_1(_z: u32, ) -> Weight {
163-
Weight::from_ref_time(17_537_000 as u64)
146+
/// The range of component `z` is `[0, 10000]`.
147+
fn as_multi_threshold_1(z: u32, ) -> Weight {
148+
// Minimum execution time: 20_283 nanoseconds.
149+
Weight::from_ref_time(20_861_089 as u64)
150+
// Standard Error: 5
151+
.saturating_add(Weight::from_ref_time(583 as u64).saturating_mul(z as u64))
164152
}
165153
// Storage: Multisig Multisigs (r:1 w:1)
166154
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
155+
/// The range of component `s` is `[2, 100]`.
156+
/// The range of component `z` is `[0, 10000]`.
167157
fn as_multi_create(s: u32, z: u32, ) -> Weight {
168-
Weight::from_ref_time(36_535_000 as u64)
169-
// Standard Error: 0
170-
.saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64))
171-
// Standard Error: 0
172-
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
158+
// Minimum execution time: 52_699 nanoseconds.
159+
Weight::from_ref_time(40_874_603 as u64)
160+
// Standard Error: 546
161+
.saturating_add(Weight::from_ref_time(131_727 as u64).saturating_mul(s as u64))
162+
// Standard Error: 5
163+
.saturating_add(Weight::from_ref_time(1_537 as u64).saturating_mul(z as u64))
173164
.saturating_add(RocksDbWeight::get().reads(2 as u64))
174165
.saturating_add(RocksDbWeight::get().writes(1 as u64))
175166
}
176167
// Storage: Multisig Multisigs (r:1 w:1)
177-
// Storage: Multisig Calls (r:1 w:1)
178-
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
179-
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
180-
Weight::from_ref_time(39_918_000 as u64)
181-
// Standard Error: 1_000
182-
.saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64))
183-
// Standard Error: 0
184-
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
185-
.saturating_add(RocksDbWeight::get().reads(3 as u64))
186-
.saturating_add(RocksDbWeight::get().writes(2 as u64))
187-
}
188-
// Storage: Multisig Multisigs (r:1 w:1)
168+
/// The range of component `s` is `[3, 100]`.
169+
/// The range of component `z` is `[0, 10000]`.
189170
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
190-
Weight::from_ref_time(25_524_000 as u64)
191-
// Standard Error: 0
192-
.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(s as u64))
193-
// Standard Error: 0
194-
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
171+
// Minimum execution time: 39_843 nanoseconds.
172+
Weight::from_ref_time(28_912_325 as u64)
173+
// Standard Error: 734
174+
.saturating_add(Weight::from_ref_time(125_761 as u64).saturating_mul(s as u64))
175+
// Standard Error: 7
176+
.saturating_add(Weight::from_ref_time(1_542 as u64).saturating_mul(z as u64))
195177
.saturating_add(RocksDbWeight::get().reads(1 as u64))
196178
.saturating_add(RocksDbWeight::get().writes(1 as u64))
197179
}
198180
// Storage: Multisig Multisigs (r:1 w:1)
199-
// Storage: Multisig Calls (r:1 w:1)
200-
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
201-
Weight::from_ref_time(39_923_000 as u64)
202-
// Standard Error: 1_000
203-
.saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(s as u64))
204-
// Standard Error: 0
205-
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
206-
.saturating_add(RocksDbWeight::get().reads(2 as u64))
207-
.saturating_add(RocksDbWeight::get().writes(2 as u64))
208-
}
209-
// Storage: Multisig Multisigs (r:1 w:1)
210-
// Storage: Multisig Calls (r:1 w:1)
211181
// Storage: System Account (r:1 w:1)
182+
/// The range of component `s` is `[2, 100]`.
183+
/// The range of component `z` is `[0, 10000]`.
212184
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
213-
Weight::from_ref_time(45_877_000 as u64)
214-
// Standard Error: 1_000
215-
.saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(s as u64))
216-
// Standard Error: 0
217-
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
218-
.saturating_add(RocksDbWeight::get().reads(3 as u64))
219-
.saturating_add(RocksDbWeight::get().writes(3 as u64))
185+
// Minimum execution time: 54_980 nanoseconds.
186+
Weight::from_ref_time(42_087_213 as u64)
187+
// Standard Error: 786
188+
.saturating_add(Weight::from_ref_time(153_935 as u64).saturating_mul(s as u64))
189+
// Standard Error: 7
190+
.saturating_add(Weight::from_ref_time(1_545 as u64).saturating_mul(z as u64))
191+
.saturating_add(RocksDbWeight::get().reads(2 as u64))
192+
.saturating_add(RocksDbWeight::get().writes(2 as u64))
220193
}
221194
// Storage: Multisig Multisigs (r:1 w:1)
222195
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
196+
/// The range of component `s` is `[2, 100]`.
223197
fn approve_as_multi_create(s: u32, ) -> Weight {
224-
Weight::from_ref_time(34_309_000 as u64)
225-
// Standard Error: 1_000
226-
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
198+
// Minimum execution time: 37_802 nanoseconds.
199+
Weight::from_ref_time(39_933_623 as u64)
200+
// Standard Error: 1_059
201+
.saturating_add(Weight::from_ref_time(121_891 as u64).saturating_mul(s as u64))
227202
.saturating_add(RocksDbWeight::get().reads(2 as u64))
228203
.saturating_add(RocksDbWeight::get().writes(1 as u64))
229204
}
230205
// Storage: Multisig Multisigs (r:1 w:1)
231-
// Storage: Multisig Calls (r:1 w:0)
206+
/// The range of component `s` is `[2, 100]`.
232207
fn approve_as_multi_approve(s: u32, ) -> Weight {
233-
Weight::from_ref_time(22_848_000 as u64)
234-
// Standard Error: 0
235-
.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
208+
// Minimum execution time: 25_738 nanoseconds.
209+
Weight::from_ref_time(27_676_766 as u64)
210+
// Standard Error: 710
211+
.saturating_add(Weight::from_ref_time(125_733 as u64).saturating_mul(s as u64))
236212
.saturating_add(RocksDbWeight::get().reads(1 as u64))
237213
.saturating_add(RocksDbWeight::get().writes(1 as u64))
238214
}
239215
// Storage: Multisig Multisigs (r:1 w:1)
240-
// Storage: Multisig Calls (r:1 w:1)
241-
// Storage: System Account (r:1 w:1)
242-
fn approve_as_multi_complete(s: u32, ) -> Weight {
243-
Weight::from_ref_time(63_239_000 as u64)
244-
// Standard Error: 1_000
245-
.saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(s as u64))
246-
.saturating_add(RocksDbWeight::get().reads(3 as u64))
247-
.saturating_add(RocksDbWeight::get().writes(3 as u64))
248-
}
249-
// Storage: Multisig Multisigs (r:1 w:1)
250-
// Storage: Multisig Calls (r:1 w:1)
216+
/// The range of component `s` is `[2, 100]`.
251217
fn cancel_as_multi(s: u32, ) -> Weight {
252-
Weight::from_ref_time(51_254_000 as u64)
253-
// Standard Error: 1_000
254-
.saturating_add(Weight::from_ref_time(118_000 as u64).saturating_mul(s as u64))
255-
.saturating_add(RocksDbWeight::get().reads(2 as u64))
256-
.saturating_add(RocksDbWeight::get().writes(2 as u64))
218+
// Minimum execution time: 36_591 nanoseconds.
219+
Weight::from_ref_time(38_707_543 as u64)
220+
// Standard Error: 881
221+
.saturating_add(Weight::from_ref_time(126_198 as u64).saturating_mul(s as u64))
222+
.saturating_add(RocksDbWeight::get().reads(1 as u64))
223+
.saturating_add(RocksDbWeight::get().writes(1 as u64))
257224
}
258225
}

frame/transaction-payment/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ where
658658
Self(fee)
659659
}
660660

661-
/// Returns the tip as being choosen by the transaction sender.
661+
/// Returns the tip as being chosen by the transaction sender.
662662
pub fn tip(&self) -> BalanceOf<T> {
663663
self.0
664664
}

frame/utility/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub mod pallet {
124124
// Align the call size to 1KB. As we are currently compiling the runtime for native/wasm
125125
// the `size_of` of the `Call` can be different. To ensure that this don't leads to
126126
// mismatches between native/wasm or to different metadata for the same runtime, we
127-
// algin the call size. The value is choosen big enough to hopefully never reach it.
127+
// algin the call size. The value is chosen big enough to hopefully never reach it.
128128
const CALL_ALIGN: u32 = 1024;
129129

130130
#[pallet::extra_constants]

0 commit comments

Comments
 (0)