1
// Copyright 2019-2022 PureStake Inc.
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8

            
9
// Moonbeam is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13

            
14
// You should have received a copy of the GNU General Public License
15
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16
//! Autogenerated weights for `pallet_collective`
17
//!
18
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
19
//! DATE: 2023-11-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
20
//! WORST CASE MAP SIZE: `1000000`
21
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
22
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
23

            
24
// Executed Command:
25
// ./target/release/moonbeam
26
// benchmark
27
// pallet
28
// --chain=moonbase-dev
29
// --steps=50
30
// --repeat=20
31
// --pallet=pallet_collective
32
// --extrinsic=*
33
// --wasm-execution=compiled
34
// --header=./file_header.txt
35
// --output=./runtime/common/src/weights/
36

            
37
#![cfg_attr(rustfmt, rustfmt_skip)]
38
#![allow(unused_parens)]
39
#![allow(unused_imports)]
40
#![allow(missing_docs)]
41

            
42
use frame_support::{traits::Get, weights::Weight};
43
use core::marker::PhantomData;
44

            
45
/// Weight functions for `pallet_collective`.
46
pub struct WeightInfo<T>(PhantomData<T>);
47
impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
48
	/// Storage: CouncilCollective Members (r:1 w:1)
49
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
50
	/// Storage: CouncilCollective Proposals (r:1 w:0)
51
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
52
	/// Storage: CouncilCollective Voting (r:100 w:100)
53
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
54
	/// Storage: CouncilCollective Prime (r:0 w:1)
55
	/// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured)
56
	/// The range of component `m` is `[0, 100]`.
57
	/// The range of component `n` is `[0, 100]`.
58
	/// The range of component `p` is `[0, 100]`.
59
50
	fn set_members(m: u32, _n: u32, p: u32, ) -> Weight {
60
50
		// Proof Size summary in bytes:
61
50
		//  Measured:  `0 + m * (2021 ±0) + p * (2026 ±0)`
62
50
		//  Estimated: `12238 + m * (1231 ±14) + p * (3660 ±14)`
63
50
		// Minimum execution time: 13_785_000 picoseconds.
64
50
		Weight::from_parts(14_085_000, 0)
65
50
			.saturating_add(Weight::from_parts(0, 12238))
66
50
			// Standard Error: 34_315
67
50
			.saturating_add(Weight::from_parts(2_414_144, 0).saturating_mul(m.into()))
68
50
			// Standard Error: 34_315
69
50
			.saturating_add(Weight::from_parts(5_345_562, 0).saturating_mul(p.into()))
70
50
			.saturating_add(T::DbWeight::get().reads(2))
71
50
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
72
50
			.saturating_add(T::DbWeight::get().writes(2))
73
50
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
74
50
			.saturating_add(Weight::from_parts(0, 1231).saturating_mul(m.into()))
75
50
			.saturating_add(Weight::from_parts(0, 3660).saturating_mul(p.into()))
76
50
	}
77
	/// Storage: CouncilCollective Members (r:1 w:0)
78
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
79
	/// Storage: MaintenanceMode MaintenanceMode (r:1 w:0)
80
	/// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured)
81
	/// The range of component `b` is `[2, 1024]`.
82
	/// The range of component `m` is `[1, 100]`.
83
	fn execute(b: u32, m: u32, ) -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `149 + m * (20 ±0)`
86
		//  Estimated: `1634 + m * (20 ±0)`
87
		// Minimum execution time: 12_726_000 picoseconds.
88
		Weight::from_parts(12_294_605, 0)
89
			.saturating_add(Weight::from_parts(0, 1634))
90
			// Standard Error: 18
91
			.saturating_add(Weight::from_parts(910, 0).saturating_mul(b.into()))
92
			// Standard Error: 192
93
			.saturating_add(Weight::from_parts(13_235, 0).saturating_mul(m.into()))
94
			.saturating_add(T::DbWeight::get().reads(2))
95
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
96
	}
97
	/// Storage: CouncilCollective Members (r:1 w:0)
98
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
99
	/// Storage: CouncilCollective ProposalOf (r:1 w:0)
100
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
101
	/// Storage: MaintenanceMode MaintenanceMode (r:1 w:0)
102
	/// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured)
103
	/// The range of component `b` is `[2, 1024]`.
104
	/// The range of component `m` is `[1, 100]`.
105
	fn propose_execute(b: u32, m: u32, ) -> Weight {
106
		// Proof Size summary in bytes:
107
		//  Measured:  `149 + m * (20 ±0)`
108
		//  Estimated: `3614 + m * (20 ±0)`
109
		// Minimum execution time: 14_722_000 picoseconds.
110
		Weight::from_parts(14_487_427, 0)
111
			.saturating_add(Weight::from_parts(0, 3614))
112
			// Standard Error: 20
113
			.saturating_add(Weight::from_parts(944, 0).saturating_mul(b.into()))
114
			// Standard Error: 215
115
			.saturating_add(Weight::from_parts(25_619, 0).saturating_mul(m.into()))
116
			.saturating_add(T::DbWeight::get().reads(3))
117
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
118
	}
