pallet_block_production_log/weights.rs
1
2//! Autogenerated weights for pallet_block_production_log
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
5//! DATE: 2025-05-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `MacBookPro.localdomain`, 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/production/wbuild/partner-chains-demo-runtime/partner_chains_demo_runtime.compact.compressed.wasm
17// --pallet
18// pallet_block_production_log
19// --extrinsic
20// *
21// --steps=50
22// --repeat=20
23// --wasm-execution=compiled
24// --output
25// toolkit/block-production-log/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_production_log.
38pub trait WeightInfo {
39 fn append() -> Weight;
40 fn on_finalize() -> Weight;
41}
42
43/// Weights for pallet_block_production_log using the Substrate node and recommended hardware.
44pub struct SubstrateWeight<T>(PhantomData<T>);
45impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
46 /// Storage: `BlockProductionLog::LatestBlock` (r:1 w:1)
47 /// Proof: `BlockProductionLog::LatestBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
48 /// Storage: `BlockProductionLog::CurrentProducer` (r:0 w:1)
49 /// Proof: `BlockProductionLog::CurrentProducer` (`max_values`: Some(1), `max_size`: Some(66), added: 561, mode: `MaxEncodedLen`)
50 fn append() -> Weight {
51 // Proof Size summary in bytes:
52 // Measured: `43`
53 // Estimated: `1489`
54 // Minimum execution time: 3_000_000 picoseconds.
55 Weight::from_parts(4_000_000, 1489)
56 .saturating_add(T::DbWeight::get().reads(1_u64))
57 .saturating_add(T::DbWeight::get().writes(2_u64))
58 }
59 /// Storage: `BlockProductionLog::CurrentProducer` (r:1 w:1)
60 /// Proof: `BlockProductionLog::CurrentProducer` (`max_values`: Some(1), `max_size`: Some(66), added: 561, mode: `MaxEncodedLen`)
61 /// Storage: `Aura::CurrentSlot` (r:1 w:0)
62 /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
63 /// Storage: `BlockProductionLog::Log` (r:1 w:1)
64 /// Proof: `BlockProductionLog::Log` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
65 fn on_finalize() -> Weight {
66 // Proof Size summary in bytes:
67 // Measured: `2705`
68 // Estimated: `4190`
69 // Minimum execution time: 12_000_000 picoseconds.
70 Weight::from_parts(13_000_000, 4190)
71 .saturating_add(T::DbWeight::get().reads(3_u64))
72 .saturating_add(T::DbWeight::get().writes(2_u64))
73 }
74}
75
76// For backwards compatibility and tests
77impl WeightInfo for () {
78 /// Storage: `BlockProductionLog::LatestBlock` (r:1 w:1)
79 /// Proof: `BlockProductionLog::LatestBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
80 /// Storage: `BlockProductionLog::CurrentProducer` (r:0 w:1)
81 /// Proof: `BlockProductionLog::CurrentProducer` (`max_values`: Some(1), `max_size`: Some(66), added: 561, mode: `MaxEncodedLen`)
82 fn append() -> Weight {
83 // Proof Size summary in bytes:
84 // Measured: `43`
85 // Estimated: `1489`
86 // Minimum execution time: 3_000_000 picoseconds.
87 Weight::from_parts(4_000_000, 1489)
88 .saturating_add(RocksDbWeight::get().reads(1_u64))
89 .saturating_add(RocksDbWeight::get().writes(2_u64))
90 }
91 /// Storage: `BlockProductionLog::CurrentProducer` (r:1 w:1)
92 /// Proof: `BlockProductionLog::CurrentProducer` (`max_values`: Some(1), `max_size`: Some(66), added: 561, mode: `MaxEncodedLen`)
93 /// Storage: `Aura::CurrentSlot` (r:1 w:0)
94 /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
95 /// Storage: `BlockProductionLog::Log` (r:1 w:1)
96 /// Proof: `BlockProductionLog::Log` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
97 fn on_finalize() -> Weight {
98 // Proof Size summary in bytes:
99 // Measured: `2705`
100 // Estimated: `4190`
101 // Minimum execution time: 12_000_000 picoseconds.
102 Weight::from_parts(13_000_000, 4190)
103 .saturating_add(RocksDbWeight::get().reads(3_u64))
104 .saturating_add(RocksDbWeight::get().writes(2_u64))
105 }
106}