1
// This file is part of Substrate.
2

            
3
// Copyright (C) Parity Technologies (UK) Ltd.
4
// SPDX-License-Identifier: Apache-2.0
5

            
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
// You may obtain a copy of the License at
9
//
10
// 	http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17

            
18
//! Autogenerated weights for `pallet_multisig`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `runner-anb7yjbi-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
25

            
26
// Executed Command:
27
// ./target/production/substrate-node
28
// benchmark
29
// pallet
30
// --chain=dev
31
// --steps=50
32
// --repeat=20
33
// --pallet=pallet_multisig
34
// --no-storage-info
35
// --no-median-slopes
36
// --no-min-squares
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --heap-pages=4096
40
// --output=./substrate/frame/multisig/src/weights.rs
41
// --header=./substrate/HEADER-APACHE2
42
// --template=./substrate/.maintain/frame-weight-template.hbs
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47
#![allow(missing_docs)]
48

            
49
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
50
use core::marker::PhantomData;
51

            
52
/// Weight functions needed for `pallet_multisig`.
53
pub trait WeightInfo {
54
	fn as_multi_threshold_1(z: u32, ) -> Weight;
55
	fn as_multi_create(s: u32, z: u32, ) -> Weight;
56
	fn as_multi_approve(s: u32, z: u32, ) -> Weight;
57
	fn as_multi_complete(s: u32, z: u32, ) -> Weight;
58
	fn approve_as_multi_create(s: u32, ) -> Weight;
59
	fn approve_as_multi_approve(s: u32, ) -> Weight;
60
	fn cancel_as_multi(s: u32, ) -> Weight;
61
}
62

            
63
/// Weights for `pallet_multisig` using the Substrate node and recommended hardware.
64
pub struct SubstrateWeight<T>(PhantomData<T>);
65
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
66
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
67
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
68
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
69
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
70
	/// The range of component `z` is `[0, 10000]`.
71
	fn as_multi_threshold_1(z: u32, ) -> Weight {
72
		// Proof Size summary in bytes:
73
		//  Measured:  `145`
74
		//  Estimated: `3997`
75
		// Minimum execution time: 20_302_000 picoseconds.
76
		Weight::from_parts(21_362_808, 3997)
77
			// Standard Error: 4
78
			.saturating_add(Weight::from_parts(432, 0).saturating_mul(z.into()))
79
			.saturating_add(T::DbWeight::get().reads(2_u64))
80
	}
81
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
82
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
83
	/// The range of component `s` is `[2, 100]`.
84
	/// The range of component `z` is `[0, 10000]`.
85
	fn as_multi_create(s: u32, z: u32, ) -> Weight {
86
		// Proof Size summary in bytes:
87
		//  Measured:  `301 + s * (2 ±0)`
88
		//  Estimated: `6811`
89
		// Minimum execution time: 41_140_000 picoseconds.
90
		Weight::from_parts(31_518_927, 6811)
91
			// Standard Error: 754
92
			.saturating_add(Weight::from_parts(115_804, 0).saturating_mul(s.into()))
93
			// Standard Error: 7
94
			.saturating_add(Weight::from_parts(1_442, 0).saturating_mul(z.into()))
95
			.saturating_add(T::DbWeight::get().reads(1_u64))
96
			.saturating_add(T::DbWeight::get().writes(1_u64))
97
	}
98
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
99
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
100
	/// The range of component `s` is `[3, 100]`.
101
	/// The range of component `z` is `[0, 10000]`.
102
	fn as_multi_approve(s: u32, z: u32, ) -> Weight {
103
		// Proof Size summary in bytes:
104
		//  Measured:  `320`
105
		//  Estimated: `6811`
106
		// Minimum execution time: 27_375_000 picoseconds.
107
		Weight::from_parts(17_806_361, 6811)
108
			// Standard Error: 501
109
			.saturating_add(Weight::from_parts(107_042, 0).saturating_mul(s.into()))
110
			// Standard Error: 4
111
			.saturating_add(Weight::from_parts(1_491, 0).saturating_mul(z.into()))
112
			.saturating_add(T::DbWeight::get().reads(1_u64))
113
			.saturating_add(T::DbWeight::get().writes(1_u64))
114
	}
115
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
116
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
117
	/// Storage: `System::Account` (r:1 w:1)
118
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
119
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
120
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
121
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
122
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
123
	/// The range of component `s` is `[2, 100]`.