119
	/// Storage: CouncilCollective Members (r:1 w:0)
120
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
121
	/// Storage: CouncilCollective ProposalOf (r:1 w:1)
122
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
123
	/// Storage: CouncilCollective Proposals (r:1 w:1)
124
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
125
	/// Storage: CouncilCollective ProposalCount (r:1 w:1)
126
	/// Proof Skipped: CouncilCollective ProposalCount (max_values: Some(1), max_size: None, mode: Measured)
127
	/// Storage: CouncilCollective Voting (r:0 w:1)
128
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
129
	/// The range of component `b` is `[2, 1024]`.
130
	/// The range of component `m` is `[2, 100]`.
131
	/// The range of component `p` is `[1, 100]`.
132
	fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `395 + m * (20 ±0) + p * (36 ±0)`
135
		//  Estimated: `3789 + m * (21 ±0) + p * (36 ±0)`
136
		// Minimum execution time: 17_107_000 picoseconds.
137
		Weight::from_parts(15_172_014, 0)
138
			.saturating_add(Weight::from_parts(0, 3789))
139
			// Standard Error: 104
140
			.saturating_add(Weight::from_parts(3_191, 0).saturating_mul(b.into()))
141
			// Standard Error: 1_090
142
			.saturating_add(Weight::from_parts(31_145, 0).saturating_mul(m.into()))
143
			// Standard Error: 1_077
144
			.saturating_add(Weight::from_parts(131_855, 0).saturating_mul(p.into()))
145
			.saturating_add(T::DbWeight::get().reads(4))
146
			.saturating_add(T::DbWeight::get().writes(4))
147
			.saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into()))
148
			.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
149
	}
150
	/// Storage: CouncilCollective Members (r:1 w:0)
151
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
152
	/// Storage: CouncilCollective Voting (r:1 w:1)
153
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
154
	/// The range of component `m` is `[5, 100]`.
155
	fn vote(m: u32, ) -> Weight {
156
		// Proof Size summary in bytes:
157
		//  Measured:  `870 + m * (40 ±0)`
158
		//  Estimated: `4334 + m * (40 ±0)`
159
		// Minimum execution time: 21_423_000 picoseconds.
160
		Weight::from_parts(22_311_906, 0)
161
			.saturating_add(Weight::from_parts(0, 4334))
162
			// Standard Error: 415
163
			.saturating_add(Weight::from_parts(32_990, 0).saturating_mul(m.into()))
164
			.saturating_add(T::DbWeight::get().reads(2))
165
			.saturating_add(T::DbWeight::get().writes(1))
166
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
167
	}
168
	/// Storage: CouncilCollective Voting (r:1 w:1)
169
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
170
	/// Storage: CouncilCollective Members (r:1 w:0)
171
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
172
	/// Storage: CouncilCollective Proposals (r:1 w:1)
173
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
174
	/// Storage: CouncilCollective ProposalOf (r:0 w:1)
175
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
176
	/// The range of component `m` is `[4, 100]`.
177
	/// The range of component `p` is `[1, 100]`.
178
	fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
179
		// Proof Size summary in bytes:
180
		//  Measured:  `447 + m * (40 ±0) + p * (36 ±0)`
181
		//  Estimated: `3892 + m * (41 ±0) + p * (36 ±0)`
182
		// Minimum execution time: 20_010_000 picoseconds.
183
		Weight::from_parts(20_008_777, 0)
184
			.saturating_add(Weight::from_parts(0, 3892))
185
			// Standard Error: 1_391
186
			.saturating_add(Weight::from_parts(39_960, 0).saturating_mul(m.into()))
187
			// Standard Error: 1_356
188
			.saturating_add(Weight::from_parts(126_447, 0).saturating_mul(p.into()))
189
			.saturating_add(T::DbWeight::get().reads(3))
190
			.saturating_add(T::DbWeight::get().writes(3))
191
			.saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into()))
192
			.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
193
	}
194
	/// Storage: CouncilCollective Voting (r:1 w:1)
195
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
196
	/// Storage: CouncilCollective Members (r:1 w:0)
197
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
198
	/// Storage: CouncilCollective ProposalOf (r:1 w:1)
199
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
200
	/// Storage: MaintenanceMode MaintenanceMode (r:1 w:0)
201
	/// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured)
202
	/// Storage: CouncilCollective Proposals (r:1 w:1)
203
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
204
	/// The range of component `b` is `[2, 1024]`.
205
	/// The range of component `m` is `[4, 100]`.
206
	/// The range of component `p` is `[1, 100]`.
207
	fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
208
		// Proof Size summary in bytes:
209
		//  Measured:  `791 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)`
210
		//  Estimated: `4108 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)`
211
		// Minimum execution time: 30_647_000 picoseconds.
212
		Weight::from_parts(30_084_699, 0)
