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/moonriver-runtime/moonriver_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/moonriver/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
9
	fn set_members(m: u32, _n: u32, p: u32, ) -> Weight {
67
9
		// Proof Size summary in bytes:
68
9
		//  Measured:  `0 + m * (2048 ±0) + p * (2027 ±0)`
69
9
		//  Estimated: `1585 + m * (65536 ±467) + p * (1248 ±467)`
70
9
		// Minimum execution time: 13_000_000 picoseconds.
71
9
		Weight::from_parts(13_000_000, 1585)
72
9
			// Standard Error: 1_801_570
73
9
			.saturating_add(Weight::from_parts(4_481_538, 0).saturating_mul(m.into()))
74
9
			// Standard Error: 1_801_570
75
9
			.saturating_add(Weight::from_parts(4_451_538, 0).saturating_mul(p.into()))
76
9
			.saturating_add(T::DbWeight::get().reads(2_u64))
77
9
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
78
9
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
79
9
			.saturating_add(T::DbWeight::get().writes(2_u64))
80
9
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
81
9
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
82
9
			.saturating_add(Weight::from_parts(0, 65536).saturating_mul(m.into()))
83
9
			.saturating_add(Weight::from_parts(0, 1248).saturating_mul(p.into()))
84
9
	}
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(11_987_942, 1628)
97
			// Standard Error: 0
98
			.saturating_add(Weight::from_parts(978, 0).saturating_mul(b.into()))
99
			// Standard Error: 0
100
			.saturating_add(Weight::from_parts(10_101, 0).saturating_mul(m.into()))
101
			.saturating_add(T::DbWeight::get().reads(2_u64))
102
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
103
	}
104
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
105
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
106
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:0)
107
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
108
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
109
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
110
	/// The range of component `b` is `[2, 1024]`.
111
	/// The range of component `m` is `[1, 100]`.
112
	fn propose_execute(b: u32, m: u32, ) -> Weight {
113
		// Proof Size summary in bytes:
114
		//  Measured:  `142 + m * (20 ±0)`
115
		//  Estimated: `3608 + m * (20 ±0)`
116
		// Minimum execution time: 15_000_000 picoseconds.
117
		Weight::from_parts(12_975_884, 3608)
118
			// Standard Error: 0
119
			.saturating_add(Weight::from_parts(1_956, 0).saturating_mul(b.into()))
120
			// Standard Error: 0
121
			.saturating_add(Weight::from_parts(20_202, 0).saturating_mul(m.into()))
122
			.saturating_add(T::DbWeight::get().reads(3_u64))
123
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
124
	}
125
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
126
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
127
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
128
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
129
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
130
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
131
	/// Storage: `OpenTechCommitteeCollective::ProposalCount` (r:1 w:1)
132
	/// Proof: `OpenTechCommitteeCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
133
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1)
134
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
135
	/// The range of component `b` is `[2, 1024]`.
136
	/// The range of component `m` is `[2, 100]`.
137
	/// The range of component `p` is `[1, 100]`.
138
	fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
139
		// Proof Size summary in bytes:
140
		//  Measured:  `37 + m * (20 ±0) + p * (39 ±0)`
141
		//  Estimated: `3502 + m * (20 ±0) + p * (39 ±0)`
142
		// Minimum execution time: 16_000_000 picoseconds.
143
		Weight::from_parts(16_171_202, 3502)
144
			// Standard Error: 652
145
			.saturating_add(Weight::from_parts(326, 0).saturating_mul(b.into()))
146
			// Standard Error: 6_734
147
			.saturating_add(Weight::from_parts(175_084, 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: 18_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: 20_000_000 picoseconds.
182
		Weight::from_parts(19_342_803, 3692)
183
			// Standard Error: 9_021
184
			.saturating_add(Weight::from_parts(5_208, 0).saturating_mul(m.into()))
185
			// Standard Error: 8_747
186
			.saturating_add(Weight::from_parts(136_363, 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: 30_000_000 picoseconds.
210
		Weight::from_parts(37_824_430, 3949)
211
			// Standard Error: 0
212
			.saturating_add(Weight::from_parts(10_416, 0).saturating_mul(m.into()))
213
			// Standard Error: 0
214
			.saturating_add(Weight::from_parts(151_515, 0).saturating_mul(p.into()))
215
			.saturating_add(T::DbWeight::get().reads(5_u64))
216
			.saturating_add(T::DbWeight::get().writes(3_u64))
217
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
218
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
219
			.saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into()))
220
	}
221
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
222
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
223
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
224
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
225
	/// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0)
226
	/// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
227
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
228
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
229
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
230
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
231
	/// The range of component `m` is `[4, 100]`.
232
	/// The range of component `p` is `[1, 100]`.
233
	fn close_disapproved(m: u32, p: u32, ) -> Weight {
234
		// Proof Size summary in bytes:
235
		//  Measured:  `285 + m * (30 ±0) + p * (38 ±0)`
236
		//  Estimated: `3751 + m * (30 ±0) + p * (39 ±0)`
237
		// Minimum execution time: 22_000_000 picoseconds.
238
		Weight::from_parts(19_775_252, 3751)
239
			// Standard Error: 18_042
240
			.saturating_add(Weight::from_parts(20_833, 0).saturating_mul(m.into()))
241
			// Standard Error: 17_495
242
			.saturating_add(Weight::from_parts(141_414, 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: 31_000_000 picoseconds.
268
		Weight::from_parts(34_211_447, 3968)
269
			// Standard Error: 6_734
270
			.saturating_add(Weight::from_parts(154_882, 0).saturating_mul(p.into()))
271
			.saturating_add(T::DbWeight::get().reads(6_u64))
272
			.saturating_add(T::DbWeight::get().writes(3_u64))
273
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
274
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
275
			.saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into()))
276
	}
277
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
278
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
279
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1)
280
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
281
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
282
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
283
	/// The range of component `p` is `[1, 100]`.
284
	fn disapprove_proposal(_p: u32, ) -> Weight {
285
		// Proof Size summary in bytes:
286
		//  Measured:  `258 + p * (32 ±0)`
287
		//  Estimated: `4946`
288
		// Minimum execution time: 11_000_000 picoseconds.
289
		Weight::from_parts(22_000_000, 4946)
290
			.saturating_add(T::DbWeight::get().reads(1_u64))
291
			.saturating_add(T::DbWeight::get().writes(3_u64))
292
	}
293
}