pallet_indices/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_indices`
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_indices
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/indices/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-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_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
71use core::marker::PhantomData;
72
73/// Weight functions needed for `pallet_indices`.
74pub trait WeightInfo {
75 fn claim() -> Weight;
76 fn transfer() -> Weight;
77 fn free() -> Weight;
78 fn force_transfer() -> Weight;
79 fn freeze() -> Weight;
80 fn poke_deposit() -> Weight;
81}
82
83/// Weights for `pallet_indices` using the Substrate node and recommended hardware.
84pub struct SubstrateWeight<T>(PhantomData<T>);
85impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
86 /// Storage: `Indices::Accounts` (r:1 w:1)
87 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
88 fn claim() -> Weight {
89 // Proof Size summary in bytes:
90 // Measured: `0`
91 // Estimated: `3534`
92 // Minimum execution time: 19_563_000 picoseconds.
93 Weight::from_parts(19_884_000, 3534)
94 .saturating_add(T::DbWeight::get().reads(1_u64))
95 .saturating_add(T::DbWeight::get().writes(1_u64))
96 }
97 /// Storage: `Indices::Accounts` (r:1 w:1)
98 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
99 /// Storage: `System::Account` (r:1 w:1)
100 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
101 fn transfer() -> Weight {
102 // Proof Size summary in bytes:
103 // Measured: `178`
104 // Estimated: `3593`
105 // Minimum execution time: 32_346_000 picoseconds.
106 Weight::from_parts(33_179_000, 3593)
107 .saturating_add(T::DbWeight::get().reads(2_u64))
108 .saturating_add(T::DbWeight::get().writes(2_u64))
109 }
110 /// Storage: `Indices::Accounts` (r:1 w:1)
111 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
112 fn free() -> Weight {
113 // Proof Size summary in bytes:
114 // Measured: `75`
115 // Estimated: `3534`
116 // Minimum execution time: 19_788_000 picoseconds.
117 Weight::from_parts(20_434_000, 3534)
118 .saturating_add(T::DbWeight::get().reads(1_u64))
119 .saturating_add(T::DbWeight::get().writes(1_u64))
120 }
121 /// Storage: `Indices::Accounts` (r:1 w:1)
122 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
123 /// Storage: `System::Account` (r:1 w:1)
124 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
125 fn force_transfer() -> Weight {
126 // Proof Size summary in bytes:
127 // Measured: `177`
128 // Estimated: `3593`
129 // Minimum execution time: 23_211_000 picoseconds.
130 Weight::from_parts(23_690_000, 3593)
131 .saturating_add(T::DbWeight::get().reads(2_u64))
132 .saturating_add(T::DbWeight::get().writes(2_u64))
133 }
134 /// Storage: `Indices::Accounts` (r:1 w:1)
135 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
136 fn freeze() -> Weight {
137 // Proof Size summary in bytes:
138 // Measured: `75`
139 // Estimated: `3534`
140 // Minimum execution time: 22_510_000 picoseconds.
141 Weight::from_parts(23_224_000, 3534)
142 .saturating_add(T::DbWeight::get().reads(1_u64))
143 .saturating_add(T::DbWeight::get().writes(1_u64))
144 }
145 /// Storage: `Indices::Accounts` (r:1 w:1)
146 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
147 fn poke_deposit() -> Weight {
148 // Proof Size summary in bytes:
149 // Measured: `75`
150 // Estimated: `3534`
151 // Minimum execution time: 20_268_000 picoseconds.
152 Weight::from_parts(20_592_000, 3534)
153 .saturating_add(T::DbWeight::get().reads(1_u64))
154 .saturating_add(T::DbWeight::get().writes(1_u64))
155 }
156}
157
158// For backwards compatibility and tests.
159impl WeightInfo for () {
160 /// Storage: `Indices::Accounts` (r:1 w:1)
161 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
162 fn claim() -> Weight {
163 // Proof Size summary in bytes:
164 // Measured: `0`
165 // Estimated: `3534`
166 // Minimum execution time: 19_563_000 picoseconds.
167 Weight::from_parts(19_884_000, 3534)
168 .saturating_add(RocksDbWeight::get().reads(1_u64))
169 .saturating_add(RocksDbWeight::get().writes(1_u64))
170 }
171 /// Storage: `Indices::Accounts` (r:1 w:1)
172 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
173 /// Storage: `System::Account` (r:1 w:1)
174 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
175 fn transfer() -> Weight {
176 // Proof Size summary in bytes:
177 // Measured: `178`
178 // Estimated: `3593`
179 // Minimum execution time: 32_346_000 picoseconds.
180 Weight::from_parts(33_179_000, 3593)
181 .saturating_add(RocksDbWeight::get().reads(2_u64))
182 .saturating_add(RocksDbWeight::get().writes(2_u64))
183 }
184 /// Storage: `Indices::Accounts` (r:1 w:1)
185 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
186 fn free() -> Weight {
187 // Proof Size summary in bytes:
188 // Measured: `75`
189 // Estimated: `3534`
190 // Minimum execution time: 19_788_000 picoseconds.
191 Weight::from_parts(20_434_000, 3534)
192 .saturating_add(RocksDbWeight::get().reads(1_u64))
193 .saturating_add(RocksDbWeight::get().writes(1_u64))
194 }
195 /// Storage: `Indices::Accounts` (r:1 w:1)
196 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
197 /// Storage: `System::Account` (r:1 w:1)
198 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
199 fn force_transfer() -> Weight {
200 // Proof Size summary in bytes:
201 // Measured: `177`
202 // Estimated: `3593`
203 // Minimum execution time: 23_211_000 picoseconds.
204 Weight::from_parts(23_690_000, 3593)
205 .saturating_add(RocksDbWeight::get().reads(2_u64))
206 .saturating_add(RocksDbWeight::get().writes(2_u64))
207 }
208 /// Storage: `Indices::Accounts` (r:1 w:1)
209 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
210 fn freeze() -> Weight {
211 // Proof Size summary in bytes:
212 // Measured: `75`
213 // Estimated: `3534`
214 // Minimum execution time: 22_510_000 picoseconds.
215 Weight::from_parts(23_224_000, 3534)
216 .saturating_add(RocksDbWeight::get().reads(1_u64))
217 .saturating_add(RocksDbWeight::get().writes(1_u64))
218 }
219 /// Storage: `Indices::Accounts` (r:1 w:1)
220 /// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
221 fn poke_deposit() -> Weight {
222 // Proof Size summary in bytes:
223 // Measured: `75`
224 // Estimated: `3534`
225 // Minimum execution time: 20_268_000 picoseconds.
226 Weight::from_parts(20_592_000, 3534)
227 .saturating_add(RocksDbWeight::get().reads(1_u64))
228 .saturating_add(RocksDbWeight::get().writes(1_u64))
229 }
230}