pallet_block_producer_metadata/
weights.rs

1
2//! Autogenerated weights for pallet_block_producer_metadata
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 47.0.0
5//! DATE: 2025-06-30, STEPS: `500`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `Nikolaoss-MacBook-Pro.local`, CPU: `<UNKNOWN>`
8//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
9
10// Executed Command:
11// frame-omni-bencher
12// v1
13// benchmark
14// pallet
15// --runtime
16// target/release/wbuild/partner-chains-demo-runtime/partner_chains_demo_runtime.compact.compressed.wasm
17// --pallet
18// pallet_block_producer_metadata
19// --extrinsic
20// *
21// --steps=500
22// --repeat=200
23// --wasm-execution=compiled
24// --output
25// toolkit/block-producer-metadata/pallet/src/weights.rs
26// --template
27// .maintain/frame-weight-template.hbs
28
29#![cfg_attr(rustfmt, rustfmt_skip)]
30#![allow(unused_parens)]
31#![allow(unused_imports)]
32#![allow(missing_docs)]
33
34use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
35use core::marker::PhantomData;
36
37/// Weight functions needed for pallet_block_producer_metadata.
38pub trait WeightInfo {
39	fn upsert_metadata() -> Weight;
40	fn delete_metadata() -> Weight;
41}
42
43/// Weights for pallet_block_producer_metadata using the Substrate node and recommended hardware.
44pub struct SubstrateWeight<T>(PhantomData<T>);
45impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
46	/// Storage: `Sidechain::GenesisUtxo` (r:1 w:0)
47	/// Proof: `Sidechain::GenesisUtxo` (`max_values`: Some(1), `max_size`: Some(34), added: 529, mode: `MaxEncodedLen`)
48	/// Storage: `Timestamp::Now` (r:1 w:0)
49	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
50	/// Storage: `BlockProducerMetadata::BlockProducerMetadataStorage` (r:1 w:1)
51	/// Proof: `BlockProducerMetadata::BlockProducerMetadataStorage` (`max_values`: None, `max_size`: Some(638), added: 3113, mode: `MaxEncodedLen`)
52	/// Storage: `System::Account` (r:1 w:1)
53	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
54	/// Storage: `Balances::Holds` (r:1 w:1)
55	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
56	fn upsert_metadata() -> Weight {
57		// Proof Size summary in bytes:
58		//  Measured:  `203`
59		//  Estimated: `4103`
60		// Minimum execution time: 231_000_000 picoseconds.
61		Weight::from_parts(234_000_000, 4103)
62			.saturating_add(T::DbWeight::get().reads(5_u64))
63			.saturating_add(T::DbWeight::get().writes(3_u64))
64	}
65	/// Storage: `Sidechain::GenesisUtxo` (r:1 w:0)
66	/// Proof: `Sidechain::GenesisUtxo` (`max_values`: Some(1), `max_size`: Some(34), added: 529, mode: `MaxEncodedLen`)
67	/// Storage: `Timestamp::Now` (r:1 w:0)
68	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
69	/// Storage: `BlockProducerMetadata::BlockProducerMetadataStorage` (r:1 w:1)
70	/// Proof: `BlockProducerMetadata::BlockProducerMetadataStorage` (`max_values`: None, `max_size`: Some(638), added: 3113, mode: `MaxEncodedLen`)
71	/// Storage: `System::Account` (r:1 w:1)
72	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
73	/// Storage: `Balances::Holds` (r:1 w:1)
74	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
75	fn delete_metadata() -> Weight {
76		// Proof Size summary in bytes:
77		//  Measured:  `282`
78		//  Estimated: `4103`
79		// Minimum execution time: 216_000_000 picoseconds.
80		Weight::from_parts(221_000_000, 4103)
81			.saturating_add(T::DbWeight::get().reads(5_u64))
82			.saturating_add(T::DbWeight::get().writes(3_u64))
83	}
84}
85
86// For backwards compatibility and tests
87impl WeightInfo for () {
88	/// Storage: `Sidechain::GenesisUtxo` (r:1 w:0)
89	/// Proof: `Sidechain::GenesisUtxo` (`max_values`: Some(1), `max_size`: Some(34), added: 529, mode: `MaxEncodedLen`)
90	/// Storage: `Timestamp::Now` (r:1 w:0)
91	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
92	/// Storage: `BlockProducerMetadata::BlockProducerMetadataStorage` (r:1 w:1)
93	/// Proof: `BlockProducerMetadata::BlockProducerMetadataStorage` (`max_values`: None, `max_size`: Some(638), added: 3113, mode: `MaxEncodedLen`)
94	/// Storage: `System::Account` (r:1 w:1)
95	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
96	/// Storage: `Balances::Holds` (r:1 w:1)
97	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
98	fn upsert_metadata() -> Weight {
99		// Proof Size summary in bytes:
100		//  Measured:  `203`
101		//  Estimated: `4103`
102		// Minimum execution time: 231_000_000 picoseconds.
103		Weight::from_parts(234_000_000, 4103)
104			.saturating_add(RocksDbWeight::get().reads(5_u64))
105			.saturating_add(RocksDbWeight::get().writes(3_u64))
106	}
107	/// Storage: `Sidechain::GenesisUtxo` (r:1 w:0)
108	/// Proof: `Sidechain::GenesisUtxo` (`max_values`: Some(1), `max_size`: Some(34), added: 529, mode: `MaxEncodedLen`)
109	/// Storage: `Timestamp::Now` (r:1 w:0)
110	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
111	/// Storage: `BlockProducerMetadata::BlockProducerMetadataStorage` (r:1 w:1)
112	/// Proof: `BlockProducerMetadata::BlockProducerMetadataStorage` (`max_values`: None, `max_size`: Some(638), added: 3113, mode: `MaxEncodedLen`)
113	/// Storage: `System::Account` (r:1 w:1)
114	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
115	/// Storage: `Balances::Holds` (r:1 w:1)
116	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
117	fn delete_metadata() -> Weight {
118		// Proof Size summary in bytes:
119		//  Measured:  `282`
120		//  Estimated: `4103`
121		// Minimum execution time: 216_000_000 picoseconds.
122		Weight::from_parts(221_000_000, 4103)
123			.saturating_add(RocksDbWeight::get().reads(5_u64))
124			.saturating_add(RocksDbWeight::get().writes(3_u64))
125	}
126}