pallet_staking_async_parachain_runtime/weights/pallet_fast_unstake.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//! Autogenerated weights for `pallet_fast_unstake`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-06-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
25
26// Executed Command:
27// ./target/production/polkadot
28// benchmark
29// pallet
30// --chain=westend-dev
31// --steps=50
32// --repeat=20
33// --no-storage-info
34// --no-median-slopes
35// --no-min-squares
36// --pallet=pallet_fast_unstake
37// --extrinsic=*
38// --execution=wasm
39// --wasm-execution=compiled
40// --header=./file_header.txt
41// --output=./runtime/westend/src/weights/
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 `pallet_fast_unstake`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
54 /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
55 /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
56 /// Storage: Staking ValidatorCount (r:1 w:0)
57 /// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
58 /// Storage: FastUnstake Head (r:1 w:1)
59 /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen)
60 /// Storage: FastUnstake CounterForQueue (r:1 w:0)
61 /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
62 /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
63 /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
64 /// Storage: Staking CurrentEra (r:1 w:0)
65 /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
66 /// Storage: Staking SlashingSpans (r:64 w:0)
67 /// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured)
68 /// Storage: Staking Bonded (r:64 w:64)
69 /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
70 /// Storage: Staking Validators (r:64 w:0)
71 /// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
72 /// Storage: Staking Nominators (r:64 w:0)
73 /// Proof: Staking Nominators (max_values: None, max_size: Some(558), added: 3033, mode: MaxEncodedLen)
74 /// Storage: System Account (r:64 w:64)
75 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
76 /// Storage: Balances Locks (r:64 w:64)
77 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
78 /// Storage: Balances Freezes (r:64 w:0)
79 /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
80 /// Storage: Staking Ledger (r:0 w:64)
81 /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
82 /// Storage: Staking Payee (r:0 w:64)
83 /// Proof: Staking Payee (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
84 /// The range of component `b` is `[1, 64]`.
85 fn on_idle_unstake(b: u32, ) -> Weight {
86 // Proof Size summary in bytes:
87 // Measured: `1090 + b * (344 ±0)`
88 // Estimated: `4572 + b * (3774 ±0)`
89 // Minimum execution time: 88_455_000 picoseconds.
90 Weight::from_parts(4_625_058, 0)
91 .saturating_add(Weight::from_parts(0, 4572))
92 // Standard Error: 92_258
93 .saturating_add(Weight::from_parts(61_451_756, 0).saturating_mul(b.into()))
94 .saturating_add(T::DbWeight::get().reads(6))
95 .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(b.into())))
96 .saturating_add(T::DbWeight::get().writes(1))
97 .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(b.into())))
98 .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))
99 }
100 /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
101 /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
102 /// Storage: Staking ValidatorCount (r:1 w:0)
103 /// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
104 /// Storage: FastUnstake Head (r:1 w:1)
105 /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen)
106 /// Storage: FastUnstake CounterForQueue (r:1 w:0)
107 /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
108 /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
109 /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
110 /// Storage: Staking CurrentEra (r:1 w:0)
111 /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
112 /// Storage: Staking ErasStakers (r:257 w:0)
113 /// Proof Skipped: Staking ErasStakers (max_values: None, max_size: None, mode: Measured)
114 /// The range of component `v` is `[1, 256]`.
115 /// The range of component `b` is `[1, 64]`.
116 fn on_idle_check(v: u32, b: u32, ) -> Weight {
117 // Proof Size summary in bytes:
118 // Measured: `1304 + b * (48 ±0) + v * (2485 ±0)`
119 // Estimated: `4622 + b * (49 ±0) + v * (4961 ±0)`
120 // Minimum execution time: 737_381_000 picoseconds.
121 Weight::from_parts(747_714_000, 0)
122 .saturating_add(Weight::from_parts(0, 4622))
123 // Standard Error: 4_194_752
124 .saturating_add(Weight::from_parts(135_818_708, 0).saturating_mul(v.into()))
125 // Standard Error: 16_783_682
126 .saturating_add(Weight::from_parts(525_457_699, 0).saturating_mul(b.into()))
127 .saturating_add(T::DbWeight::get().reads(7))
128 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
129 .saturating_add(T::DbWeight::get().writes(1))
130 .saturating_add(Weight::from_parts(0, 49).saturating_mul(b.into()))
131 .saturating_add(Weight::from_parts(0, 4961).saturating_mul(v.into()))
132 }
133 /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
134 /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
135 /// Storage: Staking Ledger (r:1 w:1)
136 /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
137 /// Storage: FastUnstake Queue (r:1 w:1)
138 /// Proof: FastUnstake Queue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
139 /// Storage: FastUnstake Head (r:1 w:0)
140 /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen)
141 /// Storage: Staking Bonded (r:1 w:0)
142 /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
143 /// Storage: Staking Validators (r:1 w:0)
144 /// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen)
145 /// Storage: Staking Nominators (r:1 w:1)
146 /// Proof: Staking Nominators (max_values: None, max_size: Some(558), added: 3033, mode: MaxEncodedLen)
147 /// Storage: Staking CounterForNominators (r:1 w:1)
148 /// Proof: Staking CounterForNominators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
149 /// Storage: VoterList ListNodes (r:1 w:1)
150 /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen)
151 /// Storage: VoterList ListBags (r:1 w:1)
152 /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
153 /// Storage: VoterList CounterForListNodes (r:1 w:1)
154 /// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
155 /// Storage: Staking CurrentEra (r:1 w:0)
156 /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
157 /// Storage: Balances Locks (r:1 w:1)
158 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
159 /// Storage: Balances Freezes (r:1 w:0)
160 /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
161 /// Storage: FastUnstake CounterForQueue (r:1 w:1)
162 /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
163 fn register_fast_unstake() -> Weight {
164 // Proof Size summary in bytes:
165 // Measured: `1826`
166 // Estimated: `4764`
167 // Minimum execution time: 122_429_000 picoseconds.
168 Weight::from_parts(125_427_000, 0)
169 .saturating_add(Weight::from_parts(0, 4764))
170 .saturating_add(T::DbWeight::get().reads(15))
171 .saturating_add(T::DbWeight::get().writes(9))
172 }
173 /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
174 /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
175 /// Storage: Staking Ledger (r:1 w:0)
176 /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
177 /// Storage: FastUnstake Queue (r:1 w:1)
178 /// Proof: FastUnstake Queue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
179 /// Storage: FastUnstake Head (r:1 w:0)
180 /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen)
181 /// Storage: FastUnstake CounterForQueue (r:1 w:1)
182 /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
183 fn deregister() -> Weight {
184 // Proof Size summary in bytes:
185 // Measured: `1118`
186 // Estimated: `4572`
187 // Minimum execution time: 43_442_000 picoseconds.
188 Weight::from_parts(44_728_000, 0)
189 .saturating_add(Weight::from_parts(0, 4572))
190 .saturating_add(T::DbWeight::get().reads(5))
191 .saturating_add(T::DbWeight::get().writes(2))
192 }
193 /// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
194 /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
195 fn control() -> Weight {
196 // Proof Size summary in bytes:
197 // Measured: `0`
198 // Estimated: `0`
199 // Minimum execution time: 2_471_000 picoseconds.
200 Weight::from_parts(2_667_000, 0)
201 .saturating_add(Weight::from_parts(0, 0))
202 .saturating_add(T::DbWeight::get().writes(1))
203 }
204}