pallet_salary/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_salary`
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_salary
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/salary/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-umbrella-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::weights_prelude::*;
71
72/// Weight functions needed for `pallet_salary`.
73pub trait WeightInfo {
74 fn init() -> Weight;
75 fn bump() -> Weight;
76 fn induct() -> Weight;
77 fn register() -> Weight;
78 fn payout() -> Weight;
79 fn payout_other() -> Weight;
80 fn check_payment() -> Weight;
81}
82
83/// Weights for `pallet_salary` using the Substrate node and recommended hardware.
84pub struct SubstrateWeight<T>(PhantomData<T>);
85impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
86 /// Storage: `Salary::Status` (r:1 w:1)
87 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
88 fn init() -> Weight {
89 // Proof Size summary in bytes:
90 // Measured: `0`
91 // Estimated: `1541`
92 // Minimum execution time: 5_326_000 picoseconds.
93 Weight::from_parts(5_563_000, 1541)
94 .saturating_add(T::DbWeight::get().reads(1_u64))
95 .saturating_add(T::DbWeight::get().writes(1_u64))
96 }
97 /// Storage: `Salary::Status` (r:1 w:1)
98 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
99 fn bump() -> Weight {
100 // Proof Size summary in bytes:
101 // Measured: `26`
102 // Estimated: `1541`
103 // Minimum execution time: 6_708_000 picoseconds.
104 Weight::from_parts(6_971_000, 1541)
105 .saturating_add(T::DbWeight::get().reads(1_u64))
106 .saturating_add(T::DbWeight::get().writes(1_u64))
107 }
108 /// Storage: `Salary::Status` (r:1 w:0)
109 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
110 /// Storage: `RankedCollective::Members` (r:1 w:0)
111 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
112 /// Storage: `Salary::Claimant` (r:1 w:1)
113 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
114 fn induct() -> Weight {
115 // Proof Size summary in bytes:
116 // Measured: `177`
117 // Estimated: `3543`
118 // Minimum execution time: 14_418_000 picoseconds.
119 Weight::from_parts(14_844_000, 3543)
120 .saturating_add(T::DbWeight::get().reads(3_u64))
121 .saturating_add(T::DbWeight::get().writes(1_u64))
122 }
123 /// Storage: `RankedCollective::Members` (r:1 w:0)
124 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
125 /// Storage: `Salary::Status` (r:1 w:1)
126 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
127 /// Storage: `Salary::Claimant` (r:1 w:1)
128 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
129 fn register() -> Weight {
130 // Proof Size summary in bytes:
131 // Measured: `229`
132 // Estimated: `3543`
133 // Minimum execution time: 18_333_000 picoseconds.
134 Weight::from_parts(18_876_000, 3543)
135 .saturating_add(T::DbWeight::get().reads(3_u64))
136 .saturating_add(T::DbWeight::get().writes(2_u64))
137 }
138 /// Storage: `Salary::Status` (r:1 w:1)
139 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
140 /// Storage: `Salary::Claimant` (r:1 w:1)
141 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
142 /// Storage: `RankedCollective::Members` (r:1 w:0)
143 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
144 fn payout() -> Weight {
145 // Proof Size summary in bytes:
146 // Measured: `229`
147 // Estimated: `3543`
148 // Minimum execution time: 60_650_000 picoseconds.
149 Weight::from_parts(61_965_000, 3543)
150 .saturating_add(T::DbWeight::get().reads(3_u64))
151 .saturating_add(T::DbWeight::get().writes(2_u64))
152 }
153 /// Storage: `Salary::Status` (r:1 w:1)
154 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
155 /// Storage: `Salary::Claimant` (r:1 w:1)
156 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
157 /// Storage: `RankedCollective::Members` (r:1 w:0)
158 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
159 /// Storage: `System::Account` (r:1 w:1)
160 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
161 fn payout_other() -> Weight {
162 // Proof Size summary in bytes:
163 // Measured: `229`
164 // Estimated: `3593`
165 // Minimum execution time: 60_860_000 picoseconds.
166 Weight::from_parts(61_739_000, 3593)
167 .saturating_add(T::DbWeight::get().reads(4_u64))
168 .saturating_add(T::DbWeight::get().writes(3_u64))
169 }
170 /// Storage: `Salary::Status` (r:1 w:1)
171 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
172 /// Storage: `Salary::Claimant` (r:1 w:1)
173 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
174 fn check_payment() -> Weight {
175 // Proof Size summary in bytes:
176 // Measured: `95`
177 // Estimated: `3543`
178 // Minimum execution time: 9_559_000 picoseconds.
179 Weight::from_parts(9_936_000, 3543)
180 .saturating_add(T::DbWeight::get().reads(2_u64))
181 .saturating_add(T::DbWeight::get().writes(2_u64))
182 }
183}
184
185// For backwards compatibility and tests.
186impl WeightInfo for () {
187 /// Storage: `Salary::Status` (r:1 w:1)
188 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
189 fn init() -> Weight {
190 // Proof Size summary in bytes:
191 // Measured: `0`
192 // Estimated: `1541`
193 // Minimum execution time: 5_326_000 picoseconds.
194 Weight::from_parts(5_563_000, 1541)
195 .saturating_add(RocksDbWeight::get().reads(1_u64))
196 .saturating_add(RocksDbWeight::get().writes(1_u64))
197 }
198 /// Storage: `Salary::Status` (r:1 w:1)
199 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
200 fn bump() -> Weight {
201 // Proof Size summary in bytes:
202 // Measured: `26`
203 // Estimated: `1541`
204 // Minimum execution time: 6_708_000 picoseconds.
205 Weight::from_parts(6_971_000, 1541)
206 .saturating_add(RocksDbWeight::get().reads(1_u64))
207 .saturating_add(RocksDbWeight::get().writes(1_u64))
208 }
209 /// Storage: `Salary::Status` (r:1 w:0)
210 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
211 /// Storage: `RankedCollective::Members` (r:1 w:0)
212 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
213 /// Storage: `Salary::Claimant` (r:1 w:1)
214 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
215 fn induct() -> Weight {
216 // Proof Size summary in bytes:
217 // Measured: `177`
218 // Estimated: `3543`
219 // Minimum execution time: 14_418_000 picoseconds.
220 Weight::from_parts(14_844_000, 3543)
221 .saturating_add(RocksDbWeight::get().reads(3_u64))
222 .saturating_add(RocksDbWeight::get().writes(1_u64))
223 }
224 /// Storage: `RankedCollective::Members` (r:1 w:0)
225 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
226 /// Storage: `Salary::Status` (r:1 w:1)
227 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
228 /// Storage: `Salary::Claimant` (r:1 w:1)
229 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
230 fn register() -> Weight {
231 // Proof Size summary in bytes:
232 // Measured: `229`
233 // Estimated: `3543`
234 // Minimum execution time: 18_333_000 picoseconds.
235 Weight::from_parts(18_876_000, 3543)
236 .saturating_add(RocksDbWeight::get().reads(3_u64))
237 .saturating_add(RocksDbWeight::get().writes(2_u64))
238 }
239 /// Storage: `Salary::Status` (r:1 w:1)
240 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
241 /// Storage: `Salary::Claimant` (r:1 w:1)
242 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
243 /// Storage: `RankedCollective::Members` (r:1 w:0)
244 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
245 fn payout() -> Weight {
246 // Proof Size summary in bytes:
247 // Measured: `229`
248 // Estimated: `3543`
249 // Minimum execution time: 60_650_000 picoseconds.
250 Weight::from_parts(61_965_000, 3543)
251 .saturating_add(RocksDbWeight::get().reads(3_u64))
252 .saturating_add(RocksDbWeight::get().writes(2_u64))
253 }
254 /// Storage: `Salary::Status` (r:1 w:1)
255 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
256 /// Storage: `Salary::Claimant` (r:1 w:1)
257 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
258 /// Storage: `RankedCollective::Members` (r:1 w:0)
259 /// Proof: `RankedCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
260 /// Storage: `System::Account` (r:1 w:1)
261 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
262 fn payout_other() -> Weight {
263 // Proof Size summary in bytes:
264 // Measured: `229`
265 // Estimated: `3593`
266 // Minimum execution time: 60_860_000 picoseconds.
267 Weight::from_parts(61_739_000, 3593)
268 .saturating_add(RocksDbWeight::get().reads(4_u64))
269 .saturating_add(RocksDbWeight::get().writes(3_u64))
270 }
271 /// Storage: `Salary::Status` (r:1 w:1)
272 /// Proof: `Salary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
273 /// Storage: `Salary::Claimant` (r:1 w:1)
274 /// Proof: `Salary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
275 fn check_payment() -> Weight {
276 // Proof Size summary in bytes:
277 // Measured: `95`
278 // Estimated: `3543`
279 // Minimum execution time: 9_559_000 picoseconds.
280 Weight::from_parts(9_936_000, 3543)
281 .saturating_add(RocksDbWeight::get().reads(2_u64))
282 .saturating_add(RocksDbWeight::get().writes(2_u64))
283 }
284}