pallet_staking_async_parachain_runtime/weights/pallet_conviction_voting.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_conviction_voting`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-07-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner-xerhrdyb-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// --steps=50
31// --repeat=20
32// --extrinsic=*
33// --execution=wasm
34// --wasm-execution=compiled
35// --heap-pages=4096
36// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
37// --pallet=pallet_conviction_voting
38// --chain=westend-dev
39// --header=./file_header.txt
40// --output=./runtime/westend/src/weights/
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::Weight};
48use core::marker::PhantomData;
49
50/// Weight functions for `pallet_conviction_voting`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
53 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
54 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
55 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
56 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
57 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
58 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
59 /// Storage: `Balances::Locks` (r:1 w:1)
60 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
61 /// Storage: `Balances::Freezes` (r:1 w:0)
62 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
63 /// Storage: `Scheduler::Agenda` (r:1 w:1)
64 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
65 fn vote_new() -> Weight {
66 // Proof Size summary in bytes:
67 // Measured: `13445`
68 // Estimated: `42428`
69 // Minimum execution time: 152_223_000 picoseconds.
70 Weight::from_parts(162_148_000, 0)
71 .saturating_add(Weight::from_parts(0, 42428))
72 .saturating_add(T::DbWeight::get().reads(6))
73 .saturating_add(T::DbWeight::get().writes(5))
74 }
75 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
76 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
77 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
78 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
79 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
80 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
81 /// Storage: `Balances::Locks` (r:1 w:1)
82 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
83 /// Storage: `Balances::Freezes` (r:1 w:0)
84 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
85 /// Storage: `Scheduler::Agenda` (r:2 w:2)
86 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
87 fn vote_existing() -> Weight {
88 // Proof Size summary in bytes:
89 // Measured: `14166`
90 // Estimated: `83866`
91 // Minimum execution time: 220_361_000 picoseconds.
92 Weight::from_parts(236_478_000, 0)
93 .saturating_add(Weight::from_parts(0, 83866))
94 .saturating_add(T::DbWeight::get().reads(7))
95 .saturating_add(T::DbWeight::get().writes(6))
96 }
97 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
98 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
99 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
100 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
101 /// Storage: `Scheduler::Agenda` (r:2 w:2)
102 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
103 fn remove_vote() -> Weight {
104 // Proof Size summary in bytes:
105 // Measured: `13918`
106 // Estimated: `83866`
107 // Minimum execution time: 198_787_000 picoseconds.
108 Weight::from_parts(204_983_000, 0)
109 .saturating_add(Weight::from_parts(0, 83866))
110 .saturating_add(T::DbWeight::get().reads(4))
111 .saturating_add(T::DbWeight::get().writes(4))
112 }
113 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
114 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
115 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
116 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
117 fn remove_other_vote() -> Weight {
118 // Proof Size summary in bytes:
119 // Measured: `13004`
120 // Estimated: `30706`
121 // Minimum execution time: 88_469_000 picoseconds.
122 Weight::from_parts(95_942_000, 0)
123 .saturating_add(Weight::from_parts(0, 30706))
124 .saturating_add(T::DbWeight::get().reads(2))
125 .saturating_add(T::DbWeight::get().writes(1))
126 }
127 /// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
128 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
129 /// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
130 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
131 /// Storage: `Scheduler::Agenda` (r:2 w:2)
132 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
133 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
134 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
135 /// Storage: `Balances::Locks` (r:1 w:1)
136 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
137 /// Storage: `Balances::Freezes` (r:1 w:0)
138 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
139 /// The range of component `r` is `[0, 512]`.
140 fn delegate(r: u32, ) -> Weight {
141 // Proof Size summary in bytes:
142 // Measured: `29640 + r * (365 ±0)`
143 // Estimated: `83866 + r * (3411 ±0)`
144 // Minimum execution time: 79_951_000 picoseconds.
145 Weight::from_parts(1_844_983_097, 0)
146 .saturating_add(Weight::from_parts(0, 83866))
147 // Standard Error: 160_158
148 .saturating_add(Weight::from_parts(43_973_863, 0).saturating_mul(r.into()))
149 .saturating_add(T::DbWeight::get().reads(7))
150 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
151 .saturating_add(T::DbWeight::get().writes(6))
152 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
153 .saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
154 }
155 /// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
156 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
157 /// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
158 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
159 /// Storage: `Scheduler::Agenda` (r:2 w:2)
160 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
161 /// The range of component `r` is `[0, 512]`.
162 fn undelegate(r: u32, ) -> Weight {
163 // Proof Size summary in bytes:
164 // Measured: `29555 + r * (365 ±0)`
165 // Estimated: `83866 + r * (3411 ±0)`
166 // Minimum execution time: 47_976_000 picoseconds.
167 Weight::from_parts(1_877_857_335, 0)
168 .saturating_add(Weight::from_parts(0, 83866))
169 // Standard Error: 168_477
170 .saturating_add(Weight::from_parts(43_303_902, 0).saturating_mul(r.into()))
171 .saturating_add(T::DbWeight::get().reads(4))
172 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
173 .saturating_add(T::DbWeight::get().writes(4))
174 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
175 .saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
176 }
177 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
178 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
179 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
180 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
181 /// Storage: `Balances::Locks` (r:1 w:1)
182 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
183 /// Storage: `Balances::Freezes` (r:1 w:0)
184 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
185 fn unlock() -> Weight {
186 // Proof Size summary in bytes:
187 // Measured: `12218`
188 // Estimated: `30706`
189 // Minimum execution time: 102_868_000 picoseconds.
190 Weight::from_parts(110_438_000, 0)
191 .saturating_add(Weight::from_parts(0, 30706))
192 .saturating_add(T::DbWeight::get().reads(4))
193 .saturating_add(T::DbWeight::get().writes(3))
194 }
195}