124
	/// The range of component `z` is `[0, 10000]`.
125
	fn as_multi_complete(s: u32, z: u32, ) -> Weight {
126
		// Proof Size summary in bytes:
127
		//  Measured:  `571 + s * (33 ±0)`
128
		//  Estimated: `6811`
129
		// Minimum execution time: 54_427_000 picoseconds.
130
		Weight::from_parts(43_677_970, 6811)
131
			// Standard Error: 1_342
132
			.saturating_add(Weight::from_parts(154_697, 0).saturating_mul(s.into()))
133
			// Standard Error: 13
134
			.saturating_add(Weight::from_parts(1_534, 0).saturating_mul(z.into()))
135
			.saturating_add(T::DbWeight::get().reads(4_u64))
136
			.saturating_add(T::DbWeight::get().writes(2_u64))
137
	}
138
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
139
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
140
	/// The range of component `s` is `[2, 100]`.
141
	fn approve_as_multi_create(s: u32, ) -> Weight {
142
		// Proof Size summary in bytes:
143
		//  Measured:  `301 + s * (2 ±0)`
144
		//  Estimated: `6811`
145
		// Minimum execution time: 29_102_000 picoseconds.
146
		Weight::from_parts(30_317_105, 6811)
147
			// Standard Error: 903
148
			.saturating_add(Weight::from_parts(109_792, 0).saturating_mul(s.into()))
149
			.saturating_add(T::DbWeight::get().reads(1_u64))
150
			.saturating_add(T::DbWeight::get().writes(1_u64))
151
	}
152
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
153
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
154
	/// The range of component `s` is `[2, 100]`.
155
	fn approve_as_multi_approve(s: u32, ) -> Weight {
156
		// Proof Size summary in bytes:
157
		//  Measured:  `320`
158
		//  Estimated: `6811`
159
		// Minimum execution time: 16_300_000 picoseconds.
160
		Weight::from_parts(17_358_877, 6811)
161
			// Standard Error: 522
162
			.saturating_add(Weight::from_parts(99_194, 0).saturating_mul(s.into()))
163
			.saturating_add(T::DbWeight::get().reads(1_u64))
164
			.saturating_add(T::DbWeight::get().writes(1_u64))
165
	}
166
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
167
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
168
	/// The range of component `s` is `[2, 100]`.
169
	fn cancel_as_multi(s: u32, ) -> Weight {
170
		// Proof Size summary in bytes:
171
		//  Measured:  `492 + s * (1 ±0)`
172
		//  Estimated: `6811`
173
		// Minimum execution time: 30_147_000 picoseconds.
174
		Weight::from_parts(32_003_421, 6811)
175
			// Standard Error: 1_077
176
			.saturating_add(Weight::from_parts(108_567, 0).saturating_mul(s.into()))
177
			.saturating_add(T::DbWeight::get().reads(1_u64))
178
			.saturating_add(T::DbWeight::get().writes(1_u64))
179
	}
