referrerpolicy=no-referrer-when-downgrade

pallet_tips/
weights.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// 	http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// 	http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_tips`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `4563561839a5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_tips
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/tips/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --genesis-builder-policy=none
62// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage,pallet_election_provider_multi_block,pallet_election_provider_multi_block::signed,pallet_election_provider_multi_block::unsigned,pallet_election_provider_multi_block::verifier
63
64#![cfg_attr(rustfmt, rustfmt_skip)]
65#![allow(unused_parens)]
66#![allow(unused_imports)]
67#![allow(missing_docs)]
68#![allow(dead_code)]
69
70use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
71use core::marker::PhantomData;
72
73/// Weight functions needed for `pallet_tips`.
74pub trait WeightInfo {
75	fn report_awesome(r: u32, ) -> Weight;
76	fn retract_tip() -> Weight;
77	fn tip_new(r: u32, t: u32, ) -> Weight;
78	fn tip(t: u32, ) -> Weight;
79	fn close_tip(t: u32, ) -> Weight;
80	fn slash_tip(t: u32, ) -> Weight;
81}
82
83/// Weights for `pallet_tips` using the Substrate node and recommended hardware.
84pub struct SubstrateWeight<T>(PhantomData<T>);
85impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
86	/// Storage: `Tips::Reasons` (r:1 w:1)
87	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
88	/// Storage: `Tips::Tips` (r:1 w:1)
89	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
90	/// The range of component `r` is `[0, 300]`.
91	fn report_awesome(r: u32, ) -> Weight {
92		// Proof Size summary in bytes:
93		//  Measured:  `0`
94		//  Estimated: `3465`
95		// Minimum execution time: 25_299_000 picoseconds.
96		Weight::from_parts(25_994_435, 3465)
97			// Standard Error: 138
98			.saturating_add(Weight::from_parts(1_316, 0).saturating_mul(r.into()))
99			.saturating_add(T::DbWeight::get().reads(2_u64))
100			.saturating_add(T::DbWeight::get().writes(2_u64))
101	}
102	/// Storage: `Tips::Tips` (r:1 w:1)
103	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
104	/// Storage: `Tips::Reasons` (r:0 w:1)
105	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
106	fn retract_tip() -> Weight {
107		// Proof Size summary in bytes:
108		//  Measured:  `199`
109		//  Estimated: `3664`
110		// Minimum execution time: 24_924_000 picoseconds.
111		Weight::from_parts(25_470_000, 3664)
112			.saturating_add(T::DbWeight::get().reads(1_u64))
113			.saturating_add(T::DbWeight::get().writes(2_u64))
114	}
115	/// Storage: `Elections::Members` (r:1 w:0)
116	/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
117	/// Storage: `Tips::Reasons` (r:1 w:1)
118	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
119	/// Storage: `Tips::Tips` (r:0 w:1)
120	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
121	/// The range of component `r` is `[0, 300]`.
122	/// The range of component `t` is `[1, 13]`.
123	fn tip_new(r: u32, t: u32, ) -> Weight {
124		// Proof Size summary in bytes:
125		//  Measured:  `8 + t * (64 ±0)`
126		//  Estimated: `3473 + t * (64 ±0)`
127		// Minimum execution time: 13_938_000 picoseconds.
128		Weight::from_parts(14_044_481, 3473)
129			// Standard Error: 61
130			.saturating_add(Weight::from_parts(1_837, 0).saturating_mul(r.into()))
131			// Standard Error: 1_459
132			.saturating_add(Weight::from_parts(34_960, 0).saturating_mul(t.into()))
133			.saturating_add(T::DbWeight::get().reads(2_u64))
134			.saturating_add(T::DbWeight::get().writes(2_u64))
135			.saturating_add(Weight::from_parts(0, 64).saturating_mul(t.into()))
136	}
137	/// Storage: `Elections::Members` (r:1 w:0)
138	/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
139	/// Storage: `Tips::Tips` (r:1 w:1)
140	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
141	/// The range of component `t` is `[1, 13]`.
142	fn tip(t: u32, ) -> Weight {
143		// Proof Size summary in bytes:
144		//  Measured:  `211 + t * (112 ±0)`
145		//  Estimated: `3676 + t * (112 ±0)`
146		// Minimum execution time: 13_128_000 picoseconds.
147		Weight::from_parts(13_608_148, 3676)
148			// Standard Error: 1_708
149			.saturating_add(Weight::from_parts(125_669, 0).saturating_mul(t.into()))
150			.saturating_add(T::DbWeight::get().reads(2_u64))
151			.saturating_add(T::DbWeight::get().writes(1_u64))
152			.saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into()))
153	}
154	/// Storage: `Tips::Tips` (r:1 w:1)
155	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
156	/// Storage: `Elections::Members` (r:1 w:0)
157	/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158	/// Storage: `System::Account` (r:1 w:1)
159	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
160	/// Storage: `Tips::Reasons` (r:0 w:1)
161	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
162	/// The range of component `t` is `[1, 13]`.
163	fn close_tip(t: u32, ) -> Weight {
164		// Proof Size summary in bytes:
165		//  Measured:  `211 + t * (112 ±0)`
166		//  Estimated: `3676 + t * (112 ±0)`
167		// Minimum execution time: 54_188_000 picoseconds.
168		Weight::from_parts(55_290_996, 3676)
169			// Standard Error: 4_985
170			.saturating_add(Weight::from_parts(110_826, 0).saturating_mul(t.into()))
171			.saturating_add(T::DbWeight::get().reads(3_u64))
172			.saturating_add(T::DbWeight::get().writes(3_u64))
173			.saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into()))
174	}
175	/// Storage: `Tips::Tips` (r:1 w:1)
176	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
177	/// Storage: `Tips::Reasons` (r:0 w:1)
178	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
179	/// The range of component `t` is `[1, 13]`.
180	fn slash_tip(t: u32, ) -> Weight {
181		// Proof Size summary in bytes:
182		//  Measured:  `247`
183		//  Estimated: `3712`
184		// Minimum execution time: 11_654_000 picoseconds.
185		Weight::from_parts(12_425_890, 3712)
186			// Standard Error: 1_521
187			.saturating_add(Weight::from_parts(9_533, 0).saturating_mul(t.into()))
188			.saturating_add(T::DbWeight::get().reads(1_u64))
189			.saturating_add(T::DbWeight::get().writes(2_u64))
190	}
191}
192
193// For backwards compatibility and tests.
194impl WeightInfo for () {
195	/// Storage: `Tips::Reasons` (r:1 w:1)
196	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
197	/// Storage: `Tips::Tips` (r:1 w:1)
198	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
199	/// The range of component `r` is `[0, 300]`.
200	fn report_awesome(r: u32, ) -> Weight {
201		// Proof Size summary in bytes:
202		//  Measured:  `0`
203		//  Estimated: `3465`
204		// Minimum execution time: 25_299_000 picoseconds.
205		Weight::from_parts(25_994_435, 3465)
206			// Standard Error: 138
207			.saturating_add(Weight::from_parts(1_316, 0).saturating_mul(r.into()))
208			.saturating_add(RocksDbWeight::get().reads(2_u64))
209			.saturating_add(RocksDbWeight::get().writes(2_u64))
210	}
211	/// Storage: `Tips::Tips` (r:1 w:1)
212	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
213	/// Storage: `Tips::Reasons` (r:0 w:1)
214	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
215	fn retract_tip() -> Weight {
216		// Proof Size summary in bytes:
217		//  Measured:  `199`
218		//  Estimated: `3664`
219		// Minimum execution time: 24_924_000 picoseconds.
220		Weight::from_parts(25_470_000, 3664)
221			.saturating_add(RocksDbWeight::get().reads(1_u64))
222			.saturating_add(RocksDbWeight::get().writes(2_u64))
223	}
224	/// Storage: `Elections::Members` (r:1 w:0)
225	/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
226	/// Storage: `Tips::Reasons` (r:1 w:1)
227	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
228	/// Storage: `Tips::Tips` (r:0 w:1)
229	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
230	/// The range of component `r` is `[0, 300]`.
231	/// The range of component `t` is `[1, 13]`.
232	fn tip_new(r: u32, t: u32, ) -> Weight {
233		// Proof Size summary in bytes:
234		//  Measured:  `8 + t * (64 ±0)`
235		//  Estimated: `3473 + t * (64 ±0)`
236		// Minimum execution time: 13_938_000 picoseconds.
237		Weight::from_parts(14_044_481, 3473)
238			// Standard Error: 61
239			.saturating_add(Weight::from_parts(1_837, 0).saturating_mul(r.into()))
240			// Standard Error: 1_459
241			.saturating_add(Weight::from_parts(34_960, 0).saturating_mul(t.into()))
242			.saturating_add(RocksDbWeight::get().reads(2_u64))
243			.saturating_add(RocksDbWeight::get().writes(2_u64))
244			.saturating_add(Weight::from_parts(0, 64).saturating_mul(t.into()))
245	}
246	/// Storage: `Elections::Members` (r:1 w:0)
247	/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
248	/// Storage: `Tips::Tips` (r:1 w:1)
249	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
250	/// The range of component `t` is `[1, 13]`.
251	fn tip(t: u32, ) -> Weight {
252		// Proof Size summary in bytes:
253		//  Measured:  `211 + t * (112 ±0)`
254		//  Estimated: `3676 + t * (112 ±0)`
255		// Minimum execution time: 13_128_000 picoseconds.
256		Weight::from_parts(13_608_148, 3676)
257			// Standard Error: 1_708
258			.saturating_add(Weight::from_parts(125_669, 0).saturating_mul(t.into()))
259			.saturating_add(RocksDbWeight::get().reads(2_u64))
260			.saturating_add(RocksDbWeight::get().writes(1_u64))
261			.saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into()))
262	}
263	/// Storage: `Tips::Tips` (r:1 w:1)
264	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
265	/// Storage: `Elections::Members` (r:1 w:0)
266	/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
267	/// Storage: `System::Account` (r:1 w:1)
268	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
269	/// Storage: `Tips::Reasons` (r:0 w:1)
270	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
271	/// The range of component `t` is `[1, 13]`.
272	fn close_tip(t: u32, ) -> Weight {
273		// Proof Size summary in bytes:
274		//  Measured:  `211 + t * (112 ±0)`
275		//  Estimated: `3676 + t * (112 ±0)`
276		// Minimum execution time: 54_188_000 picoseconds.
277		Weight::from_parts(55_290_996, 3676)
278			// Standard Error: 4_985
279			.saturating_add(Weight::from_parts(110_826, 0).saturating_mul(t.into()))
280			.saturating_add(RocksDbWeight::get().reads(3_u64))
281			.saturating_add(RocksDbWeight::get().writes(3_u64))
282			.saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into()))
283	}
284	/// Storage: `Tips::Tips` (r:1 w:1)
285	/// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`)
286	/// Storage: `Tips::Reasons` (r:0 w:1)
287	/// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`)
288	/// The range of component `t` is `[1, 13]`.
289	fn slash_tip(t: u32, ) -> Weight {
290		// Proof Size summary in bytes:
291		//  Measured:  `247`
292		//  Estimated: `3712`
293		// Minimum execution time: 11_654_000 picoseconds.
294		Weight::from_parts(12_425_890, 3712)
295			// Standard Error: 1_521
296			.saturating_add(Weight::from_parts(9_533, 0).saturating_mul(t.into()))
297			.saturating_add(RocksDbWeight::get().reads(1_u64))
298			.saturating_add(RocksDbWeight::get().writes(2_u64))
299	}
300}