1
// Copyright 2025 Moonbeam foundation
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

            
17

            
18
//! Autogenerated weights for `pallet_collective_open_tech_committee`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
21
//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `Mac`, CPU: `<UNKNOWN>`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/release/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=2
35
// --repeat=1
36
// --pallet=pallet_collective_open_tech_committee
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonbeam/src/weights
42

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

            
47
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48
use sp_std::marker::PhantomData;
49

            
50
use pallet_collective as pallet_collective_open_tech_committee;
51

            
52
/// Weights for `pallet_collective_open_tech_committee`.
53
pub struct WeightInfo<T>(PhantomData<T>);
54
impl<T: frame_system::Config> pallet_collective_open_tech_committee::WeightInfo for WeightInfo<T> {
55
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:1)
56
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
57
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:0)
58
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
59
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:100 w:100)
60
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `OpenTechCommitteeCollective::Prime` (r:0 w:1)
62
	/// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// The range of component `m` is `[0, 100]`.
64
	/// The range of component `n` is `[0, 100]`.
65
	/// The range of component `p` is `[0, 100]`.
66
7
	fn set_members(m: u32, _n: u32, p: u32, ) -> Weight {
67
7
		// Proof Size summary in bytes:
68
7
		//  Measured:  `0 + m * (2048 ±0) + p * (2027 ±0)`
69
7
		//  Estimated: `1585 + m * (65536 ±2_000_011_713_608_241_905_664) + p * (1248 ±467)`
70
7
		// Minimum execution time: 12_000_000 picoseconds.
71
7
		Weight::from_parts(12_000_000, 1585)
72
7
			// Standard Error: 1_898_490
73
7
			.saturating_add(Weight::from_parts(4_542_307, 0).saturating_mul(m.into()))
74
7
			// Standard Error: 1_898_490
75
7
			.saturating_add(Weight::from_parts(4_492_307, 0).saturating_mul(p.into()))
76
7
			.saturating_add(T::DbWeight::get().reads(2_u64))
77
7
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
78
7
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
79
7
			.saturating_add(T::DbWeight::get().writes(2_u64))
80
7
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
81
7
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
82
7
			.saturating_add(Weight::from_parts(0, 65536).saturating_mul(m.into()))
83
7
			.saturating_add(Weight::from_parts(0, 1248).saturating_mul(p.into()))
84
7
	}
85
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
86
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
87
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
88
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
89
	/// The range of component `b` is `[2, 1024]`.
90
	/// The range of component `m` is `[1, 100]`.
91
	fn execute(_b: u32, m: u32, ) -> Weight {
92
		// Proof Size summary in bytes:
93
		//  Measured:  `142 + m * (20 ±0)`
94
		//  Estimated: `1628 + m * (20 ±0)`
95
		// Minimum execution time: 13_000_000 picoseconds.
96
		Weight::from_parts(13_495_927, 1628)
97
			// Standard Error: 8_747
98
			.saturating_add(Weight::from_parts(5_050, 0).saturating_mul(m.into()))
99
			.saturating_add(T::DbWeight::get().reads(2_u64))
100
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
101
	}
102
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
103
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
104
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:0)
105
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
106
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
107
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
108
	/// The range of component `b` is `[2, 1024]`.
109
	/// The range of component `m` is `[1, 100]`.
110
	fn propose_execute(b: u32, m: u32, ) -> Weight {
111
		// Proof Size summary in bytes:
112
		//  Measured:  `142 + m * (20 ±0)`
113
		//  Estimated: `3608 + m * (20 ±0)`
114
		// Minimum execution time: 15_000_000 picoseconds.
115
		Weight::from_parts(12_975_884, 3608)
116
			// Standard Error: 0
117
			.saturating_add(Weight::from_parts(1_956, 0).saturating_mul(b.into()))
118
			// Standard Error: 0
119
			.saturating_add(Weight::from_parts(20_202, 0).saturating_mul(m.into()))
120
			.saturating_add(T::DbWeight::get().reads(3_u64))
121
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
122
	}
123
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
124
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
126
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
127
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
128
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
129
	/// Storage: `OpenTechCommitteeCollective::ProposalCount` (r:1 w:1)
130
	/// Proof: `OpenTechCommitteeCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
131
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1)
132
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
133
	/// The range of component `b` is `[2, 1024]`.
134
	/// The range of component `m` is `[2, 100]`.
135
	/// The range of component `p` is `[1, 100]`.
136
	fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
137
		// Proof Size summary in bytes:
138
		//  Measured:  `37 + m * (20 ±0) + p * (39 ±0)`
139
		//  Estimated: `3502 + m * (20 ±0) + p * (39 ±0)`
140
		// Minimum execution time: 17_000_000 picoseconds.
141
		Weight::from_parts(9_043_088, 3502)
142
			// Standard Error: 4_566
143
			.saturating_add(Weight::from_parts(3_261, 0).saturating_mul(b.into()))
144
			// Standard Error: 47_619
145
			.saturating_add(Weight::from_parts(44_217, 0).saturating_mul(m.into()))
146
			// Standard Error: 47_138
147
			.saturating_add(Weight::from_parts(195_286, 0).saturating_mul(p.into()))
148
			.saturating_add(T::DbWeight::get().reads(4_u64))
149
			.saturating_add(T::DbWeight::get().writes(4_u64))
150
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
151
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into()))
152
	}
153
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
154
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
155
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
156
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
157
	/// The range of component `m` is `[5, 100]`.