213
			.saturating_add(Weight::from_parts(0, 4108))
214
			// Standard Error: 123
215
			.saturating_add(Weight::from_parts(2_876, 0).saturating_mul(b.into()))
216
			// Standard Error: 1_307
217
			.saturating_add(Weight::from_parts(31_661, 0).saturating_mul(m.into()))
218
			// Standard Error: 1_274
219
			.saturating_add(Weight::from_parts(154_567, 0).saturating_mul(p.into()))
220
			.saturating_add(T::DbWeight::get().reads(5))
221
			.saturating_add(T::DbWeight::get().writes(3))
222
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
223
			.saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into()))
224
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
225
	}
226
	/// Storage: CouncilCollective Voting (r:1 w:1)
227
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
228
	/// Storage: CouncilCollective Members (r:1 w:0)
229
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
230
	/// Storage: CouncilCollective Prime (r:1 w:0)
231
	/// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured)
232
	/// Storage: CouncilCollective Proposals (r:1 w:1)
233
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
234
	/// Storage: CouncilCollective ProposalOf (r:0 w:1)
235
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
236
	/// The range of component `m` is `[4, 100]`.
237
	/// The range of component `p` is `[1, 100]`.
238
	fn close_disapproved(m: u32, p: u32, ) -> Weight {
239
		// Proof Size summary in bytes:
240
		//  Measured:  `516 + m * (30 ±0) + p * (36 ±0)`
241
		//  Estimated: `3958 + m * (31 ±0) + p * (36 ±0)`
242
		// Minimum execution time: 20_735_000 picoseconds.
243
		Weight::from_parts(22_649_363, 0)
244
			.saturating_add(Weight::from_parts(0, 3958))
245
			// Standard Error: 1_082
246
			.saturating_add(Weight::from_parts(32_331, 0).saturating_mul(m.into()))
247
			// Standard Error: 1_055
248
			.saturating_add(Weight::from_parts(122_034, 0).saturating_mul(p.into()))
249
			.saturating_add(T::DbWeight::get().reads(4))
250
			.saturating_add(T::DbWeight::get().writes(3))
251
			.saturating_add(Weight::from_parts(0, 31).saturating_mul(m.into()))
252
			.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
253
	}
254
	/// Storage: CouncilCollective Voting (r:1 w:1)
255
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
256
	/// Storage: CouncilCollective Members (r:1 w:0)
257
	/// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured)
258
	/// Storage: CouncilCollective Prime (r:1 w:0)
259
	/// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured)
260
	/// Storage: CouncilCollective ProposalOf (r:1 w:1)
261
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
262
	/// Storage: MaintenanceMode MaintenanceMode (r:1 w:0)
263
	/// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured)
264
	/// Storage: CouncilCollective Proposals (r:1 w:1)
265
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
266
	/// The range of component `b` is `[2, 1024]`.
267
	/// The range of component `m` is `[4, 100]`.
268
	/// The range of component `p` is `[1, 100]`.
269
	fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
270
		// Proof Size summary in bytes:
271
		//  Measured:  `811 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)`
272
		//  Estimated: `4128 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)`
273
		// Minimum execution time: 32_927_000 picoseconds.
274
		Weight::from_parts(32_086_367, 0)
275
			.saturating_add(Weight::from_parts(0, 4128))
276
			// Standard Error: 122
277
			.saturating_add(Weight::from_parts(2_962, 0).saturating_mul(b.into()))
278
			// Standard Error: 1_299
279
			.saturating_add(Weight::from_parts(32_167, 0).saturating_mul(m.into()))
280
			// Standard Error: 1_266
281
			.saturating_add(Weight::from_parts(154_131, 0).saturating_mul(p.into()))
282
			.saturating_add(T::DbWeight::get().reads(6))
283
			.saturating_add(T::DbWeight::get().writes(3))
284
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
285
			.saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into()))
286
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
287
	}
288
	/// Storage: CouncilCollective Proposals (r:1 w:1)
289
	/// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured)
290
	/// Storage: CouncilCollective Voting (r:0 w:1)
291
	/// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured)
292
	/// Storage: CouncilCollective ProposalOf (r:0 w:1)
293
	/// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured)
294
	/// The range of component `p` is `[1, 100]`.
295
	fn disapprove_proposal(p: u32, ) -> Weight {
296
		// Proof Size summary in bytes:
297
		//  Measured:  `264 + p * (32 ±0)`
298
		//  Estimated: `1749 + p * (32 ±0)`
299
		// Minimum execution time: 10_334_000 picoseconds.
300
		Weight::from_parts(11_413_201, 0)
301
			.saturating_add(Weight::from_parts(0, 1749))
302
			// Standard Error: 1_033
303
			.saturating_add(Weight::from_parts(95_458, 0).saturating_mul(p.into()))
304
			.saturating_add(T::DbWeight::get().reads(1))
305
			.saturating_add(T::DbWeight::get().writes(3))
306
			.saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into()))
307
	}
308
}