referrerpolicy=no-referrer-when-downgrade

rococo_runtime/weights/
polkadot_runtime_common_crowdloan.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::crowdloan`
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: `d3a9aad6f7a3`, 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/rococo-runtime/rococo_runtime.wasm
32// --pallet=polkadot_runtime_common::crowdloan
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/rococo/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::crowdloan`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> polkadot_runtime_common::crowdloan::WeightInfo for WeightInfo<T> {
54	/// Storage: `Crowdloan::Funds` (r:1 w:1)
55	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
56	/// Storage: `Registrar::Paras` (r:1 w:0)
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	/// Storage: `Crowdloan::NextFundIndex` (r:1 w:1)
61	/// Proof: `Crowdloan::NextFundIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
62	/// Storage: `System::Account` (r:1 w:1)
63	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
64	fn create() -> Weight {
65		// Proof Size summary in bytes:
66		//  Measured:  `401`
67		//  Estimated: `3866`
68		// Minimum execution time: 54_117_000 picoseconds.
69		Weight::from_parts(59_162_000, 0)
70			.saturating_add(Weight::from_parts(0, 3866))
71			.saturating_add(T::DbWeight::get().reads(5))
72			.saturating_add(T::DbWeight::get().writes(3))
73	}
74	/// Storage: `Crowdloan::Funds` (r:1 w:1)
75	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
76	/// Storage: `Slots::Leases` (r:1 w:0)
77	/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
78	/// Storage: `Auctions::AuctionInfo` (r:1 w:0)
79	/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
80	/// Storage: `System::Account` (r:1 w:1)
81	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
82	/// Storage: `Crowdloan::EndingsCount` (r:1 w:0)
83	/// Proof: `Crowdloan::EndingsCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84	/// Storage: `Crowdloan::NewRaise` (r:1 w:1)
85	/// Proof: `Crowdloan::NewRaise` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86	/// Storage: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
87	/// Proof: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
88	fn contribute() -> Weight {
89		// Proof Size summary in bytes:
90		//  Measured:  `564`
91		//  Estimated: `4029`
92		// Minimum execution time: 139_243_000 picoseconds.
93		Weight::from_parts(145_356_000, 0)
94			.saturating_add(Weight::from_parts(0, 4029))
95			.saturating_add(T::DbWeight::get().reads(7))
96			.saturating_add(T::DbWeight::get().writes(4))
97	}
98	/// Storage: `Crowdloan::Funds` (r:1 w:1)
99	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
100	/// Storage: `System::Account` (r:2 w:2)
101	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
102	/// Storage: UNKNOWN KEY `0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0` (r:1 w:1)
103	/// Proof: UNKNOWN KEY `0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0` (r:1 w:1)
104	fn withdraw() -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `688`
107		//  Estimated: `6196`
108		// Minimum execution time: 85_152_000 picoseconds.
109		Weight::from_parts(88_704_000, 0)
110			.saturating_add(Weight::from_parts(0, 6196))
111			.saturating_add(T::DbWeight::get().reads(4))
112			.saturating_add(T::DbWeight::get().writes(4))
113	}
114	/// Storage: `Skipped::Metadata` (r:0 w:0)
115	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
116	/// The range of component `k` is `[0, 1000]`.
117	fn refund(k: u32, ) -> Weight {
118		// Proof Size summary in bytes:
119		//  Measured:  `126 + k * (189 ±0)`
120		//  Estimated: `139 + k * (189 ±0)`
121		// Minimum execution time: 38_767_000 picoseconds.
122		Weight::from_parts(42_119_000, 0)
123			.saturating_add(Weight::from_parts(0, 139))
124			// Standard Error: 28_534
125			.saturating_add(Weight::from_parts(45_736_695, 0).saturating_mul(k.into()))
126			.saturating_add(T::DbWeight::get().reads(3))
127			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into())))
128			.saturating_add(T::DbWeight::get().writes(2))
129			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(k.into())))
130			.saturating_add(Weight::from_parts(0, 189).saturating_mul(k.into()))
131	}
132	/// Storage: `Crowdloan::Funds` (r:1 w:1)
133	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
134	/// Storage: `System::Account` (r:2 w:2)
135	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
136	fn dissolve() -> Weight {
137		// Proof Size summary in bytes:
138		//  Measured:  `515`
139		//  Estimated: `6196`
140		// Minimum execution time: 52_853_000 picoseconds.
141		Weight::from_parts(58_194_000, 0)
142			.saturating_add(Weight::from_parts(0, 6196))
143			.saturating_add(T::DbWeight::get().reads(3))
144			.saturating_add(T::DbWeight::get().writes(3))
145	}
146	/// Storage: `Crowdloan::Funds` (r:1 w:1)
147	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
148	fn edit() -> Weight {
149		// Proof Size summary in bytes:
150		//  Measured:  `235`
151		//  Estimated: `3700`
152		// Minimum execution time: 22_698_000 picoseconds.
153		Weight::from_parts(25_666_000, 0)
154			.saturating_add(Weight::from_parts(0, 3700))
155			.saturating_add(T::DbWeight::get().reads(1))
156			.saturating_add(T::DbWeight::get().writes(1))
157	}
158	/// Storage: `Crowdloan::Funds` (r:1 w:0)
159	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
160	/// Storage: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
161	/// Proof: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
162	fn add_memo() -> Weight {
163		// Proof Size summary in bytes:
164		//  Measured:  `413`
165		//  Estimated: `3878`
166		// Minimum execution time: 33_040_000 picoseconds.
167		Weight::from_parts(34_518_000, 0)
168			.saturating_add(Weight::from_parts(0, 3878))
169			.saturating_add(T::DbWeight::get().reads(2))
170			.saturating_add(T::DbWeight::get().writes(1))
171	}
172	/// Storage: `Crowdloan::Funds` (r:1 w:0)
173	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
174	/// Storage: `Crowdloan::NewRaise` (r:1 w:1)
175	/// Proof: `Crowdloan::NewRaise` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
176	fn poke() -> Weight {
177		// Proof Size summary in bytes:
178		//  Measured:  `239`
179		//  Estimated: `3704`
180		// Minimum execution time: 22_259_000 picoseconds.
181		Weight::from_parts(23_547_000, 0)
182			.saturating_add(Weight::from_parts(0, 3704))
183			.saturating_add(T::DbWeight::get().reads(2))
184			.saturating_add(T::DbWeight::get().writes(1))
185	}
186	/// Storage: `Auctions::AuctionInfo` (r:1 w:0)
187	/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
188	/// Storage: `Crowdloan::EndingsCount` (r:1 w:1)
189	/// Proof: `Crowdloan::EndingsCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
190	/// Storage: `Crowdloan::NewRaise` (r:1 w:1)
191	/// Proof: `Crowdloan::NewRaise` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
192	/// Storage: `Crowdloan::Funds` (r:100 w:0)
193	/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
194	/// Storage: `Auctions::AuctionCounter` (r:1 w:0)
195	/// Proof: `Auctions::AuctionCounter` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
196	/// Storage: `Paras::ParaLifecycles` (r:100 w:0)
197	/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
198	/// Storage: `Slots::Leases` (r:100 w:0)
199	/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
200	/// Storage: `Auctions::Winning` (r:1 w:1)
201	/// Proof: `Auctions::Winning` (`max_values`: None, `max_size`: Some(1920), added: 4395, mode: `MaxEncodedLen`)
202	/// Storage: `Auctions::ReservedAmounts` (r:100 w:100)
203	/// Proof: `Auctions::ReservedAmounts` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
204	/// Storage: `System::Account` (r:100 w:100)
205	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
206	/// The range of component `n` is `[2, 100]`.
207	fn on_initialize(n: u32, ) -> Weight {
208		// Proof Size summary in bytes:
209		//  Measured:  `231 + n * (356 ±0)`
210		//  Estimated: `5385 + n * (2832 ±0)`
211		// Minimum execution time: 137_657_000 picoseconds.
212		Weight::from_parts(10_705_659, 0)
213			.saturating_add(Weight::from_parts(0, 5385))
214			// Standard Error: 38_062
215			.saturating_add(Weight::from_parts(63_582_684, 0).saturating_mul(n.into()))
216			.saturating_add(T::DbWeight::get().reads(5))
217			.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
218			.saturating_add(T::DbWeight::get().writes(3))
219			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
220			.saturating_add(Weight::from_parts(0, 2832).saturating_mul(n.into()))
221	}
222}