158
	fn vote(_m: u32, ) -> Weight {
159
		// Proof Size summary in bytes:
160
		//  Measured:  `865 + m * (40 ±0)`
161
		//  Estimated: `8333`
162
		// Minimum execution time: 17_000_000 picoseconds.
163
		Weight::from_parts(19_000_000, 8333)
164
			.saturating_add(T::DbWeight::get().reads(2_u64))
165
			.saturating_add(T::DbWeight::get().writes(1_u64))
166
	}
167
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
168
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
169
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
170
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
171
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
172
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
173
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
174
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
175
	/// The range of component `m` is `[4, 100]`.
176
	/// The range of component `p` is `[1, 100]`.
177
	fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
178
		// Proof Size summary in bytes:
179
		//  Measured:  `227 + m * (40 ±0) + p * (38 ±0)`
180
		//  Estimated: `3692 + m * (40 ±0) + p * (39 ±0)`
181
		// Minimum execution time: 21_000_000 picoseconds.
182
		Weight::from_parts(9_825_126, 3692)
183
			// Standard Error: 99_232
184
			.saturating_add(Weight::from_parts(109_375, 0).saturating_mul(m.into()))
185
			// Standard Error: 96_225
186
			.saturating_add(Weight::from_parts(237_373, 0).saturating_mul(p.into()))
187
			.saturating_add(T::DbWeight::get().reads(3_u64))
188
			.saturating_add(T::DbWeight::get().writes(3_u64))
189
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
190
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into()))
191
	}
192
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
193
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
194
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
195
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
196
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
197
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
198
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
199
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
200
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
201
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
202
	/// The range of component `b` is `[2, 1024]`.
203
	/// The range of component `m` is `[4, 100]`.
204
	/// The range of component `p` is `[1, 100]`.
205
	fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
206
		// Proof Size summary in bytes:
207
		//  Measured:  `484 + m * (40 ±0) + p * (44 ±0)`
208
		//  Estimated: `3949 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)`
209
		// Minimum execution time: 45_000_000 picoseconds.
210
		Weight::from_parts(27_076_053, 3949)
211
			// Standard Error: 15_003
212
			.saturating_add(Weight::from_parts(8_480, 0).saturating_mul(b.into()))
213
			// Standard Error: 159_722
214
			.saturating_add(Weight::from_parts(121_527, 0).saturating_mul(m.into()))
215
			// Standard Error: 154_882
216
			.saturating_add(Weight::from_parts(87_542, 0).saturating_mul(p.into()))
217
			.saturating_add(T::DbWeight::get().reads(5_u64))
218
			.saturating_add(T::DbWeight::get().writes(3_u64))
219
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
220
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
221
			.saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into()))
222
	}
223
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
224
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
225
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
226
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
227
	/// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0)
228
	/// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
229
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
230
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
231
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
232
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
233
	/// The range of component `m` is `[4, 100]`.
234
	/// The range of component `p` is `[1, 100]`.
235
	fn close_disapproved(m: u32, p: u32, ) -> Weight {
236
		// Proof Size summary in bytes:
237
		//  Measured:  `285 + m * (30 ±0) + p * (38 ±0)`
238
		//  Estimated: `3751 + m * (30 ±0) + p * (39 ±0)`
239
		// Minimum execution time: 24_000_000 picoseconds.
240
		Weight::from_parts(28_470_328, 3751)
241
			// Standard Error: 61_234
242
			.saturating_add(Weight::from_parts(217_171, 0).saturating_mul(p.into()))
243
			.saturating_add(T::DbWeight::get().reads(4_u64))
244
			.saturating_add(T::DbWeight::get().writes(3_u64))
245
			.saturating_add(Weight::from_parts(0, 30).saturating_mul(m.into()))
246
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into()))
247
	}
248
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
249
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
250
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
251
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
252
	/// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0)
253
	/// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
254
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
255
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
256
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
257
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
258
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
259
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
260
	/// The range of component `b` is `[2, 1024]`.
261
	/// The range of component `m` is `[4, 100]`.
262
	/// The range of component `p` is `[1, 100]`.
263
	fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
264
		// Proof Size summary in bytes:
265
		//  Measured:  `503 + m * (40 ±0) + p * (44 ±0)`
266
		//  Estimated: `3968 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)`
267
		// Minimum execution time: 32_000_000 picoseconds.
268
		Weight::from_parts(54_476_491, 3968)
269
			// Standard Error: 18_373
270
			.saturating_add(Weight::from_parts(17_361, 0).saturating_mul(m.into()))
271
			// Standard Error: 17_816
272
			.saturating_add(Weight::from_parts(168_350, 0).saturating_mul(p.into()))
273
			.saturating_add(T::DbWeight::get().reads(6_u64))
274
			.saturating_add(T::DbWeight::get().writes(3_u64))
275
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
276
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
277
			.saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into()))
278
	}
279
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
280
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
281
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1)
282
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
283
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
284
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
285
	/// The range of component `p` is `[1, 100]`.
286
	fn disapprove_proposal(_p: u32, ) -> Weight {
287
		// Proof Size summary in bytes:
288
		//  Measured:  `258 + p * (32 ±0)`
289
		//  Estimated: `4946`
290
		// Minimum execution time: 11_000_000 picoseconds.
291
		Weight::from_parts(22_000_000, 4946)
292
			.saturating_add(T::DbWeight::get().reads(1_u64))
293
			.saturating_add(T::DbWeight::get().writes(3_u64))
294
	}
295
}