referrerpolicy=no-referrer-when-downgrade

asset_hub_westend_runtime/weights/
pallet_conviction_voting.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Cumulus.
3// SPDX-License-Identifier: Apache-2.0
4
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// 	http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17//! Autogenerated weights for `pallet_conviction_voting`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
20//! DATE: 2023-07-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `runner-xerhrdyb-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! EXECUTION: `Some(Wasm)`, WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024
24
25// Executed Command:
26// target/production/polkadot
27// benchmark
28// pallet
29// --steps=50
30// --repeat=20
31// --extrinsic=*
32// --execution=wasm
33// --wasm-execution=compiled
34// --heap-pages=4096
35// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
36// --pallet=pallet_conviction_voting
37// --chain=westend-dev
38// --header=./file_header.txt
39// --output=./runtime/westend/src/weights/
40
41#![cfg_attr(rustfmt, rustfmt_skip)]
42#![allow(unused_parens)]
43#![allow(unused_imports)]
44#![allow(missing_docs)]
45
46use frame_support::{traits::Get, weights::Weight};
47use core::marker::PhantomData;
48
49/// Weight functions for `pallet_conviction_voting`.
50pub struct WeightInfo<T>(PhantomData<T>);
51impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
52	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
53	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
54	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
55	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
56	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
57	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
58	/// Storage: `Balances::Locks` (r:1 w:1)
59	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
60	/// Storage: `Balances::Freezes` (r:1 w:0)
61	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
62	/// Storage: `Scheduler::Agenda` (r:1 w:1)
63	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
64	fn vote_new() -> Weight {
65		// Proof Size summary in bytes:
66		//  Measured:  `13445`
67		//  Estimated: `42428`
68		// Minimum execution time: 152_223_000 picoseconds.
69		Weight::from_parts(162_148_000, 0)
70			.saturating_add(Weight::from_parts(0, 42428))
71			.saturating_add(T::DbWeight::get().reads(6))
72			.saturating_add(T::DbWeight::get().writes(5))
73	}
74	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
75	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
76	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
77	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
78	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
79	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
80	/// Storage: `Balances::Locks` (r:1 w:1)
81	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
82	/// Storage: `Balances::Freezes` (r:1 w:0)
83	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
84	/// Storage: `Scheduler::Agenda` (r:2 w:2)
85	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
86	fn vote_existing() -> Weight {
87		// Proof Size summary in bytes:
88		//  Measured:  `14166`
89		//  Estimated: `83866`
90		// Minimum execution time: 220_361_000 picoseconds.
91		Weight::from_parts(236_478_000, 0)
92			.saturating_add(Weight::from_parts(0, 83866))
93			.saturating_add(T::DbWeight::get().reads(7))
94			.saturating_add(T::DbWeight::get().writes(6))
95	}
96	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
97	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
98	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
99	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
100	/// Storage: `Scheduler::Agenda` (r:2 w:2)
101	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
102	fn remove_vote() -> Weight {
103		// Proof Size summary in bytes:
104		//  Measured:  `13918`
105		//  Estimated: `83866`
106		// Minimum execution time: 198_787_000 picoseconds.
107		Weight::from_parts(204_983_000, 0)
108			.saturating_add(Weight::from_parts(0, 83866))
109			.saturating_add(T::DbWeight::get().reads(4))
110			.saturating_add(T::DbWeight::get().writes(4))
111	}
112	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
113	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
114	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
115	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
116	fn remove_other_vote() -> Weight {
117		// Proof Size summary in bytes:
118		//  Measured:  `13004`
119		//  Estimated: `30706`
120		// Minimum execution time: 88_469_000 picoseconds.
121		Weight::from_parts(95_942_000, 0)
122			.saturating_add(Weight::from_parts(0, 30706))
123			.saturating_add(T::DbWeight::get().reads(2))
124			.saturating_add(T::DbWeight::get().writes(1))
125	}
126	/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
127	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
128	/// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
129	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
130	/// Storage: `Scheduler::Agenda` (r:2 w:2)
131	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
132	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
133	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
134	/// Storage: `Balances::Locks` (r:1 w:1)
135	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
136	/// Storage: `Balances::Freezes` (r:1 w:0)
137	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
138	/// The range of component `r` is `[0, 512]`.
139	fn delegate(r: u32, ) -> Weight {
140		// Proof Size summary in bytes:
141		//  Measured:  `29640 + r * (365 ±0)`
142		//  Estimated: `83866 + r * (3411 ±0)`
143		// Minimum execution time: 79_951_000 picoseconds.
144		Weight::from_parts(1_844_983_097, 0)
145			.saturating_add(Weight::from_parts(0, 83866))
146			// Standard Error: 160_158
147			.saturating_add(Weight::from_parts(43_973_863, 0).saturating_mul(r.into()))
148			.saturating_add(T::DbWeight::get().reads(7))
149			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
150			.saturating_add(T::DbWeight::get().writes(6))
151			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
152			.saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
153	}
154	/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
155	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
156	/// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
157	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
158	/// Storage: `Scheduler::Agenda` (r:2 w:2)
159	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
160	/// The range of component `r` is `[0, 512]`.
161	fn undelegate(r: u32, ) -> Weight {
162		// Proof Size summary in bytes:
163		//  Measured:  `29555 + r * (365 ±0)`
164		//  Estimated: `83866 + r * (3411 ±0)`
165		// Minimum execution time: 47_976_000 picoseconds.
166		Weight::from_parts(1_877_857_335, 0)
167			.saturating_add(Weight::from_parts(0, 83866))
168			// Standard Error: 168_477
169			.saturating_add(Weight::from_parts(43_303_902, 0).saturating_mul(r.into()))
170			.saturating_add(T::DbWeight::get().reads(4))
171			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
172			.saturating_add(T::DbWeight::get().writes(4))
173			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
174			.saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
175	}
176	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
177	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
178	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
179	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
180	/// Storage: `Balances::Locks` (r:1 w:1)
181	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
182	/// Storage: `Balances::Freezes` (r:1 w:0)
183	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
184	fn unlock() -> Weight {
185		// Proof Size summary in bytes:
186		//  Measured:  `12218`
187		//  Estimated: `30706`
188		// Minimum execution time: 102_868_000 picoseconds.
189		Weight::from_parts(110_438_000, 0)
190			.saturating_add(Weight::from_parts(0, 30706))
191			.saturating_add(T::DbWeight::get().reads(4))
192			.saturating_add(T::DbWeight::get().writes(3))
193	}
194}