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/moonbase-runtime/moonbase_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/moonbase/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: `1618 + m * (1268 ±467) + p * (1248 ±467)`
70
9
		// Minimum execution time: 13_000_000 picoseconds.
71
9
		Weight::from_parts(13_000_000, 1618)
72
9
			// Standard Error: 1_627_307
73
9
			.saturating_add(Weight::from_parts(4_763_846, 0).saturating_mul(m.into()))
74
9
			// Standard Error: 1_627_307
75
9
			.saturating_add(Weight::from_parts(4_753_846, 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, 1268).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:  `175 + m * (20 ±0)`
94
		//  Estimated: `1661 + m * (20 ±0)`
95
		// Minimum execution time: 13_000_000 picoseconds.
96
		Weight::from_parts(17_503_755, 1661)
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:  `175 + m * (20 ±0)`
113
		//  Estimated: `3641 + m * (20 ±0)`
114
		// Minimum execution time: 14_000_000 picoseconds.
115
		Weight::from_parts(13_989_898, 3641)
116
			// Standard Error: 0
117
			.saturating_add(Weight::from_parts(10_101, 0).saturating_mul(m.into()))
118
			.saturating_add(T::DbWeight::get().reads(3_u64))
119
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
120
	}
121
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
122
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
124
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
125
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
126
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
127
	/// Storage: `OpenTechCommitteeCollective::ProposalCount` (r:1 w:1)
128
	/// Proof: `OpenTechCommitteeCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
129
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1)
130
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	/// The range of component `b` is `[2, 1024]`.
132
	/// The range of component `m` is `[2, 100]`.
133
	/// The range of component `p` is `[1, 100]`.
134
	fn propose_proposed(_b: u32, m: u32, p: u32, ) -> Weight {
135
		// Proof Size summary in bytes:
136
		//  Measured:  `70 + m * (20 ±0) + p * (39 ±0)`
137
		//  Estimated: `3535 + m * (20 ±0) + p * (39 ±0)`
138
		// Minimum execution time: 17_000_000 picoseconds.
139
		Weight::from_parts(18_519_580, 3535)
140
			// Standard Error: 6_802
141
			.saturating_add(Weight::from_parts(6_802, 0).saturating_mul(m.into()))
142
			// Standard Error: 6_734
143
			.saturating_add(Weight::from_parts(138_047, 0).saturating_mul(p.into()))
144
			.saturating_add(T::DbWeight::get().reads(4_u64))
145
			.saturating_add(T::DbWeight::get().writes(4_u64))
146
			.saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into()))
147
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into()))
148
	}
149
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
150
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
151
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
152
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
153
	/// The range of component `m` is `[5, 100]`.
154
	fn vote(_m: u32, ) -> Weight {
155
		// Proof Size summary in bytes:
156
		//  Measured:  `898 + m * (40 ±0)`
157
		//  Estimated: `8366`
158
		// Minimum execution time: 16_000_000 picoseconds.
159
		Weight::from_parts(18_000_000, 8366)
160
			.saturating_add(T::DbWeight::get().reads(2_u64))
161
			.saturating_add(T::DbWeight::get().writes(1_u64))
162
	}
163
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
164
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
165
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
166
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
167
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
168
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
169
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
170
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
171
	/// The range of component `m` is `[4, 100]`.
172
	/// The range of component `p` is `[1, 100]`.
173
	fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
174
		// Proof Size summary in bytes:
175
		//  Measured:  `260 + m * (40 ±0) + p * (38 ±0)`
176
		//  Estimated: `3725 + m * (40 ±0) + p * (39 ±0)`
177
		// Minimum execution time: 17_000_000 picoseconds.
178
		Weight::from_parts(16_848_484, 3725)
179
			// Standard Error: 0
180
			.saturating_add(Weight::from_parts(151_515, 0).saturating_mul(p.into()))
181
			.saturating_add(T::DbWeight::get().reads(3_u64))
182
			.saturating_add(T::DbWeight::get().writes(3_u64))
183
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
184
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into()))
185
	}
