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