referrerpolicy=no-referrer-when-downgrade

polkadot_runtime_parachains/dmp/
weights.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_parachains::dmp`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 54.0.0
20//! DATE: 2026-04-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `Mac`, CPU: `<UNKNOWN>`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --runtime
31// target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm
32// --steps
33// 50
34// --repeat
35// 20
36// --min-duration
37// 10
38// --all
39// --pallet
40// polkadot_runtime_parachains::dmp
41// --output
42// polkadot/runtime/parachains/src/dmp/weights.rs
43// --template
44// substrate/.maintain/frame-weight-template.hbs
45
46#![cfg_attr(rustfmt, rustfmt_skip)]
47#![allow(unused_parens)]
48#![allow(unused_imports)]
49#![allow(missing_docs)]
50#![allow(dead_code)]
51
52use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
53use core::marker::PhantomData;
54
55/// Weight functions needed for `polkadot_runtime_parachains::dmp`.
56pub trait WeightInfo {
57	fn lazy_delete_some() -> Weight;
58	fn migrate_v0_to_v1_step_base() -> Weight;
59	fn migrate_v0_to_v1_step_iter() -> Weight;
60	fn migrate_v0_to_v1_step_msg() -> Weight;
61}
62
63/// Weights for `polkadot_runtime_parachains::dmp` using the Substrate node and recommended hardware.
64pub struct SubstrateWeight<T>(PhantomData<T>);
65impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
66	/// Storage: `Dmp::DownwardMessageQueueLazyDelete` (r:2 w:1)
67	/// Proof: `Dmp::DownwardMessageQueueLazyDelete` (`max_values`: None, `max_size`: None, mode: `Measured`)
68	/// Storage: `Dmp::DownwardMessageQueuePages` (r:0 w:3)
69	/// Proof: `Dmp::DownwardMessageQueuePages` (`max_values`: None, `max_size`: None, mode: `Measured`)
70	fn lazy_delete_some() -> Weight {
71		// Proof Size summary in bytes:
72		//  Measured:  `206`
73		//  Estimated: `6146`
74		// Minimum execution time: 8_000_000 picoseconds.
75		Weight::from_parts(10_000_000, 6146)
76			.saturating_add(T::DbWeight::get().reads(2_u64))
77			.saturating_add(T::DbWeight::get().writes(4_u64))
78	}
79	/// Storage: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:1 w:0)
80	/// Proof: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:1 w:0)
81	fn migrate_v0_to_v1_step_base() -> Weight {
82		// Proof Size summary in bytes:
83		//  Measured:  `175`
84		//  Estimated: `3640`
85		// Minimum execution time: 2_000_000 picoseconds.
86		Weight::from_parts(3_000_000, 3640)
87			.saturating_add(T::DbWeight::get().reads(1_u64))
88	}
89	/// Storage: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:2 w:1)
90	/// Proof: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:2 w:1)
91	/// Storage: `Dmp::DownwardMessageQueueMeta` (r:1 w:1)
92	/// Proof: `Dmp::DownwardMessageQueueMeta` (`max_values`: None, `max_size`: None, mode: `Measured`)
93	/// Storage: `Dmp::DownwardMessageQueuePages` (r:0 w:1)
94	/// Proof: `Dmp::DownwardMessageQueuePages` (`max_values`: None, `max_size`: None, mode: `Measured`)
95	fn migrate_v0_to_v1_step_iter() -> Weight {
96		// Proof Size summary in bytes:
97		//  Measured:  `1048801`
98		//  Estimated: `1054741`
99		// Minimum execution time: 413_000_000 picoseconds.
100		Weight::from_parts(471_000_000, 1054741)
101			.saturating_add(T::DbWeight::get().reads(3_u64))
102			.saturating_add(T::DbWeight::get().writes(3_u64))
103	}
104	/// Storage: `Dmp::DownwardMessageQueuePages` (r:0 w:1)
105	/// Proof: `Dmp::DownwardMessageQueuePages` (`max_values`: None, `max_size`: None, mode: `Measured`)
106	fn migrate_v0_to_v1_step_msg() -> Weight {
107		// Proof Size summary in bytes:
108		//  Measured:  `0`
109		//  Estimated: `0`
110		// Minimum execution time: 87_000_000 picoseconds.
111		Weight::from_parts(98_000_000, 0)
112			.saturating_add(T::DbWeight::get().writes(1_u64))
113	}
114}
115
116// For backwards compatibility and tests.
117impl WeightInfo for () {
118	/// Storage: `Dmp::DownwardMessageQueueLazyDelete` (r:2 w:1)
119	/// Proof: `Dmp::DownwardMessageQueueLazyDelete` (`max_values`: None, `max_size`: None, mode: `Measured`)
120	/// Storage: `Dmp::DownwardMessageQueuePages` (r:0 w:3)
121	/// Proof: `Dmp::DownwardMessageQueuePages` (`max_values`: None, `max_size`: None, mode: `Measured`)
122	fn lazy_delete_some() -> Weight {
123		// Proof Size summary in bytes:
124		//  Measured:  `206`
125		//  Estimated: `6146`
126		// Minimum execution time: 8_000_000 picoseconds.
127		Weight::from_parts(10_000_000, 6146)
128			.saturating_add(RocksDbWeight::get().reads(2_u64))
129			.saturating_add(RocksDbWeight::get().writes(4_u64))
130	}
131	/// Storage: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:1 w:0)
132	/// Proof: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:1 w:0)
133	fn migrate_v0_to_v1_step_base() -> Weight {
134		// Proof Size summary in bytes:
135		//  Measured:  `175`
136		//  Estimated: `3640`
137		// Minimum execution time: 2_000_000 picoseconds.
138		Weight::from_parts(3_000_000, 3640)
139			.saturating_add(RocksDbWeight::get().reads(1_u64))
140	}
141	/// Storage: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:2 w:1)
142	/// Proof: UNKNOWN KEY `0x63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57` (r:2 w:1)
143	/// Storage: `Dmp::DownwardMessageQueueMeta` (r:1 w:1)
144	/// Proof: `Dmp::DownwardMessageQueueMeta` (`max_values`: None, `max_size`: None, mode: `Measured`)
145	/// Storage: `Dmp::DownwardMessageQueuePages` (r:0 w:1)
146	/// Proof: `Dmp::DownwardMessageQueuePages` (`max_values`: None, `max_size`: None, mode: `Measured`)
147	fn migrate_v0_to_v1_step_iter() -> Weight {
148		// Proof Size summary in bytes:
149		//  Measured:  `1048801`
150		//  Estimated: `1054741`
151		// Minimum execution time: 413_000_000 picoseconds.
152		Weight::from_parts(471_000_000, 1054741)
153			.saturating_add(RocksDbWeight::get().reads(3_u64))
154			.saturating_add(RocksDbWeight::get().writes(3_u64))
155	}
156	/// Storage: `Dmp::DownwardMessageQueuePages` (r:0 w:1)
157	/// Proof: `Dmp::DownwardMessageQueuePages` (`max_values`: None, `max_size`: None, mode: `Measured`)
158	fn migrate_v0_to_v1_step_msg() -> Weight {
159		// Proof Size summary in bytes:
160		//  Measured:  `0`
161		//  Estimated: `0`
162		// Minimum execution time: 87_000_000 picoseconds.
163		Weight::from_parts(98_000_000, 0)
164			.saturating_add(RocksDbWeight::get().writes(1_u64))
165	}
166}