westend_runtime/weights/polkadot_runtime_common_slots.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 `polkadot_runtime_common::slots`
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=polkadot_runtime_common::slots
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 `polkadot_runtime_common::slots`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> polkadot_runtime_common::slots::WeightInfo for WeightInfo<T> {
54 /// Storage: `Slots::Leases` (r:1 w:1)
55 /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
56 /// Storage: `System::Account` (r:1 w:1)
57 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
58 fn force_lease() -> Weight {
59 // Proof Size summary in bytes:
60 // Measured: `287`
61 // Estimated: `3752`
62 // Minimum execution time: 30_895_000 picoseconds.
63 Weight::from_parts(32_407_000, 0)
64 .saturating_add(Weight::from_parts(0, 3752))
65 .saturating_add(T::DbWeight::get().reads(2))
66 .saturating_add(T::DbWeight::get().writes(2))
67 }
68 /// Storage: `Paras::Parachains` (r:1 w:0)
69 /// Proof: `Paras::Parachains` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
70 /// Storage: `Slots::Leases` (r:101 w:100)
71 /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
72 /// Storage: `Paras::ParaLifecycles` (r:200 w:200)
73 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
74 /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
75 /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
76 /// Storage: `Paras::ActionsQueue` (r:1 w:1)
77 /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
78 /// The range of component `c` is `[0, 100]`.
79 /// The range of component `t` is `[0, 100]`.
80 fn manage_lease_period_start(c: u32, t: u32, ) -> Weight {
81 // Proof Size summary in bytes:
82 // Measured: `561 + c * (20 ±0) + t * (234 ±0)`
83 // Estimated: `4032 + c * (2496 ±0) + t * (2709 ±0)`
84 // Minimum execution time: 864_249_000 picoseconds.
85 Weight::from_parts(871_593_000, 0)
86 .saturating_add(Weight::from_parts(0, 4032))
87 // Standard Error: 106_900
88 .saturating_add(Weight::from_parts(3_456_149, 0).saturating_mul(c.into()))
89 // Standard Error: 106_900
90 .saturating_add(Weight::from_parts(10_757_149, 0).saturating_mul(t.into()))
91 .saturating_add(T::DbWeight::get().reads(4))
92 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
93 .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into())))
94 .saturating_add(T::DbWeight::get().writes(1))
95 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
96 .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(t.into())))
97 .saturating_add(Weight::from_parts(0, 2496).saturating_mul(c.into()))
98 .saturating_add(Weight::from_parts(0, 2709).saturating_mul(t.into()))
99 }
100 /// Storage: `Slots::Leases` (r:1 w:1)
101 /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
102 /// Storage: `System::Account` (r:8 w:8)
103 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
104 fn clear_all_leases() -> Weight {
105 // Proof Size summary in bytes:
106 // Measured: `2759`
107 // Estimated: `21814`
108 // Minimum execution time: 151_565_000 picoseconds.
109 Weight::from_parts(158_584_000, 0)
110 .saturating_add(Weight::from_parts(0, 21814))
111 .saturating_add(T::DbWeight::get().reads(9))
112 .saturating_add(T::DbWeight::get().writes(9))
113 }
114 /// Storage: `Slots::Leases` (r:1 w:0)
115 /// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
116 /// Storage: `Paras::ParaLifecycles` (r:1 w:1)
117 /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
118 /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
119 /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
120 /// Storage: `Paras::ActionsQueue` (r:1 w:1)
121 /// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
122 fn trigger_onboard() -> Weight {
123 // Proof Size summary in bytes:
124 // Measured: `579`
125 // Estimated: `4044`
126 // Minimum execution time: 43_389_000 picoseconds.
127 Weight::from_parts(46_029_000, 0)
128 .saturating_add(Weight::from_parts(0, 4044))
129 .saturating_add(T::DbWeight::get().reads(4))
130 .saturating_add(T::DbWeight::get().writes(2))
131 }
132}