referrerpolicy=no-referrer-when-downgrade

pallet_staking_async_ah_client/
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_staking_async_ah_client`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-07-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[1]`, HIGH RANGE: `[1000]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `PAR03662`, CPU: `<UNKNOWN>`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --runtime
49// ./target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm
50// --pallet
51// pallet_staking_async_ah_client
52// --extrinsic
53// process_buffered_offences
54// --steps
55// 50
56// --repeat
57// 20
58// --low
59// 1
60// --high
61// 1000
62// --output
63// ./substrate/frame/staking-async/ah-client/src/weights.rs
64// --header
65// ./substrate/HEADER-APACHE2
66// --template
67// ./substrate/.maintain/frame-weight-template.hbs
68
69#![cfg_attr(rustfmt, rustfmt_skip)]
70#![allow(unused_parens)]
71#![allow(unused_imports)]
72#![allow(missing_docs)]
73#![allow(dead_code)]
74
75use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
76use core::marker::PhantomData;
77
78/// Weight functions needed for `pallet_staking_async_ah_client`.
79pub trait WeightInfo {
80	fn process_buffered_offences(n: u32, ) -> Weight;
81}
82
83/// Weights for `pallet_staking_async_ah_client` using the Substrate node and recommended hardware.
84pub struct SubstrateWeight<T>(PhantomData<T>);
85impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
86	/// Storage: `StakingAhClient::BufferedOffences` (r:1 w:1)
87	/// Proof: `StakingAhClient::BufferedOffences` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
88	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
89	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
90	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
91	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
92	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:0)
93	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
94	/// Storage: `Paras::Heads` (r:1 w:0)
95	/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
96	/// The range of component `n` is `[1, 1000]`.
97	fn process_buffered_offences(n: u32, ) -> Weight {
98		// Proof Size summary in bytes:
99		//  Measured:  `340 + n * (69 ±0)`
100		//  Estimated: `3803 + n * (69 ±0)`
101		// Minimum execution time: 31_000_000 picoseconds.
102		Weight::from_parts(48_047_906, 3803)
103			// Standard Error: 638
104			.saturating_add(Weight::from_parts(112_664, 0).saturating_mul(n.into()))
105			.saturating_add(T::DbWeight::get().reads(5_u64))
106			.saturating_add(T::DbWeight::get().writes(1_u64))
107			.saturating_add(Weight::from_parts(0, 69).saturating_mul(n.into()))
108	}
109}
110
111// For backwards compatibility and tests.
112impl WeightInfo for () {
113	/// Storage: `StakingAhClient::BufferedOffences` (r:1 w:1)
114	/// Proof: `StakingAhClient::BufferedOffences` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
115	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
116	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
117	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
118	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
119	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:0)
120	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
121	/// Storage: `Paras::Heads` (r:1 w:0)
122	/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
123	/// The range of component `n` is `[1, 1000]`.
124	fn process_buffered_offences(n: u32, ) -> Weight {
125		// Proof Size summary in bytes:
126		//  Measured:  `340 + n * (69 ±0)`
127		//  Estimated: `3803 + n * (69 ±0)`
128		// Minimum execution time: 31_000_000 picoseconds.
129		Weight::from_parts(48_047_906, 3803)
130			// Standard Error: 638
131			.saturating_add(Weight::from_parts(112_664, 0).saturating_mul(n.into()))
132			.saturating_add(RocksDbWeight::get().reads(5_u64))
133			.saturating_add(RocksDbWeight::get().writes(1_u64))
134			.saturating_add(Weight::from_parts(0, 69).saturating_mul(n.into()))
135	}
136}