pallet_schemas/
weights.rs

1
2//! Autogenerated weights for `pallet_schemas`
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
5//! DATE: 2025-12-10, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `ip-10-173-5-194`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
8//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
9
10// Executed Command:
11// ./scripts/../target/release/frequency
12// benchmark
13// pallet
14// --pallet=pallet_schemas
15// --extrinsic
16// *
17// --heap-pages=4096
18// --steps=20
19// --repeat=10
20// --output=./scripts/../pallets/schemas/src/weights.rs
21// --template=./scripts/../.maintain/frame-weight-template.hbs
22// --additional-trie-layers=3
23// --runtime=./scripts/../target/release/wbuild/frequency-runtime/frequency_runtime.wasm
24// --genesis-builder=runtime
25
26#![cfg_attr(rustfmt, rustfmt_skip)]
27#![allow(unused_parens)]
28#![allow(unused_imports)]
29#![allow(missing_docs)]
30
31use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
32use core::marker::PhantomData;
33
34/// Weight functions needed for `pallet_schemas`.
35pub trait WeightInfo {
36	fn create_schema_v4(m: u32, ) -> Weight;
37	fn set_max_schema_model_bytes() -> Weight;
38	fn create_schema_via_governance_v3(m: u32, ) -> Weight;
39	fn propose_to_create_schema_v3() -> Weight;
40	fn create_intent(m: u32, ) -> Weight;
41	fn create_intent_via_governance(m: u32, ) -> Weight;
42	fn propose_to_create_intent() -> Weight;
43	fn create_intent_group(m: u32, ) -> Weight;
44	fn create_intent_group_via_governance(m: u32, ) -> Weight;
45	fn propose_to_create_intent_group() -> Weight;
46	fn update_intent_group(m: u32, ) -> Weight;
47	fn update_intent_group_via_governance(m: u32, ) -> Weight;
48	fn propose_to_update_intent_group() -> Weight;
49}
50
51/// Weights for `pallet_schemas` using the Substrate node and recommended hardware.
52pub struct SubstrateWeight<T>(PhantomData<T>);
53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
54	/// Storage: `Schemas::GovernanceSchemaModelMaxBytes` (r:1 w:0)
55	/// Proof: `Schemas::GovernanceSchemaModelMaxBytes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56	/// Storage: `Schemas::IntentInfos` (r:1 w:0)
57	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
58	/// Storage: `Schemas::CurrentSchemaIdentifierMaximum` (r:1 w:1)
59	/// Proof: `Schemas::CurrentSchemaIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
60	/// Storage: `Schemas::SchemaInfos` (r:0 w:1)
61	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
62	/// Storage: `Schemas::SchemaPayloads` (r:0 w:1)
63	/// Proof: `Schemas::SchemaPayloads` (`max_values`: None, `max_size`: Some(65514), added: 67989, mode: `MaxEncodedLen`)
64	/// The range of component `m` is `[16, 65499]`.
65	fn create_schema_v4(m: u32, ) -> Weight {
66		// Proof Size summary in bytes:
67		//  Measured:  `480`
68		//  Estimated: `3973`
69		// Minimum execution time: 25_733_000 picoseconds.
70		Weight::from_parts(15_859_654, 3973)
71			// Standard Error: 67
72			.saturating_add(Weight::from_parts(34_692, 0).saturating_mul(m.into()))
73			.saturating_add(T::DbWeight::get().reads(3_u64))
74			.saturating_add(T::DbWeight::get().writes(3_u64))
75	}
76	/// Storage: `Schemas::GovernanceSchemaModelMaxBytes` (r:0 w:1)
77	/// Proof: `Schemas::GovernanceSchemaModelMaxBytes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
78	fn set_max_schema_model_bytes() -> Weight {
79		// Proof Size summary in bytes:
80		//  Measured:  `0`
81		//  Estimated: `0`
82		// Minimum execution time: 5_599_000 picoseconds.
83		Weight::from_parts(5_749_000, 0)
84			.saturating_add(T::DbWeight::get().writes(1_u64))
85	}
86	/// Storage: `Schemas::GovernanceSchemaModelMaxBytes` (r:1 w:0)
87	/// Proof: `Schemas::GovernanceSchemaModelMaxBytes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
88	/// Storage: `Schemas::IntentInfos` (r:1 w:0)
89	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
90	/// Storage: `Schemas::CurrentSchemaIdentifierMaximum` (r:1 w:1)
91	/// Proof: `Schemas::CurrentSchemaIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
92	/// Storage: `Schemas::SchemaInfos` (r:0 w:1)
93	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
94	/// Storage: `Schemas::SchemaPayloads` (r:0 w:1)
95	/// Proof: `Schemas::SchemaPayloads` (`max_values`: None, `max_size`: Some(65514), added: 67989, mode: `MaxEncodedLen`)
96	/// The range of component `m` is `[16, 65499]`.
97	fn create_schema_via_governance_v3(m: u32, ) -> Weight {
98		// Proof Size summary in bytes:
99		//  Measured:  `480`
100		//  Estimated: `3973`
101		// Minimum execution time: 25_211_000 picoseconds.
102		Weight::from_parts(9_705_100, 3973)
103			// Standard Error: 71
104			.saturating_add(Weight::from_parts(34_640, 0).saturating_mul(m.into()))
105			.saturating_add(T::DbWeight::get().reads(3_u64))
106			.saturating_add(T::DbWeight::get().writes(3_u64))
107	}
108	/// Storage: `Council::Members` (r:1 w:0)
109	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
110	/// Storage: `Council::ProposalOf` (r:1 w:1)
111	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
112	/// Storage: `Council::Proposals` (r:1 w:1)
113	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
114	/// Storage: `Council::ProposalCount` (r:1 w:1)
115	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
116	/// Storage: `Council::Voting` (r:0 w:1)
117	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
118	fn propose_to_create_schema_v3() -> Weight {
119		// Proof Size summary in bytes:
120		//  Measured:  `166`
121		//  Estimated: `4126`
122		// Minimum execution time: 203_866_000 picoseconds.
123		Weight::from_parts(208_558_000, 4126)
124			.saturating_add(T::DbWeight::get().reads(4_u64))
125			.saturating_add(T::DbWeight::get().writes(4_u64))
126	}
127	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
128	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
129	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:1)
130	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
131	/// Storage: `Schemas::IntentInfos` (r:0 w:1)
132	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
133	/// The range of component `m` is `[0, 2]`.
134	fn create_intent(m: u32, ) -> Weight {
135		// Proof Size summary in bytes:
136		//  Measured:  `267`
137		//  Estimated: `4055`
138		// Minimum execution time: 23_475_000 picoseconds.
139		Weight::from_parts(24_882_521, 4055)
140			// Standard Error: 84_224
141			.saturating_add(Weight::from_parts(299_411, 0).saturating_mul(m.into()))
142			.saturating_add(T::DbWeight::get().reads(2_u64))
143			.saturating_add(T::DbWeight::get().writes(3_u64))
144	}
145	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
146	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
147	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:1)
148	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
149	/// Storage: `Schemas::IntentInfos` (r:0 w:1)
150	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
151	/// The range of component `m` is `[0, 2]`.
152	fn create_intent_via_governance(m: u32, ) -> Weight {
153		// Proof Size summary in bytes:
154		//  Measured:  `267`
155		//  Estimated: `4055`
156		// Minimum execution time: 23_534_000 picoseconds.
157		Weight::from_parts(24_945_858, 4055)
158			// Standard Error: 99_088
159			.saturating_add(Weight::from_parts(194_646, 0).saturating_mul(m.into()))
160			.saturating_add(T::DbWeight::get().reads(2_u64))
161			.saturating_add(T::DbWeight::get().writes(3_u64))
162	}
163	/// Storage: `Council::Members` (r:1 w:0)
164	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
165	/// Storage: `Council::ProposalOf` (r:1 w:1)
166	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
167	/// Storage: `Council::Proposals` (r:1 w:1)
168	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
169	/// Storage: `Council::ProposalCount` (r:1 w:1)
170	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
171	/// Storage: `Council::Voting` (r:0 w:1)
172	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
173	fn propose_to_create_intent() -> Weight {
174		// Proof Size summary in bytes:
175		//  Measured:  `166`
176		//  Estimated: `4126`
177		// Minimum execution time: 21_771_000 picoseconds.
178		Weight::from_parts(22_425_000, 4126)
179			.saturating_add(T::DbWeight::get().reads(4_u64))
180			.saturating_add(T::DbWeight::get().writes(4_u64))
181	}
182	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
183	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
184	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
185	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
186	/// Storage: `Schemas::CurrentIntentGroupIdentifierMaximum` (r:1 w:1)
187	/// Proof: `Schemas::CurrentIntentGroupIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
188	/// Storage: `Schemas::IntentGroups` (r:0 w:1)
189	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
190	/// The range of component `m` is `[0, 10]`.
191	fn create_intent_group(m: u32, ) -> Weight {
192		// Proof Size summary in bytes:
193		//  Measured:  `284 + m * (22 ±0)`
194		//  Estimated: `4055`
195		// Minimum execution time: 24_502_000 picoseconds.
196		Weight::from_parts(26_122_599, 4055)
197			// Standard Error: 20_157
198			.saturating_add(Weight::from_parts(513_963, 0).saturating_mul(m.into()))
199			.saturating_add(T::DbWeight::get().reads(3_u64))
200			.saturating_add(T::DbWeight::get().writes(3_u64))
201	}
202	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
203	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
204	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
205	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
206	/// Storage: `Schemas::CurrentIntentGroupIdentifierMaximum` (r:1 w:1)
207	/// Proof: `Schemas::CurrentIntentGroupIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
208	/// Storage: `Schemas::IntentGroups` (r:0 w:1)
209	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
210	/// The range of component `m` is `[0, 2]`.
211	fn create_intent_group_via_governance(m: u32, ) -> Weight {
212		// Proof Size summary in bytes:
213		//  Measured:  `267 + m * (47 ±0)`
214		//  Estimated: `4055`
215		// Minimum execution time: 23_967_000 picoseconds.
216		Weight::from_parts(25_261_730, 4055)
217			// Standard Error: 61_443
218			.saturating_add(Weight::from_parts(1_264_594, 0).saturating_mul(m.into()))
219			.saturating_add(T::DbWeight::get().reads(3_u64))
220			.saturating_add(T::DbWeight::get().writes(3_u64))
221	}
222	/// Storage: `Council::Members` (r:1 w:0)
223	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
224	/// Storage: `Council::ProposalOf` (r:1 w:1)
225	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
226	/// Storage: `Council::Proposals` (r:1 w:1)
227	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
228	/// Storage: `Council::ProposalCount` (r:1 w:1)
229	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
230	/// Storage: `Council::Voting` (r:0 w:1)
231	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
232	fn propose_to_create_intent_group() -> Weight {
233		// Proof Size summary in bytes:
234		//  Measured:  `166`
235		//  Estimated: `4126`
236		// Minimum execution time: 21_658_000 picoseconds.
237		Weight::from_parts(22_419_000, 4126)
238			.saturating_add(T::DbWeight::get().reads(4_u64))
239			.saturating_add(T::DbWeight::get().writes(4_u64))
240	}
241	/// Storage: `Schemas::IntentGroups` (r:1 w:1)
242	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
243	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
244	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
245	/// The range of component `m` is `[0, 10]`.
246	fn update_intent_group(m: u32, ) -> Weight {
247		// Proof Size summary in bytes:
248		//  Measured:  `182`
249		//  Estimated: `3991`
250		// Minimum execution time: 13_750_000 picoseconds.
251		Weight::from_parts(14_739_083, 3991)
252			// Standard Error: 8_980
253			.saturating_add(Weight::from_parts(26_859, 0).saturating_mul(m.into()))
254			.saturating_add(T::DbWeight::get().reads(2_u64))
255			.saturating_add(T::DbWeight::get().writes(1_u64))
256	}
257	/// Storage: `Schemas::IntentGroups` (r:1 w:1)
258	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
259	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
260	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
261	/// The range of component `m` is `[0, 2]`.
262	fn update_intent_group_via_governance(m: u32, ) -> Weight {
263		// Proof Size summary in bytes:
264		//  Measured:  `182`
265		//  Estimated: `3991`
266		// Minimum execution time: 13_717_000 picoseconds.
267		Weight::from_parts(14_678_189, 3991)
268			// Standard Error: 41_194
269			.saturating_add(Weight::from_parts(63_028, 0).saturating_mul(m.into()))
270			.saturating_add(T::DbWeight::get().reads(2_u64))
271			.saturating_add(T::DbWeight::get().writes(1_u64))
272	}
273	/// Storage: `Council::Members` (r:1 w:0)
274	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
275	/// Storage: `Council::ProposalOf` (r:1 w:1)
276	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
277	/// Storage: `Council::Proposals` (r:1 w:1)
278	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
279	/// Storage: `Council::ProposalCount` (r:1 w:1)
280	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
281	/// Storage: `Council::Voting` (r:0 w:1)
282	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
283	fn propose_to_update_intent_group() -> Weight {
284		// Proof Size summary in bytes:
285		//  Measured:  `166`
286		//  Estimated: `4126`
287		// Minimum execution time: 21_537_000 picoseconds.
288		Weight::from_parts(22_440_000, 4126)
289			.saturating_add(T::DbWeight::get().reads(4_u64))
290			.saturating_add(T::DbWeight::get().writes(4_u64))
291	}
292}
293
294// For backwards compatibility and tests.
295impl WeightInfo for () {
296	/// Storage: `Schemas::GovernanceSchemaModelMaxBytes` (r:1 w:0)
297	/// Proof: `Schemas::GovernanceSchemaModelMaxBytes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
298	/// Storage: `Schemas::IntentInfos` (r:1 w:0)
299	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
300	/// Storage: `Schemas::CurrentSchemaIdentifierMaximum` (r:1 w:1)
301	/// Proof: `Schemas::CurrentSchemaIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
302	/// Storage: `Schemas::SchemaInfos` (r:0 w:1)
303	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
304	/// Storage: `Schemas::SchemaPayloads` (r:0 w:1)
305	/// Proof: `Schemas::SchemaPayloads` (`max_values`: None, `max_size`: Some(65514), added: 67989, mode: `MaxEncodedLen`)
306	/// The range of component `m` is `[16, 65499]`.
307	fn create_schema_v4(m: u32, ) -> Weight {
308		// Proof Size summary in bytes:
309		//  Measured:  `480`
310		//  Estimated: `3973`
311		// Minimum execution time: 25_733_000 picoseconds.
312		Weight::from_parts(15_859_654, 3973)
313			// Standard Error: 67
314			.saturating_add(Weight::from_parts(34_692, 0).saturating_mul(m.into()))
315			.saturating_add(RocksDbWeight::get().reads(3_u64))
316			.saturating_add(RocksDbWeight::get().writes(3_u64))
317	}
318	/// Storage: `Schemas::GovernanceSchemaModelMaxBytes` (r:0 w:1)
319	/// Proof: `Schemas::GovernanceSchemaModelMaxBytes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
320	fn set_max_schema_model_bytes() -> Weight {
321		// Proof Size summary in bytes:
322		//  Measured:  `0`
323		//  Estimated: `0`
324		// Minimum execution time: 5_599_000 picoseconds.
325		Weight::from_parts(5_749_000, 0)
326			.saturating_add(RocksDbWeight::get().writes(1_u64))
327	}
328	/// Storage: `Schemas::GovernanceSchemaModelMaxBytes` (r:1 w:0)
329	/// Proof: `Schemas::GovernanceSchemaModelMaxBytes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
330	/// Storage: `Schemas::IntentInfos` (r:1 w:0)
331	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
332	/// Storage: `Schemas::CurrentSchemaIdentifierMaximum` (r:1 w:1)
333	/// Proof: `Schemas::CurrentSchemaIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
334	/// Storage: `Schemas::SchemaInfos` (r:0 w:1)
335	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
336	/// Storage: `Schemas::SchemaPayloads` (r:0 w:1)
337	/// Proof: `Schemas::SchemaPayloads` (`max_values`: None, `max_size`: Some(65514), added: 67989, mode: `MaxEncodedLen`)
338	/// The range of component `m` is `[16, 65499]`.
339	fn create_schema_via_governance_v3(m: u32, ) -> Weight {
340		// Proof Size summary in bytes:
341		//  Measured:  `480`
342		//  Estimated: `3973`
343		// Minimum execution time: 25_211_000 picoseconds.
344		Weight::from_parts(9_705_100, 3973)
345			// Standard Error: 71
346			.saturating_add(Weight::from_parts(34_640, 0).saturating_mul(m.into()))
347			.saturating_add(RocksDbWeight::get().reads(3_u64))
348			.saturating_add(RocksDbWeight::get().writes(3_u64))
349	}
350	/// Storage: `Council::Members` (r:1 w:0)
351	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
352	/// Storage: `Council::ProposalOf` (r:1 w:1)
353	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
354	/// Storage: `Council::Proposals` (r:1 w:1)
355	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
356	/// Storage: `Council::ProposalCount` (r:1 w:1)
357	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
358	/// Storage: `Council::Voting` (r:0 w:1)
359	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
360	fn propose_to_create_schema_v3() -> Weight {
361		// Proof Size summary in bytes:
362		//  Measured:  `166`
363		//  Estimated: `4126`
364		// Minimum execution time: 203_866_000 picoseconds.
365		Weight::from_parts(208_558_000, 4126)
366			.saturating_add(RocksDbWeight::get().reads(4_u64))
367			.saturating_add(RocksDbWeight::get().writes(4_u64))
368	}
369	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
370	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
371	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:1)
372	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
373	/// Storage: `Schemas::IntentInfos` (r:0 w:1)
374	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
375	/// The range of component `m` is `[0, 2]`.
376	fn create_intent(m: u32, ) -> Weight {
377		// Proof Size summary in bytes:
378		//  Measured:  `267`
379		//  Estimated: `4055`
380		// Minimum execution time: 23_475_000 picoseconds.
381		Weight::from_parts(24_882_521, 4055)
382			// Standard Error: 84_224
383			.saturating_add(Weight::from_parts(299_411, 0).saturating_mul(m.into()))
384			.saturating_add(RocksDbWeight::get().reads(2_u64))
385			.saturating_add(RocksDbWeight::get().writes(3_u64))
386	}
387	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
388	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
389	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:1)
390	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
391	/// Storage: `Schemas::IntentInfos` (r:0 w:1)
392	/// Proof: `Schemas::IntentInfos` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `MaxEncodedLen`)
393	/// The range of component `m` is `[0, 2]`.
394	fn create_intent_via_governance(m: u32, ) -> Weight {
395		// Proof Size summary in bytes:
396		//  Measured:  `267`
397		//  Estimated: `4055`
398		// Minimum execution time: 23_534_000 picoseconds.
399		Weight::from_parts(24_945_858, 4055)
400			// Standard Error: 99_088
401			.saturating_add(Weight::from_parts(194_646, 0).saturating_mul(m.into()))
402			.saturating_add(RocksDbWeight::get().reads(2_u64))
403			.saturating_add(RocksDbWeight::get().writes(3_u64))
404	}
405	/// Storage: `Council::Members` (r:1 w:0)
406	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
407	/// Storage: `Council::ProposalOf` (r:1 w:1)
408	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
409	/// Storage: `Council::Proposals` (r:1 w:1)
410	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
411	/// Storage: `Council::ProposalCount` (r:1 w:1)
412	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
413	/// Storage: `Council::Voting` (r:0 w:1)
414	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
415	fn propose_to_create_intent() -> Weight {
416		// Proof Size summary in bytes:
417		//  Measured:  `166`
418		//  Estimated: `4126`
419		// Minimum execution time: 21_771_000 picoseconds.
420		Weight::from_parts(22_425_000, 4126)
421			.saturating_add(RocksDbWeight::get().reads(4_u64))
422			.saturating_add(RocksDbWeight::get().writes(4_u64))
423	}
424	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
425	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
426	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
427	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
428	/// Storage: `Schemas::CurrentIntentGroupIdentifierMaximum` (r:1 w:1)
429	/// Proof: `Schemas::CurrentIntentGroupIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
430	/// Storage: `Schemas::IntentGroups` (r:0 w:1)
431	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
432	/// The range of component `m` is `[0, 10]`.
433	fn create_intent_group(m: u32, ) -> Weight {
434		// Proof Size summary in bytes:
435		//  Measured:  `284 + m * (22 ±0)`
436		//  Estimated: `4055`
437		// Minimum execution time: 24_502_000 picoseconds.
438		Weight::from_parts(26_122_599, 4055)
439			// Standard Error: 20_157
440			.saturating_add(Weight::from_parts(513_963, 0).saturating_mul(m.into()))
441			.saturating_add(RocksDbWeight::get().reads(3_u64))
442			.saturating_add(RocksDbWeight::get().writes(3_u64))
443	}
444	/// Storage: `Schemas::NameToMappedEntityIds` (r:1 w:1)
445	/// Proof: `Schemas::NameToMappedEntityIds` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`)
446	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
447	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
448	/// Storage: `Schemas::CurrentIntentGroupIdentifierMaximum` (r:1 w:1)
449	/// Proof: `Schemas::CurrentIntentGroupIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
450	/// Storage: `Schemas::IntentGroups` (r:0 w:1)
451	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
452	/// The range of component `m` is `[0, 2]`.
453	fn create_intent_group_via_governance(m: u32, ) -> Weight {
454		// Proof Size summary in bytes:
455		//  Measured:  `267 + m * (47 ±0)`
456		//  Estimated: `4055`
457		// Minimum execution time: 23_967_000 picoseconds.
458		Weight::from_parts(25_261_730, 4055)
459			// Standard Error: 61_443
460			.saturating_add(Weight::from_parts(1_264_594, 0).saturating_mul(m.into()))
461			.saturating_add(RocksDbWeight::get().reads(3_u64))
462			.saturating_add(RocksDbWeight::get().writes(3_u64))
463	}
464	/// Storage: `Council::Members` (r:1 w:0)
465	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
466	/// Storage: `Council::ProposalOf` (r:1 w:1)
467	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
468	/// Storage: `Council::Proposals` (r:1 w:1)
469	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
470	/// Storage: `Council::ProposalCount` (r:1 w:1)
471	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
472	/// Storage: `Council::Voting` (r:0 w:1)
473	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
474	fn propose_to_create_intent_group() -> Weight {
475		// Proof Size summary in bytes:
476		//  Measured:  `166`
477		//  Estimated: `4126`
478		// Minimum execution time: 21_658_000 picoseconds.
479		Weight::from_parts(22_419_000, 4126)
480			.saturating_add(RocksDbWeight::get().reads(4_u64))
481			.saturating_add(RocksDbWeight::get().writes(4_u64))
482	}
483	/// Storage: `Schemas::IntentGroups` (r:1 w:1)
484	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
485	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
486	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
487	/// The range of component `m` is `[0, 10]`.
488	fn update_intent_group(m: u32, ) -> Weight {
489		// Proof Size summary in bytes:
490		//  Measured:  `182`
491		//  Estimated: `3991`
492		// Minimum execution time: 13_750_000 picoseconds.
493		Weight::from_parts(14_739_083, 3991)
494			// Standard Error: 8_980
495			.saturating_add(Weight::from_parts(26_859, 0).saturating_mul(m.into()))
496			.saturating_add(RocksDbWeight::get().reads(2_u64))
497			.saturating_add(RocksDbWeight::get().writes(1_u64))
498	}
499	/// Storage: `Schemas::IntentGroups` (r:1 w:1)
500	/// Proof: `Schemas::IntentGroups` (`max_values`: None, `max_size`: Some(31), added: 2506, mode: `MaxEncodedLen`)
501	/// Storage: `Schemas::CurrentIntentIdentifierMaximum` (r:1 w:0)
502	/// Proof: `Schemas::CurrentIntentIdentifierMaximum` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
503	/// The range of component `m` is `[0, 2]`.
504	fn update_intent_group_via_governance(m: u32, ) -> Weight {
505		// Proof Size summary in bytes:
506		//  Measured:  `182`
507		//  Estimated: `3991`
508		// Minimum execution time: 13_717_000 picoseconds.
509		Weight::from_parts(14_678_189, 3991)
510			// Standard Error: 41_194
511			.saturating_add(Weight::from_parts(63_028, 0).saturating_mul(m.into()))
512			.saturating_add(RocksDbWeight::get().reads(2_u64))
513			.saturating_add(RocksDbWeight::get().writes(1_u64))
514	}
515	/// Storage: `Council::Members` (r:1 w:0)
516	/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
517	/// Storage: `Council::ProposalOf` (r:1 w:1)
518	/// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
519	/// Storage: `Council::Proposals` (r:1 w:1)
520	/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
521	/// Storage: `Council::ProposalCount` (r:1 w:1)
522	/// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
523	/// Storage: `Council::Voting` (r:0 w:1)
524	/// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
525	fn propose_to_update_intent_group() -> Weight {
526		// Proof Size summary in bytes:
527		//  Measured:  `166`
528		//  Estimated: `4126`
529		// Minimum execution time: 21_537_000 picoseconds.
530		Weight::from_parts(22_440_000, 4126)
531			.saturating_add(RocksDbWeight::get().reads(4_u64))
532			.saturating_add(RocksDbWeight::get().writes(4_u64))
533	}
534}
535
536
537#[cfg(test)]
538mod tests {
539  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
540  use common_runtime::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
541  use common_runtime::weights::extrinsic_weights::ExtrinsicBaseWeight;
542
543  #[allow(dead_code)]
544  struct BlockWeights;
545  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
546  	fn get() -> frame_system::limits::BlockWeights {
547  		frame_system::limits::BlockWeights::builder()
548  			.base_block(Weight::zero())
549  			.for_class(DispatchClass::all(), |weights| {
550  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
551  			})
552  			.for_class(DispatchClass::non_mandatory(), |weights| {
553  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
554  			})
555  			.build_or_panic()
556  	}
557  }
558
559	#[test]
560	fn test_create_schema_v4() {
561		assert!(
562			BlockWeights::get()
563				.per_class
564				.get(frame_support::dispatch::DispatchClass::Normal)
565				.max_extrinsic
566				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
567				.proof_size()
568				> 3973
569		);
570	}
571	#[test]
572	fn test_create_schema_via_governance_v3() {
573		assert!(
574			BlockWeights::get()
575				.per_class
576				.get(frame_support::dispatch::DispatchClass::Normal)
577				.max_extrinsic
578				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
579				.proof_size()
580				> 3973
581		);
582	}
583	#[test]
584	fn test_propose_to_create_schema_v3() {
585		assert!(
586			BlockWeights::get()
587				.per_class
588				.get(frame_support::dispatch::DispatchClass::Normal)
589				.max_extrinsic
590				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
591				.proof_size()
592				> 4126
593		);
594	}
595	#[test]
596	fn test_create_intent() {
597		assert!(
598			BlockWeights::get()
599				.per_class
600				.get(frame_support::dispatch::DispatchClass::Normal)
601				.max_extrinsic
602				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
603				.proof_size()
604				> 4055
605		);
606	}
607	#[test]
608	fn test_create_intent_via_governance() {
609		assert!(
610			BlockWeights::get()
611				.per_class
612				.get(frame_support::dispatch::DispatchClass::Normal)
613				.max_extrinsic
614				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
615				.proof_size()
616				> 4055
617		);
618	}
619	#[test]
620	fn test_propose_to_create_intent() {
621		assert!(
622			BlockWeights::get()
623				.per_class
624				.get(frame_support::dispatch::DispatchClass::Normal)
625				.max_extrinsic
626				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
627				.proof_size()
628				> 4126
629		);
630	}
631	#[test]
632	fn test_create_intent_group() {
633		assert!(
634			BlockWeights::get()
635				.per_class
636				.get(frame_support::dispatch::DispatchClass::Normal)
637				.max_extrinsic
638				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
639				.proof_size()
640				> 4055
641		);
642	}
643	#[test]
644	fn test_create_intent_group_via_governance() {
645		assert!(
646			BlockWeights::get()
647				.per_class
648				.get(frame_support::dispatch::DispatchClass::Normal)
649				.max_extrinsic
650				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
651				.proof_size()
652				> 4055
653		);
654	}
655	#[test]
656	fn test_propose_to_create_intent_group() {
657		assert!(
658			BlockWeights::get()
659				.per_class
660				.get(frame_support::dispatch::DispatchClass::Normal)
661				.max_extrinsic
662				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
663				.proof_size()
664				> 4126
665		);
666	}
667	#[test]
668	fn test_update_intent_group() {
669		assert!(
670			BlockWeights::get()
671				.per_class
672				.get(frame_support::dispatch::DispatchClass::Normal)
673				.max_extrinsic
674				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
675				.proof_size()
676				> 3991
677		);
678	}
679	#[test]
680	fn test_update_intent_group_via_governance() {
681		assert!(
682			BlockWeights::get()
683				.per_class
684				.get(frame_support::dispatch::DispatchClass::Normal)
685				.max_extrinsic
686				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
687				.proof_size()
688				> 3991
689		);
690	}
691	#[test]
692	fn test_propose_to_update_intent_group() {
693		assert!(
694			BlockWeights::get()
695				.per_class
696				.get(frame_support::dispatch::DispatchClass::Normal)
697				.max_extrinsic
698				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
699				.proof_size()
700				> 4126
701		);
702	}
703}