pallet_inflation/
weights.rs

1
2// This file is part of Astar.
3
4// Copyright (C) Stake Technologies Pte.Ltd.
5// SPDX-License-Identifier: GPL-3.0-or-later
6
7// Astar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11
12// Astar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License
18// along with Astar. If not, see <http://www.gnu.org/licenses/>.
19
20//! Autogenerated weights for pallet_inflation
21//!
22//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.1
23//! DATE: 2025-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
24//! WORST CASE MAP SIZE: `1000000`
25//! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
26//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("astar-dev"), DB CACHE: 1024
27
28// Executed Command:
29// ./target/release/astar-collator
30// benchmark
31// pallet
32// --chain=astar-dev
33// --steps=50
34// --repeat=20
35// --pallet=pallet_inflation
36// --extrinsic=*
37// --wasm-execution=compiled
38// --heap-pages=4096
39// --output=./benchmark-results/astar-dev/inflation_weights.rs
40// --template=./scripts/templates/weight-template.hbs
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45
46use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
47use core::marker::PhantomData;
48
49/// Weight functions needed for pallet_inflation.
50pub trait WeightInfo {
51	fn force_set_inflation_params() -> Weight;
52	fn force_inflation_recalculation() -> Weight;
53	fn force_readjust_config() -> Weight;
54	fn recalculation() -> Weight;
55	fn hooks_without_recalculation() -> Weight;
56}
57
58/// Weights for pallet_inflation using the Substrate node and recommended hardware.
59pub struct SubstrateWeight<T>(PhantomData<T>);
60impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
61	/// Storage: `Inflation::InflationParams` (r:0 w:1)
62	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
63	fn force_set_inflation_params() -> Weight {
64		// Proof Size summary in bytes:
65		//  Measured:  `0`
66		//  Estimated: `0`
67		// Minimum execution time: 5_887_000 picoseconds.
68		Weight::from_parts(6_038_000, 0)
69			.saturating_add(T::DbWeight::get().writes(1_u64))
70	}
71	/// Storage: `Inflation::InflationParams` (r:1 w:0)
72	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
73	fn force_inflation_recalculation() -> Weight {
74		// Proof Size summary in bytes:
75		//  Measured:  `40`
76		//  Estimated: `1549`
77		// Minimum execution time: 9_411_000 picoseconds.
78		Weight::from_parts(9_539_000, 1549)
79			.saturating_add(T::DbWeight::get().reads(1_u64))
80	}
81	/// Storage: `Inflation::InflationParams` (r:1 w:0)
82	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
83	fn force_readjust_config() -> Weight {
84		// Proof Size summary in bytes:
85		//  Measured:  `40`
86		//  Estimated: `1549`
87		// Minimum execution time: 9_652_000 picoseconds.
88		Weight::from_parts(9_828_000, 1549)
89			.saturating_add(T::DbWeight::get().reads(1_u64))
90	}
91	/// Storage: `Inflation::InflationParams` (r:1 w:0)
92	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
93	fn recalculation() -> Weight {
94		// Proof Size summary in bytes:
95		//  Measured:  `58`
96		//  Estimated: `1549`
97		// Minimum execution time: 9_080_000 picoseconds.
98		Weight::from_parts(9_279_000, 1549)
99			.saturating_add(T::DbWeight::get().reads(1_u64))
100	}
101	/// Storage: `System::Account` (r:2 w:2)
102	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
103	fn hooks_without_recalculation() -> Weight {
104		// Proof Size summary in bytes:
105		//  Measured:  `174`
106		//  Estimated: `6196`
107		// Minimum execution time: 34_984_000 picoseconds.
108		Weight::from_parts(35_493_000, 6196)
109			.saturating_add(T::DbWeight::get().reads(2_u64))
110			.saturating_add(T::DbWeight::get().writes(2_u64))
111	}
112}
113
114// For backwards compatibility and tests
115impl WeightInfo for () {
116	/// Storage: `Inflation::InflationParams` (r:0 w:1)
117	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
118	fn force_set_inflation_params() -> Weight {
119		// Proof Size summary in bytes:
120		//  Measured:  `0`
121		//  Estimated: `0`
122		// Minimum execution time: 5_887_000 picoseconds.
123		Weight::from_parts(6_038_000, 0)
124			.saturating_add(RocksDbWeight::get().writes(1_u64))
125	}
126	/// Storage: `Inflation::InflationParams` (r:1 w:0)
127	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
128	fn force_inflation_recalculation() -> Weight {
129		// Proof Size summary in bytes:
130		//  Measured:  `40`
131		//  Estimated: `1549`
132		// Minimum execution time: 9_411_000 picoseconds.
133		Weight::from_parts(9_539_000, 1549)
134			.saturating_add(RocksDbWeight::get().reads(1_u64))
135	}
136	/// Storage: `Inflation::InflationParams` (r:1 w:0)
137	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
138	fn force_readjust_config() -> Weight {
139		// Proof Size summary in bytes:
140		//  Measured:  `40`
141		//  Estimated: `1549`
142		// Minimum execution time: 9_652_000 picoseconds.
143		Weight::from_parts(9_828_000, 1549)
144			.saturating_add(RocksDbWeight::get().reads(1_u64))
145	}
146	/// Storage: `Inflation::InflationParams` (r:1 w:0)
147	/// Proof: `Inflation::InflationParams` (`max_values`: Some(1), `max_size`: Some(64), added: 559, mode: `MaxEncodedLen`)
148	fn recalculation() -> Weight {
149		// Proof Size summary in bytes:
150		//  Measured:  `58`
151		//  Estimated: `1549`
152		// Minimum execution time: 9_080_000 picoseconds.
153		Weight::from_parts(9_279_000, 1549)
154			.saturating_add(RocksDbWeight::get().reads(1_u64))
155	}
156	/// Storage: `System::Account` (r:2 w:2)
157	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
158	fn hooks_without_recalculation() -> Weight {
159		// Proof Size summary in bytes:
160		//  Measured:  `174`
161		//  Estimated: `6196`
162		// Minimum execution time: 34_984_000 picoseconds.
163		Weight::from_parts(35_493_000, 6196)
164			.saturating_add(RocksDbWeight::get().reads(2_u64))
165			.saturating_add(RocksDbWeight::get().writes(2_u64))
166	}
167}