180
}
181

            
182
// For backwards compatibility and tests.
183
impl WeightInfo for () {
184
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
185
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
186
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
187
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
188
	/// The range of component `z` is `[0, 10000]`.
189
	fn as_multi_threshold_1(z: u32, ) -> Weight {
190
		// Proof Size summary in bytes:
191
		//  Measured:  `145`
192
		//  Estimated: `3997`
193
		// Minimum execution time: 20_302_000 picoseconds.
194
		Weight::from_parts(21_362_808, 3997)
195
			// Standard Error: 4
196
			.saturating_add(Weight::from_parts(432, 0).saturating_mul(z.into()))
197
			.saturating_add(RocksDbWeight::get().reads(2_u64))
198
	}
199
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
200
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
201
	/// The range of component `s` is `[2, 100]`.
202
	/// The range of component `z` is `[0, 10000]`.
203
	fn as_multi_create(s: u32, z: u32, ) -> Weight {
204
		// Proof Size summary in bytes:
205
		//  Measured:  `301 + s * (2 ±0)`
206
		//  Estimated: `6811`
207
		// Minimum execution time: 41_140_000 picoseconds.
208
		Weight::from_parts(31_518_927, 6811)
209
			// Standard Error: 754
210
			.saturating_add(Weight::from_parts(115_804, 0).saturating_mul(s.into()))
211
			// Standard Error: 7
212
			.saturating_add(Weight::from_parts(1_442, 0).saturating_mul(z.into()))
213
			.saturating_add(RocksDbWeight::get().reads(1_u64))
214
			.saturating_add(RocksDbWeight::get().writes(1_u64))
215
	}
216
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
217
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
218
	/// The range of component `s` is `[3, 100]`.
219
	/// The range of component `z` is `[0, 10000]`.
220
	fn as_multi_approve(s: u32, z: u32, ) -> Weight {
221
		// Proof Size summary in bytes:
222
		//  Measured:  `320`
223
		//  Estimated: `6811`
224
		// Minimum execution time: 27_375_000 picoseconds.
225
		Weight::from_parts(17_806_361, 6811)
226
			// Standard Error: 501
227
			.saturating_add(Weight::from_parts(107_042, 0).saturating_mul(s.into()))
228
			// Standard Error: 4
229
			.saturating_add(Weight::from_parts(1_491, 0).saturating_mul(z.into()))
230
			.saturating_add(RocksDbWeight::get().reads(1_u64))
231
			.saturating_add(RocksDbWeight::get().writes(1_u64))
232
	}
233
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
234
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
235
	/// Storage: `System::Account` (r:1 w:1)
236
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
237
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
238
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
239
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
240
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
241
	/// The range of component `s` is `[2, 100]`.
242
	/// The range of component `z` is `[0, 10000]`.
243
	fn as_multi_complete(s: u32, z: u32, ) -> Weight {
244
		// Proof Size summary in bytes:
245
		//  Measured:  `571 + s * (33 ±0)`
246
		//  Estimated: `6811`
247
		// Minimum execution time: 54_427_000 picoseconds.
248
		Weight::from_parts(43_677_970, 6811)
249
			// Standard Error: 1_342
250
			.saturating_add(Weight::from_parts(154_697, 0).saturating_mul(s.into()))
251
			// Standard Error: 13
252
			.saturating_add(Weight::from_parts(1_534, 0).saturating_mul(z.into()))
253
			.saturating_add(RocksDbWeight::get().reads(4_u64))
254
			.saturating_add(RocksDbWeight::get().writes(2_u64))
255
	}
256
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
257
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
258
	/// The range of component `s` is `[2, 100]`.
259
	fn approve_as_multi_create(s: u32, ) -> Weight {
260
		// Proof Size summary in bytes:
261
		//  Measured:  `301 + s * (2 ±0)`
262
		//  Estimated: `6811`
263
		// Minimum execution time: 29_102_000 picoseconds.
264
		Weight::from_parts(30_317_105, 6811)
265
			// Standard Error: 903
266
			.saturating_add(Weight::from_parts(109_792, 0).saturating_mul(s.into()))
267
			.saturating_add(RocksDbWeight::get().reads(1_u64))
268
			.saturating_add(RocksDbWeight::get().writes(1_u64))
269
	}
270
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
271
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
272
	/// The range of component `s` is `[2, 100]`.
273
	fn approve_as_multi_approve(s: u32, ) -> Weight {
274
		// Proof Size summary in bytes:
275
		//  Measured:  `320`
276
		//  Estimated: `6811`
277
		// Minimum execution time: 16_300_000 picoseconds.
278
		Weight::from_parts(17_358_877, 6811)
279
			// Standard Error: 522
280
			.saturating_add(Weight::from_parts(99_194, 0).saturating_mul(s.into()))
281
			.saturating_add(RocksDbWeight::get().reads(1_u64))
282
			.saturating_add(RocksDbWeight::get().writes(1_u64))
283
	}
284
	/// Storage: `Multisig::Multisigs` (r:1 w:1)
285
	/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
286
	/// The range of component `s` is `[2, 100]`.
287
	fn cancel_as_multi(s: u32, ) -> Weight {
288
		// Proof Size summary in bytes:
289
		//  Measured:  `492 + s * (1 ±0)`
290
		//  Estimated: `6811`
291
		// Minimum execution time: 30_147_000 picoseconds.
292
		Weight::from_parts(32_003_421, 6811)
293
			// Standard Error: 1_077
294
			.saturating_add(Weight::from_parts(108_567, 0).saturating_mul(s.into()))
295
			.saturating_add(RocksDbWeight::get().reads(1_u64))
296
			.saturating_add(RocksDbWeight::get().writes(1_u64))
297
	}
298
}