pallet_on_demand_para/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_on_demand_para`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-09-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `585ee6e9239d`, 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_on_demand_para
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/on-demand/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// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage
62
63#![cfg_attr(rustfmt, rustfmt_skip)]
64#![allow(unused_parens)]
65#![allow(unused_imports)]
66#![allow(missing_docs)]
67#![allow(dead_code)]
68
69use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
70use core::marker::PhantomData;
71
72/// Weight functions needed for `pallet_on_demand_para`.
73pub trait WeightInfo {
74 fn configure() -> Weight;
75 fn place_order() -> Weight;
76 fn on_finalize_with_orders(n: u32, ) -> Weight;
77}
78
79/// Weights for `pallet_on_demand_para` using the Substrate node and recommended hardware.
80pub struct SubstrateWeight<T>(PhantomData<T>);
81impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
82 /// Storage: `OnDemand::PriceConfig` (r:0 w:1)
83 /// Proof: `OnDemand::PriceConfig` (`max_values`: Some(1), `max_size`: Some(28), added: 523, mode: `MaxEncodedLen`)
84 fn configure() -> Weight {
85 // Proof Size summary in bytes:
86 // Measured: `0`
87 // Estimated: `0`
88 // Minimum execution time: 2_400_000 picoseconds.
89 Weight::from_parts(2_742_000, 0)
90 .saturating_add(T::DbWeight::get().writes(1_u64))
91 }
92 /// Storage: `OnDemand::PendingBatch` (r:1 w:1)
93 /// Proof: `OnDemand::PendingBatch` (`max_values`: Some(1), `max_size`: Some(8002), added: 8497, mode: `MaxEncodedLen`)
94 /// Storage: `OnDemand::QueueState` (r:1 w:1)
95 /// Proof: `OnDemand::QueueState` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
96 /// Storage: `OnDemand::PriceConfig` (r:1 w:0)
97 /// Proof: `OnDemand::PriceConfig` (`max_values`: Some(1), `max_size`: Some(28), added: 523, mode: `MaxEncodedLen`)
98 /// Storage: `System::Account` (r:1 w:1)
99 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
100 fn place_order() -> Weight {
101 // Proof Size summary in bytes:
102 // Measured: `56`
103 // Estimated: `9487`
104 // Minimum execution time: 38_720_000 picoseconds.
105 Weight::from_parts(41_150_000, 9487)
106 .saturating_add(T::DbWeight::get().reads(4_u64))
107 .saturating_add(T::DbWeight::get().writes(3_u64))
108 }
109 /// Storage: `OnDemand::PendingBatch` (r:1 w:1)
110 /// Proof: `OnDemand::PendingBatch` (`max_values`: Some(1), `max_size`: Some(8002), added: 8497, mode: `Measured`)
111 /// The range of component `n` is `[1, 100]`.
112 fn on_finalize_with_orders(n: u32, ) -> Weight {
113 // Proof Size summary in bytes:
114 // Measured: `59 + n * (8 ±0)`
115 // Estimated: `1544 + n * (8 ±0)`
116 // Minimum execution time: 6_237_000 picoseconds.
117 Weight::from_parts(7_054_540, 1544)
118 // Standard Error: 76
119 .saturating_add(Weight::from_parts(8_727, 0).saturating_mul(n.into()))
120 .saturating_add(T::DbWeight::get().reads(1_u64))
121 .saturating_add(T::DbWeight::get().writes(1_u64))
122 .saturating_add(Weight::from_parts(0, 8).saturating_mul(n.into()))
123 }
124}
125
126// For backwards compatibility and tests.
127impl WeightInfo for () {
128 /// Storage: `OnDemand::PriceConfig` (r:0 w:1)
129 /// Proof: `OnDemand::PriceConfig` (`max_values`: Some(1), `max_size`: Some(28), added: 523, mode: `MaxEncodedLen`)
130 fn configure() -> Weight {
131 // Proof Size summary in bytes:
132 // Measured: `0`
133 // Estimated: `0`
134 // Minimum execution time: 2_400_000 picoseconds.
135 Weight::from_parts(2_742_000, 0)
136 .saturating_add(RocksDbWeight::get().writes(1_u64))
137 }
138 /// Storage: `OnDemand::PendingBatch` (r:1 w:1)
139 /// Proof: `OnDemand::PendingBatch` (`max_values`: Some(1), `max_size`: Some(8002), added: 8497, mode: `MaxEncodedLen`)
140 /// Storage: `OnDemand::QueueState` (r:1 w:1)
141 /// Proof: `OnDemand::QueueState` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
142 /// Storage: `OnDemand::PriceConfig` (r:1 w:0)
143 /// Proof: `OnDemand::PriceConfig` (`max_values`: Some(1), `max_size`: Some(28), added: 523, mode: `MaxEncodedLen`)
144 /// Storage: `System::Account` (r:1 w:1)
145 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
146 fn place_order() -> Weight {
147 // Proof Size summary in bytes:
148 // Measured: `56`
149 // Estimated: `9487`
150 // Minimum execution time: 38_720_000 picoseconds.
151 Weight::from_parts(41_150_000, 9487)
152 .saturating_add(RocksDbWeight::get().reads(4_u64))
153 .saturating_add(RocksDbWeight::get().writes(3_u64))
154 }
155 /// Storage: `OnDemand::PendingBatch` (r:1 w:1)
156 /// Proof: `OnDemand::PendingBatch` (`max_values`: Some(1), `max_size`: Some(8002), added: 8497, mode: `Measured`)
157 /// The range of component `n` is `[1, 100]`.
158 fn on_finalize_with_orders(n: u32, ) -> Weight {
159 // Proof Size summary in bytes:
160 // Measured: `59 + n * (8 ±0)`
161 // Estimated: `1544 + n * (8 ±0)`
162 // Minimum execution time: 6_237_000 picoseconds.
163 Weight::from_parts(7_054_540, 1544)
164 // Standard Error: 76
165 .saturating_add(Weight::from_parts(8_727, 0).saturating_mul(n.into()))
166 .saturating_add(RocksDbWeight::get().reads(1_u64))
167 .saturating_add(RocksDbWeight::get().writes(1_u64))
168 .saturating_add(Weight::from_parts(0, 8).saturating_mul(n.into()))
169 }
170}