westend_runtime/weights/polkadot_runtime_common_paras_registrar.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot 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// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
16
17//! Autogenerated weights for `polkadot_runtime_common::paras_registrar`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --extrinsic=*
31// --runtime=target/production/wbuild/westend-runtime/westend_runtime.wasm
32// --pallet=polkadot_runtime_common::paras_registrar
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/westend/src/weights
35// --wasm-execution=compiled
36// --steps=50
37// --repeat=20
38// --heap-pages=4096
39// --no-storage-info
40// --no-min-squares
41// --no-median-slopes
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46#![allow(missing_docs)]
47
48use frame_support::{traits::Get, weights::Weight};
49use core::marker::PhantomData;
50
51/// Weight functions for `polkadot_runtime_common::paras_registrar`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> polkadot_runtime_common::paras_registrar::WeightInfo for WeightInfo<T> {
54 /// Storage: `Registrar::NextFreeParaId` (r:1 w:1)
55 /// Proof: `Registrar::NextFreeParaId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
56 /// Storage: `Registrar::Paras` (r:1 w:1)
57 /// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
58 /// Storage: `Paras::ParaLifecycles` (r:1 w:0)
59 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
60 fn reserve() -> Weight {
61 // Proof Size summary in bytes:
62 // Measured: `59`
63 // Estimated: `3524`
64 // Minimum execution time: 33_477_000 picoseconds.
65 Weight::from_parts(34_970_000, 0)
66 .saturating_add(Weight::from_parts(0, 3524))
67 .saturating_add(T::DbWeight::get().reads(3))
68 .saturating_add(T::DbWeight::get().writes(2))
69 }
70 /// Storage: `Registrar::Paras` (r:1 w:1)
71 /// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
72 /// Storage: `Paras::ParaLifecycles` (r:1 w:1)
73 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
74 /// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
75 /// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
76 /// Storage: `Paras::CodeByHash` (r:1 w:1)
77 /// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
78 /// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
79 /// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
80 /// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
81 /// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
82 /// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
83 /// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
84 /// Storage: `Paras::CurrentCodeHash` (r:0 w:1)
85 /// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
86 /// Storage: `Paras::UpcomingParasGenesis` (r:0 w:1)
87 /// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`)
88 fn register() -> Weight {
89 // Proof Size summary in bytes:
90 // Measured: `315`
91 // Estimated: `3780`
92 // Minimum execution time: 53_331_984_000 picoseconds.
93 Weight::from_parts(53_731_706_000, 0)
94 .saturating_add(Weight::from_parts(0, 3780))
95 .saturating_add(T::DbWeight::get().reads(7))
96 .saturating_add(T::DbWeight::get().writes(8))
97 }
98 /// Storage: `Registrar::Paras` (r:1 w:1)
99 /// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
100 /// Storage: `Paras::ParaLifecycles` (r:1 w:1)
101 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
102 /// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
103 /// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
104 /// Storage: `Paras::CodeByHash` (r:1 w:1)
105 /// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
106 /// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
107 /// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
108 /// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
109 /// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
110 /// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
111 /// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
112 /// Storage: `Paras::CurrentCodeHash` (r:0 w:1)
113 /// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
114 /// Storage: `Paras::UpcomingParasGenesis` (r:0 w:1)
115 /// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`)
116 fn force_register() -> Weight {
117 // Proof Size summary in bytes:
118 // Measured: `232`
119 // Estimated: `3697`
120 // Minimum execution time: 53_277_823_000 picoseconds.
121 Weight::from_parts(53_476_481_000, 0)
122 .saturating_add(Weight::from_parts(0, 3697))
123 .saturating_add(T::DbWeight::get().reads(7))
124 .saturating_add(T::DbWeight::get().writes(8))
125 }
126 /// Storage: `Registrar::Paras` (r:1 w:1)
127 /// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
128 /// Storage: `Paras::ParaLifecycles` (r:1 w:1)
129 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
130 /// Storage: `Paras::FutureCodeHash` (r:1 w:0)
131 /// Proof: `Paras::FutureCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
132 /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
133 /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
134 /// Storage: `Paras::ActionsQueue` (r:1 w:1)
135 /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
136 /// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
137 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
138 /// Storage: `Registrar::PendingSwap` (r:0 w:1)
139 /// Proof: `Registrar::PendingSwap` (`max_values`: None, `max_size`: None, mode: `Measured`)
140 fn deregister() -> Weight {
141 // Proof Size summary in bytes:
142 // Measured: `462`
143 // Estimated: `3927`
144 // Minimum execution time: 64_109_000 picoseconds.
145 Weight::from_parts(70_181_000, 0)
146 .saturating_add(Weight::from_parts(0, 3927))
147 .saturating_add(T::DbWeight::get().reads(6))
148 .saturating_add(T::DbWeight::get().writes(4))
149 }
150 /// Storage: `Registrar::Paras` (r:1 w:0)
151 /// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
152 /// Storage: `Paras::ParaLifecycles` (r:2 w:2)
153 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
154 /// Storage: `Registrar::PendingSwap` (r:1 w:1)
155 /// Proof: `Registrar::PendingSwap` (`max_values`: None, `max_size`: None, mode: `Measured`)
156 /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
157 /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158 /// Storage: `Paras::ActionsQueue` (r:1 w:1)
159 /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
160 /// Storage: `Crowdloan::Funds` (r:2 w:2)
161 /// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
162 /// Storage: `Slots::Leases` (r:2 w:2)
163 /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
164 /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
165 /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
166 /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
167 /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
168 /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:0)
169 /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
170 /// Storage: `Paras::Heads` (r:1 w:0)
171 /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
172 fn swap() -> Weight {
173 // Proof Size summary in bytes:
174 // Measured: `863`
175 // Estimated: `6803`
176 // Minimum execution time: 113_721_000 picoseconds.
177 Weight::from_parts(119_828_000, 0)
178 .saturating_add(Weight::from_parts(0, 6803))
179 .saturating_add(T::DbWeight::get().reads(14))
180 .saturating_add(T::DbWeight::get().writes(8))
181 }
182 /// Storage: `Paras::FutureCodeHash` (r:1 w:1)
183 /// Proof: `Paras::FutureCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
184 /// Storage: `Paras::UpgradeRestrictionSignal` (r:1 w:1)
185 /// Proof: `Paras::UpgradeRestrictionSignal` (`max_values`: None, `max_size`: None, mode: `Measured`)
186 /// Storage: `Paras::CurrentCodeHash` (r:1 w:0)
187 /// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
188 /// Storage: `Paras::UpgradeCooldowns` (r:1 w:1)
189 /// Proof: `Paras::UpgradeCooldowns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
190 /// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
191 /// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
192 /// Storage: `Paras::CodeByHash` (r:1 w:1)
193 /// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
194 /// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
195 /// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
196 /// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
197 /// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
198 /// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
199 /// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
200 /// The range of component `b` is `[9, 3145728]`.
201 fn schedule_code_upgrade(b: u32, ) -> Weight {
202 // Proof Size summary in bytes:
203 // Measured: `201`
204 // Estimated: `3666`
205 // Minimum execution time: 44_578_000 picoseconds.
206 Weight::from_parts(45_244_000, 0)
207 .saturating_add(Weight::from_parts(0, 3666))
208 // Standard Error: 130
209 .saturating_add(Weight::from_parts(13_412, 0).saturating_mul(b.into()))
210 .saturating_add(T::DbWeight::get().reads(9))
211 .saturating_add(T::DbWeight::get().writes(7))
212 }
213 /// Storage: `Paras::Heads` (r:0 w:1)
214 /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
215 /// The range of component `b` is `[1, 1048576]`.
216 fn set_current_head(b: u32, ) -> Weight {
217 // Proof Size summary in bytes:
218 // Measured: `0`
219 // Estimated: `0`
220 // Minimum execution time: 7_410_000 picoseconds.
221 Weight::from_parts(7_551_000, 0)
222 .saturating_add(Weight::from_parts(0, 0))
223 // Standard Error: 42
224 .saturating_add(Weight::from_parts(4_560, 0).saturating_mul(b.into()))
225 .saturating_add(T::DbWeight::get().writes(1))
226 }
227}