referrerpolicy=no-referrer-when-downgrade

pallet_transaction_storage/
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//! Autogenerated weights for `pallet_transaction_storage`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2024-11-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner-wiukf8gn-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
25
26// Executed Command:
27// ./target/production/substrate-node
28// benchmark
29// pallet
30// --chain=dev
31// --steps=50
32// --repeat=20
33// --pallet=pallet_transaction_storage
34// --no-storage-info
35// --no-median-slopes
36// --no-min-squares
37// --extrinsic=*
38// --wasm-execution=compiled
39// --heap-pages=4096
40// --output=./substrate/frame/transaction-storage/src/weights.rs
41// --header=./substrate/HEADER-APACHE2
42// --template=./substrate/.maintain/frame-weight-template.hbs
43
44#![cfg_attr(rustfmt, rustfmt_skip)]
45#![allow(unused_parens)]
46#![allow(unused_imports)]
47#![allow(missing_docs)]
48
49use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
50use core::marker::PhantomData;
51
52/// Weight functions needed for `pallet_transaction_storage`.
53pub trait WeightInfo {
54	fn store(l: u32, ) -> Weight;
55	fn renew() -> Weight;
56	fn check_proof_max() -> Weight;
57}
58
59/// Weights for `pallet_transaction_storage` using the Substrate node and recommended hardware.
60pub struct SubstrateWeight<T>(PhantomData<T>);
61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
62	/// Storage: `TransactionStorage::ByteFee` (r:1 w:0)
63	/// Proof: `TransactionStorage::ByteFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
64	/// Storage: `TransactionStorage::EntryFee` (r:1 w:0)
65	/// Proof: `TransactionStorage::EntryFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
66	/// Storage: `Balances::Holds` (r:1 w:1)
67	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
68	/// Storage: `TransactionStorage::BlockTransactions` (r:1 w:1)
69	/// Proof: `TransactionStorage::BlockTransactions` (`max_values`: Some(1), `max_size`: Some(36866), added: 37361, mode: `MaxEncodedLen`)
70	/// The range of component `l` is `[1, 8388608]`.
71	fn store(l: u32, ) -> Weight {
72		// Proof Size summary in bytes:
73		//  Measured:  `242`
74		//  Estimated: `38351`
75		// Minimum execution time: 65_899_000 picoseconds.
76		Weight::from_parts(66_814_000, 38351)
77			// Standard Error: 7
78			.saturating_add(Weight::from_parts(7_678, 0).saturating_mul(l.into()))
79			.saturating_add(T::DbWeight::get().reads(4_u64))
80			.saturating_add(T::DbWeight::get().writes(2_u64))
81	}
82	/// Storage: `TransactionStorage::Transactions` (r:1 w:0)
83	/// Proof: `TransactionStorage::Transactions` (`max_values`: None, `max_size`: Some(36886), added: 39361, mode: `MaxEncodedLen`)
84	/// Storage: `TransactionStorage::ByteFee` (r:1 w:0)
85	/// Proof: `TransactionStorage::ByteFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
86	/// Storage: `TransactionStorage::EntryFee` (r:1 w:0)
87	/// Proof: `TransactionStorage::EntryFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
88	/// Storage: `Balances::Holds` (r:1 w:1)
89	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
90	/// Storage: `TransactionStorage::BlockTransactions` (r:1 w:1)
91	/// Proof: `TransactionStorage::BlockTransactions` (`max_values`: Some(1), `max_size`: Some(36866), added: 37361, mode: `MaxEncodedLen`)
92	fn renew() -> Weight {
93		// Proof Size summary in bytes:
94		//  Measured:  `430`
95		//  Estimated: `40351`
96		// Minimum execution time: 87_876_000 picoseconds.
97		Weight::from_parts(91_976_000, 40351)
98			.saturating_add(T::DbWeight::get().reads(5_u64))
99			.saturating_add(T::DbWeight::get().writes(2_u64))
100	}
101	/// Storage: `TransactionStorage::ProofChecked` (r:1 w:1)
102	/// Proof: `TransactionStorage::ProofChecked` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
103	/// Storage: `TransactionStorage::StoragePeriod` (r:1 w:0)
104	/// Proof: `TransactionStorage::StoragePeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
105	/// Storage: `TransactionStorage::ChunkCount` (r:1 w:0)
106	/// Proof: `TransactionStorage::ChunkCount` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
107	/// Storage: `System::ParentHash` (r:1 w:0)
108	/// Proof: `System::ParentHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
109	/// Storage: `TransactionStorage::Transactions` (r:1 w:0)
110	/// Proof: `TransactionStorage::Transactions` (`max_values`: None, `max_size`: Some(36886), added: 39361, mode: `MaxEncodedLen`)
111	fn check_proof_max() -> Weight {
112		// Proof Size summary in bytes:
113		//  Measured:  `37211`
114		//  Estimated: `40351`
115		// Minimum execution time: 78_423_000 picoseconds.
116		Weight::from_parts(82_423_000, 40351)
117			.saturating_add(T::DbWeight::get().reads(5_u64))
118			.saturating_add(T::DbWeight::get().writes(1_u64))
119	}
120}
121
122// For backwards compatibility and tests.
123impl WeightInfo for () {
124	/// Storage: `TransactionStorage::ByteFee` (r:1 w:0)
125	/// Proof: `TransactionStorage::ByteFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
126	/// Storage: `TransactionStorage::EntryFee` (r:1 w:0)
127	/// Proof: `TransactionStorage::EntryFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
128	/// Storage: `Balances::Holds` (r:1 w:1)
129	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
130	/// Storage: `TransactionStorage::BlockTransactions` (r:1 w:1)
131	/// Proof: `TransactionStorage::BlockTransactions` (`max_values`: Some(1), `max_size`: Some(36866), added: 37361, mode: `MaxEncodedLen`)
132	/// The range of component `l` is `[1, 8388608]`.
133	fn store(l: u32, ) -> Weight {
134		// Proof Size summary in bytes:
135		//  Measured:  `242`
136		//  Estimated: `38351`
137		// Minimum execution time: 65_899_000 picoseconds.
138		Weight::from_parts(66_814_000, 38351)
139			// Standard Error: 7
140			.saturating_add(Weight::from_parts(7_678, 0).saturating_mul(l.into()))
141			.saturating_add(RocksDbWeight::get().reads(4_u64))
142			.saturating_add(RocksDbWeight::get().writes(2_u64))
143	}
144	/// Storage: `TransactionStorage::Transactions` (r:1 w:0)
145	/// Proof: `TransactionStorage::Transactions` (`max_values`: None, `max_size`: Some(36886), added: 39361, mode: `MaxEncodedLen`)
146	/// Storage: `TransactionStorage::ByteFee` (r:1 w:0)
147	/// Proof: `TransactionStorage::ByteFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
148	/// Storage: `TransactionStorage::EntryFee` (r:1 w:0)
149	/// Proof: `TransactionStorage::EntryFee` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
150	/// Storage: `Balances::Holds` (r:1 w:1)
151	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
152	/// Storage: `TransactionStorage::BlockTransactions` (r:1 w:1)
153	/// Proof: `TransactionStorage::BlockTransactions` (`max_values`: Some(1), `max_size`: Some(36866), added: 37361, mode: `MaxEncodedLen`)
154	fn renew() -> Weight {
155		// Proof Size summary in bytes:
156		//  Measured:  `430`
157		//  Estimated: `40351`
158		// Minimum execution time: 87_876_000 picoseconds.
159		Weight::from_parts(91_976_000, 40351)
160			.saturating_add(RocksDbWeight::get().reads(5_u64))
161			.saturating_add(RocksDbWeight::get().writes(2_u64))
162	}
163	/// Storage: `TransactionStorage::ProofChecked` (r:1 w:1)
164	/// Proof: `TransactionStorage::ProofChecked` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
165	/// Storage: `TransactionStorage::StoragePeriod` (r:1 w:0)
166	/// Proof: `TransactionStorage::StoragePeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
167	/// Storage: `TransactionStorage::ChunkCount` (r:1 w:0)
168	/// Proof: `TransactionStorage::ChunkCount` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
169	/// Storage: `System::ParentHash` (r:1 w:0)
170	/// Proof: `System::ParentHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
171	/// Storage: `TransactionStorage::Transactions` (r:1 w:0)
172	/// Proof: `TransactionStorage::Transactions` (`max_values`: None, `max_size`: Some(36886), added: 39361, mode: `MaxEncodedLen`)
173	fn check_proof_max() -> Weight {
174		// Proof Size summary in bytes:
175		//  Measured:  `37211`
176		//  Estimated: `40351`
177		// Minimum execution time: 78_423_000 picoseconds.
178		Weight::from_parts(82_423_000, 40351)
179			.saturating_add(RocksDbWeight::get().reads(5_u64))
180			.saturating_add(RocksDbWeight::get().writes(1_u64))
181	}
182}