186
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
187
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
188
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
189
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
190
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
191
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
192
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
193
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
194
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
195
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
196
	/// The range of component `b` is `[2, 1024]`.
197
	/// The range of component `m` is `[4, 100]`.
198
	/// The range of component `p` is `[1, 100]`.
199
	fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
200
		// Proof Size summary in bytes:
201
		//  Measured:  `517 + m * (40 ±0) + p * (44 ±0)`
202
		//  Estimated: `3982 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)`
203
		// Minimum execution time: 30_000_000 picoseconds.
204
		Weight::from_parts(25_394_044, 3982)
205
			// Standard Error: 3_261
206
			.saturating_add(Weight::from_parts(1_630, 0).saturating_mul(b.into()))
207
			// Standard Error: 34_722
208
			.saturating_add(Weight::from_parts(27_777, 0).saturating_mul(m.into()))
209
			// Standard Error: 33_670
210
			.saturating_add(Weight::from_parts(158_249, 0).saturating_mul(p.into()))
211
			.saturating_add(T::DbWeight::get().reads(5_u64))
212
			.saturating_add(T::DbWeight::get().writes(3_u64))
213
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
214
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
215
			.saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into()))
216
	}
217
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
218
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
219
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
220
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
221
	/// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0)
222
	/// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
223
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
224
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
225
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
226
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
227
	/// The range of component `m` is `[4, 100]`.
228
	/// The range of component `p` is `[1, 100]`.
229
	fn close_disapproved(m: u32, p: u32, ) -> Weight {
230
		// Proof Size summary in bytes:
231
		//  Measured:  `318 + m * (30 ±0) + p * (38 ±0)`
232
		//  Estimated: `3784 + m * (30 ±0) + p * (39 ±0)`
233
		// Minimum execution time: 22_000_000 picoseconds.
234
		Weight::from_parts(21_878_787, 3784)
235
			// Standard Error: 0
236
			.saturating_add(Weight::from_parts(121_212, 0).saturating_mul(p.into()))
237
			.saturating_add(T::DbWeight::get().reads(4_u64))
238
			.saturating_add(T::DbWeight::get().writes(3_u64))
239
			.saturating_add(Weight::from_parts(0, 30).saturating_mul(m.into()))
240
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into()))
241
	}
242
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1)
243
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
244
	/// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0)
245
	/// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
246
	/// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0)
247
	/// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
248
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1)
249
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
250
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
251
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
252
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
253
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
254
	/// The range of component `b` is `[2, 1024]`.
255
	/// The range of component `m` is `[4, 100]`.
256
	/// The range of component `p` is `[1, 100]`.
257
	fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
258
		// Proof Size summary in bytes:
259
		//  Measured:  `536 + m * (40 ±0) + p * (44 ±0)`
260
		//  Estimated: `4001 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)`
261
		// Minimum execution time: 31_000_000 picoseconds.
262
		Weight::from_parts(31_493_350, 4001)
263
			// Standard Error: 13_888
264
			.saturating_add(Weight::from_parts(6_944, 0).saturating_mul(m.into()))
265
			// Standard Error: 13_468
266
			.saturating_add(Weight::from_parts(148_148, 0).saturating_mul(p.into()))
267
			.saturating_add(T::DbWeight::get().reads(6_u64))
268
			.saturating_add(T::DbWeight::get().writes(3_u64))
269
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
270
			.saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into()))
271
			.saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into()))
272
	}
273
	/// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1)
274
	/// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
275
	/// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1)
276
	/// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
277
	/// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1)
278
	/// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
279
	/// The range of component `p` is `[1, 100]`.
280
	fn disapprove_proposal(_p: u32, ) -> Weight {
281
		// Proof Size summary in bytes:
282
		//  Measured:  `291 + p * (32 ±0)`
283
		//  Estimated: `4979`
284
		// Minimum execution time: 10_000_000 picoseconds.
285
		Weight::from_parts(21_000_000, 4979)
286
			.saturating_add(T::DbWeight::get().reads(1_u64))
287
			.saturating_add(T::DbWeight::get().writes(3_u64))
288
	}
289
}