westend_runtime/weights/pallet_conviction_voting.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 `pallet_conviction_voting`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `3a2e9ae8a8f5`, 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/westend-runtime/westend_runtime.wasm
32// --pallet=pallet_conviction_voting
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/westend/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 `pallet_conviction_voting`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
54 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
55 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
56 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
57 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
58 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
59 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
60 /// Storage: `Balances::Locks` (r:1 w:1)
61 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
62 /// Storage: `Balances::Freezes` (r:1 w:0)
63 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
64 /// Storage: `Scheduler::Agenda` (r:1 w:1)
65 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
66 fn vote_new() -> Weight {
67 // Proof Size summary in bytes:
68 // Measured: `13408`
69 // Estimated: `42428`
70 // Minimum execution time: 151_930_000 picoseconds.
71 Weight::from_parts(161_372_000, 0)
72 .saturating_add(Weight::from_parts(0, 42428))
73 .saturating_add(T::DbWeight::get().reads(6))
74 .saturating_add(T::DbWeight::get().writes(5))
75 }
76 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
77 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
78 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
79 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
80 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
81 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
82 /// Storage: `Balances::Locks` (r:1 w:1)
83 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
84 /// Storage: `Balances::Freezes` (r:1 w:0)
85 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
86 /// Storage: `Scheduler::Agenda` (r:2 w:2)
87 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
88 /// Storage: `Scheduler::Retries` (r:0 w:1)
89 /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
90 fn vote_existing() -> Weight {
91 // Proof Size summary in bytes:
92 // Measured: `14129`
93 // Estimated: `83866`
94 // Minimum execution time: 176_955_000 picoseconds.
95 Weight::from_parts(185_290_000, 0)
96 .saturating_add(Weight::from_parts(0, 83866))
97 .saturating_add(T::DbWeight::get().reads(7))
98 .saturating_add(T::DbWeight::get().writes(7))
99 }
100 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
101 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
102 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
103 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
104 /// Storage: `Scheduler::Agenda` (r:2 w:2)
105 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
106 /// Storage: `Scheduler::Retries` (r:0 w:1)
107 /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
108 fn remove_vote() -> Weight {
109 // Proof Size summary in bytes:
110 // Measured: `13918`
111 // Estimated: `83866`
112 // Minimum execution time: 141_988_000 picoseconds.
113 Weight::from_parts(149_871_000, 0)
114 .saturating_add(Weight::from_parts(0, 83866))
115 .saturating_add(T::DbWeight::get().reads(4))
116 .saturating_add(T::DbWeight::get().writes(5))
117 }
118 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
119 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
120 /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
121 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
122 fn remove_other_vote() -> Weight {
123 // Proof Size summary in bytes:
124 // Measured: `13005`
125 // Estimated: `30706`
126 // Minimum execution time: 79_917_000 picoseconds.
127 Weight::from_parts(84_349_000, 0)
128 .saturating_add(Weight::from_parts(0, 30706))
129 .saturating_add(T::DbWeight::get().reads(2))
130 .saturating_add(T::DbWeight::get().writes(1))
131 }
132 /// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
133 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
134 /// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
135 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
136 /// Storage: `Scheduler::Agenda` (r:2 w:2)
137 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
138 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
139 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
140 /// Storage: `Balances::Locks` (r:1 w:1)
141 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
142 /// Storage: `Balances::Freezes` (r:1 w:0)
143 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
144 /// Storage: `Scheduler::Retries` (r:0 w:50)
145 /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
146 /// The range of component `r` is `[0, 512]`.
147 fn delegate(r: u32, ) -> Weight {
148 // Proof Size summary in bytes:
149 // Measured: `29603 + r * (365 ±0)`
150 // Estimated: `83866 + r * (3411 ±0)`
151 // Minimum execution time: 75_473_000 picoseconds.
152 Weight::from_parts(873_424_384, 0)
153 .saturating_add(Weight::from_parts(0, 83866))
154 // Standard Error: 60_903
155 .saturating_add(Weight::from_parts(21_022_118, 0).saturating_mul(r.into()))
156 .saturating_add(T::DbWeight::get().reads(7))
157 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
158 .saturating_add(T::DbWeight::get().writes(45))
159 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
160 .saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
161 }
162 /// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
163 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
164 /// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
165 /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
166 /// Storage: `Scheduler::Agenda` (r:2 w:2)
167 /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
168 /// Storage: `Scheduler::Retries` (r:0 w:50)
169 /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
170 /// The range of component `r` is `[0, 512]`.
171 fn undelegate(r: u32, ) -> Weight {
172 // Proof Size summary in bytes:
173 // Measured: `29555 + r * (365 ±0)`
174 // Estimated: `83866 + r * (3411 ±0)`
175 // Minimum execution time: 47_752_000 picoseconds.
176 Weight::from_parts(847_009_624, 0)
177 .saturating_add(Weight::from_parts(0, 83866))
178 // Standard Error: 62_499
179 .saturating_add(Weight::from_parts(21_293_933, 0).saturating_mul(r.into()))
180 .saturating_add(T::DbWeight::get().reads(4))
181 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
182 .saturating_add(T::DbWeight::get().writes(43))
183 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
184 .saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
185 }
186 /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
187 /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
188 /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
189 /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
190 /// Storage: `Balances::Locks` (r:1 w:1)
191 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
192 /// Storage: `Balances::Freezes` (r:1 w:0)
193 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
194 fn unlock() -> Weight {
195 // Proof Size summary in bytes:
196 // Measured: `12181`
197 // Estimated: `30706`
198 // Minimum execution time: 107_409_000 picoseconds.
199 Weight::from_parts(114_301_000, 0)
200 .saturating_add(Weight::from_parts(0, 30706))
201 .saturating_add(T::DbWeight::get().reads(4))
202 .saturating_add(T::DbWeight::get().writes(3))
203 }
204}