pallet_stateful_storage/weights.rs
1
2//! Autogenerated weights for `pallet_stateful_storage`
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
5//! DATE: 2025-08-20, 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_stateful-storage
15// --extrinsic
16// *
17// --heap-pages=4096
18// --steps=20
19// --repeat=10
20// --output=./scripts/../pallets/stateful-storage/src/weights.rs
21// --template=./scripts/../.maintain/frame-weight-template.hbs
22// --additional-trie-layers=6
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_stateful_storage`.
35pub trait WeightInfo {
36 fn apply_item_actions_add(s: u32, ) -> Weight;
37 fn apply_item_actions_delete(n: u32, ) -> Weight;
38 fn upsert_page(s: u32, ) -> Weight;
39 fn delete_page() -> Weight;
40 fn apply_item_actions_with_signature_v2_add(s: u32, ) -> Weight;
41 fn apply_item_actions_with_signature_v2_delete(n: u32, ) -> Weight;
42 fn upsert_page_with_signature_v2(s: u32, ) -> Weight;
43 fn delete_page_with_signature_v2() -> Weight;
44}
45
46/// Weights for `pallet_stateful_storage` using the Substrate node and recommended hardware.
47pub struct SubstrateWeight<T>(PhantomData<T>);
48impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
49 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
50 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
51 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
52 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
53 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
54 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
55 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
56 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
57 /// The range of component `s` is `[1024, 5120]`.
58 fn apply_item_actions_add(s: u32, ) -> Weight {
59 // Proof Size summary in bytes:
60 // Measured: `527`
61 // Estimated: `5972`
62 // Minimum execution time: 37_820_000 picoseconds.
63 Weight::from_parts(36_983_687, 5972)
64 // Standard Error: 158
65 .saturating_add(Weight::from_parts(1_558, 0).saturating_mul(s.into()))
66 .saturating_add(T::DbWeight::get().reads(4_u64))
67 .saturating_add(T::DbWeight::get().writes(1_u64))
68 }
69 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
70 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
71 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
72 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
73 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
74 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
75 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
76 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
77 /// The range of component `n` is `[1, 5]`.
78 fn apply_item_actions_delete(_n: u32, ) -> Weight {
79 // Proof Size summary in bytes:
80 // Measured: `10905`
81 // Estimated: `16350`
82 // Minimum execution time: 51_540_000 picoseconds.
83 Weight::from_parts(56_958_088, 16350)
84 .saturating_add(T::DbWeight::get().reads(4_u64))
85 .saturating_add(T::DbWeight::get().writes(1_u64))
86 }
87 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
88 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
89 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
90 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
91 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
92 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
93 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
94 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
95 /// The range of component `s` is `[1, 1024]`.
96 fn upsert_page(s: u32, ) -> Weight {
97 // Proof Size summary in bytes:
98 // Measured: `1685`
99 // Estimated: `7130`
100 // Minimum execution time: 41_018_000 picoseconds.
101 Weight::from_parts(42_893_334, 7130)
102 // Standard Error: 215
103 .saturating_add(Weight::from_parts(312, 0).saturating_mul(s.into()))
104 .saturating_add(T::DbWeight::get().reads(4_u64))
105 .saturating_add(T::DbWeight::get().writes(1_u64))
106 }
107 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
108 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
109 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
110 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
111 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
112 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
113 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
114 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
115 fn delete_page() -> Weight {
116 // Proof Size summary in bytes:
117 // Measured: `1683`
118 // Estimated: `7128`
119 // Minimum execution time: 39_530_000 picoseconds.
120 Weight::from_parts(41_534_000, 7128)
121 .saturating_add(T::DbWeight::get().reads(4_u64))
122 .saturating_add(T::DbWeight::get().writes(1_u64))
123 }
124 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
125 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
126 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
127 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
128 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
129 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
130 /// The range of component `s` is `[1024, 5120]`.
131 fn apply_item_actions_with_signature_v2_add(s: u32, ) -> Weight {
132 // Proof Size summary in bytes:
133 // Measured: `534`
134 // Estimated: `5979`
135 // Minimum execution time: 128_273_000 picoseconds.
136 Weight::from_parts(117_914_493, 5979)
137 // Standard Error: 360
138 .saturating_add(Weight::from_parts(10_130, 0).saturating_mul(s.into()))
139 .saturating_add(T::DbWeight::get().reads(3_u64))
140 .saturating_add(T::DbWeight::get().writes(1_u64))
141 }
142 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
143 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
144 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
145 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
146 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
147 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
148 /// The range of component `n` is `[1, 5]`.
149 fn apply_item_actions_with_signature_v2_delete(_n: u32, ) -> Weight {
150 // Proof Size summary in bytes:
151 // Measured: `10912`
152 // Estimated: `16357`
153 // Minimum execution time: 132_796_000 picoseconds.
154 Weight::from_parts(140_332_940, 16357)
155 .saturating_add(T::DbWeight::get().reads(3_u64))
156 .saturating_add(T::DbWeight::get().writes(1_u64))
157 }
158 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
159 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
160 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
161 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
162 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
163 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
164 /// The range of component `s` is `[1, 1024]`.
165 fn upsert_page_with_signature_v2(s: u32, ) -> Weight {
166 // Proof Size summary in bytes:
167 // Measured: `1618`
168 // Estimated: `7063`
169 // Minimum execution time: 119_223_000 picoseconds.
170 Weight::from_parts(121_719_336, 7063)
171 // Standard Error: 754
172 .saturating_add(Weight::from_parts(12_461, 0).saturating_mul(s.into()))
173 .saturating_add(T::DbWeight::get().reads(3_u64))
174 .saturating_add(T::DbWeight::get().writes(1_u64))
175 }
176 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
177 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
178 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
179 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
180 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
181 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
182 fn delete_page_with_signature_v2() -> Weight {
183 // Proof Size summary in bytes:
184 // Measured: `1616`
185 // Estimated: `7061`
186 // Minimum execution time: 117_586_000 picoseconds.
187 Weight::from_parts(120_180_000, 7061)
188 .saturating_add(T::DbWeight::get().reads(3_u64))
189 .saturating_add(T::DbWeight::get().writes(1_u64))
190 }
191}
192
193// For backwards compatibility and tests.
194impl WeightInfo for () {
195 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
196 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
197 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
198 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
199 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
200 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
201 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
202 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
203 /// The range of component `s` is `[1024, 5120]`.
204 fn apply_item_actions_add(s: u32, ) -> Weight {
205 // Proof Size summary in bytes:
206 // Measured: `527`
207 // Estimated: `5972`
208 // Minimum execution time: 37_820_000 picoseconds.
209 Weight::from_parts(36_983_687, 5972)
210 // Standard Error: 158
211 .saturating_add(Weight::from_parts(1_558, 0).saturating_mul(s.into()))
212 .saturating_add(RocksDbWeight::get().reads(4_u64))
213 .saturating_add(RocksDbWeight::get().writes(1_u64))
214 }
215 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
216 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
217 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
218 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
219 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
220 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
221 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
222 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
223 /// The range of component `n` is `[1, 5]`.
224 fn apply_item_actions_delete(_n: u32, ) -> Weight {
225 // Proof Size summary in bytes:
226 // Measured: `10905`
227 // Estimated: `16350`
228 // Minimum execution time: 51_540_000 picoseconds.
229 Weight::from_parts(56_958_088, 16350)
230 .saturating_add(RocksDbWeight::get().reads(4_u64))
231 .saturating_add(RocksDbWeight::get().writes(1_u64))
232 }
233 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
234 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
235 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
236 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
237 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
238 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
239 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
240 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
241 /// The range of component `s` is `[1, 1024]`.
242 fn upsert_page(s: u32, ) -> Weight {
243 // Proof Size summary in bytes:
244 // Measured: `1685`
245 // Estimated: `7130`
246 // Minimum execution time: 41_018_000 picoseconds.
247 Weight::from_parts(42_893_334, 7130)
248 // Standard Error: 215
249 .saturating_add(Weight::from_parts(312, 0).saturating_mul(s.into()))
250 .saturating_add(RocksDbWeight::get().reads(4_u64))
251 .saturating_add(RocksDbWeight::get().writes(1_u64))
252 }
253 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
254 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
255 /// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
256 /// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
257 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
258 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
259 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
260 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
261 fn delete_page() -> Weight {
262 // Proof Size summary in bytes:
263 // Measured: `1683`
264 // Estimated: `7128`
265 // Minimum execution time: 39_530_000 picoseconds.
266 Weight::from_parts(41_534_000, 7128)
267 .saturating_add(RocksDbWeight::get().reads(4_u64))
268 .saturating_add(RocksDbWeight::get().writes(1_u64))
269 }
270 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
271 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
272 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
273 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
274 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
275 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
276 /// The range of component `s` is `[1024, 5120]`.
277 fn apply_item_actions_with_signature_v2_add(s: u32, ) -> Weight {
278 // Proof Size summary in bytes:
279 // Measured: `534`
280 // Estimated: `5979`
281 // Minimum execution time: 128_273_000 picoseconds.
282 Weight::from_parts(117_914_493, 5979)
283 // Standard Error: 360
284 .saturating_add(Weight::from_parts(10_130, 0).saturating_mul(s.into()))
285 .saturating_add(RocksDbWeight::get().reads(3_u64))
286 .saturating_add(RocksDbWeight::get().writes(1_u64))
287 }
288 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
289 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
290 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
291 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
292 /// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
293 /// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
294 /// The range of component `n` is `[1, 5]`.
295 fn apply_item_actions_with_signature_v2_delete(_n: u32, ) -> Weight {
296 // Proof Size summary in bytes:
297 // Measured: `10912`
298 // Estimated: `16357`
299 // Minimum execution time: 132_796_000 picoseconds.
300 Weight::from_parts(140_332_940, 16357)
301 .saturating_add(RocksDbWeight::get().reads(3_u64))
302 .saturating_add(RocksDbWeight::get().writes(1_u64))
303 }
304 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
305 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
306 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
307 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
308 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
309 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
310 /// The range of component `s` is `[1, 1024]`.
311 fn upsert_page_with_signature_v2(s: u32, ) -> Weight {
312 // Proof Size summary in bytes:
313 // Measured: `1618`
314 // Estimated: `7063`
315 // Minimum execution time: 119_223_000 picoseconds.
316 Weight::from_parts(121_719_336, 7063)
317 // Standard Error: 754
318 .saturating_add(Weight::from_parts(12_461, 0).saturating_mul(s.into()))
319 .saturating_add(RocksDbWeight::get().reads(3_u64))
320 .saturating_add(RocksDbWeight::get().writes(1_u64))
321 }
322 /// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
323 /// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
324 /// Storage: `Schemas::SchemaInfos` (r:1 w:0)
325 /// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(15), added: 2490, mode: `MaxEncodedLen`)
326 /// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
327 /// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
328 fn delete_page_with_signature_v2() -> Weight {
329 // Proof Size summary in bytes:
330 // Measured: `1616`
331 // Estimated: `7061`
332 // Minimum execution time: 117_586_000 picoseconds.
333 Weight::from_parts(120_180_000, 7061)
334 .saturating_add(RocksDbWeight::get().reads(3_u64))
335 .saturating_add(RocksDbWeight::get().writes(1_u64))
336 }
337}
338
339
340#[cfg(test)]
341mod tests {
342 use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
343 use common_runtime::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
344 use common_runtime::weights::extrinsic_weights::ExtrinsicBaseWeight;
345
346 #[allow(dead_code)]
347 struct BlockWeights;
348 impl Get<frame_system::limits::BlockWeights> for BlockWeights {
349 fn get() -> frame_system::limits::BlockWeights {
350 frame_system::limits::BlockWeights::builder()
351 .base_block(Weight::zero())
352 .for_class(DispatchClass::all(), |weights| {
353 weights.base_extrinsic = ExtrinsicBaseWeight::get();
354 })
355 .for_class(DispatchClass::non_mandatory(), |weights| {
356 weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
357 })
358 .build_or_panic()
359 }
360 }
361
362 #[test]
363 fn test_apply_item_actions_add() {
364 assert!(
365 BlockWeights::get()
366 .per_class
367 .get(frame_support::dispatch::DispatchClass::Normal)
368 .max_extrinsic
369 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
370 .proof_size()
371 > 5972
372 );
373 }
374 #[test]
375 fn test_apply_item_actions_delete() {
376 assert!(
377 BlockWeights::get()
378 .per_class
379 .get(frame_support::dispatch::DispatchClass::Normal)
380 .max_extrinsic
381 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
382 .proof_size()
383 > 16350
384 );
385 }
386 #[test]
387 fn test_upsert_page() {
388 assert!(
389 BlockWeights::get()
390 .per_class
391 .get(frame_support::dispatch::DispatchClass::Normal)
392 .max_extrinsic
393 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
394 .proof_size()
395 > 7130
396 );
397 }
398 #[test]
399 fn test_delete_page() {
400 assert!(
401 BlockWeights::get()
402 .per_class
403 .get(frame_support::dispatch::DispatchClass::Normal)
404 .max_extrinsic
405 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
406 .proof_size()
407 > 7128
408 );
409 }
410 #[test]
411 fn test_apply_item_actions_with_signature_v2_add() {
412 assert!(
413 BlockWeights::get()
414 .per_class
415 .get(frame_support::dispatch::DispatchClass::Normal)
416 .max_extrinsic
417 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
418 .proof_size()
419 > 5979
420 );
421 }
422 #[test]
423 fn test_apply_item_actions_with_signature_v2_delete() {
424 assert!(
425 BlockWeights::get()
426 .per_class
427 .get(frame_support::dispatch::DispatchClass::Normal)
428 .max_extrinsic
429 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
430 .proof_size()
431 > 16357
432 );
433 }
434 #[test]
435 fn test_upsert_page_with_signature_v2() {
436 assert!(
437 BlockWeights::get()
438 .per_class
439 .get(frame_support::dispatch::DispatchClass::Normal)
440 .max_extrinsic
441 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
442 .proof_size()
443 > 7063
444 );
445 }
446 #[test]
447 fn test_delete_page_with_signature_v2() {
448 assert!(
449 BlockWeights::get()
450 .per_class
451 .get(frame_support::dispatch::DispatchClass::Normal)
452 .max_extrinsic
453 .unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
454 .proof_size()
455 > 7061
456 );
457 }
458}