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 46.0.0
5//! DATE: 2025-03-27, 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/sidechain-runtime/sidechain_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}
41
42/// Weights for pallet_block_producer_metadata using the Substrate node and recommended hardware.
43pub struct SubstrateWeight<T>(PhantomData<T>);
44impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
45 /// Storage: `Sidechain::GenesisUtxo` (r:1 w:0)
46 /// Proof: `Sidechain::GenesisUtxo` (`max_values`: Some(1), `max_size`: Some(34), added: 529, mode: `MaxEncodedLen`)
47 /// Storage: `BlockProducerMetadata::BlockProducerMetadataStorage` (r:0 w:1)
48 /// Proof: `BlockProducerMetadata::BlockProducerMetadataStorage` (`max_values`: None, `max_size`: Some(590), added: 3065, mode: `MaxEncodedLen`)
49 fn upsert_metadata() -> Weight {
50 // Proof Size summary in bytes:
51 // Measured: `90`
52 // Estimated: `1519`
53 // Minimum execution time: 203_000_000 picoseconds.
54 Weight::from_parts(209_000_000, 1519)
55 .saturating_add(T::DbWeight::get().reads(1_u64))
56 .saturating_add(T::DbWeight::get().writes(1_u64))
57 }
58}
59
60// For backwards compatibility and tests
61impl WeightInfo for () {
62 /// Storage: `Sidechain::GenesisUtxo` (r:1 w:0)
63 /// Proof: `Sidechain::GenesisUtxo` (`max_values`: Some(1), `max_size`: Some(34), added: 529, mode: `MaxEncodedLen`)
64 /// Storage: `BlockProducerMetadata::BlockProducerMetadataStorage` (r:0 w:1)
65 /// Proof: `BlockProducerMetadata::BlockProducerMetadataStorage` (`max_values`: None, `max_size`: Some(590), added: 3065, mode: `MaxEncodedLen`)
66 fn upsert_metadata() -> Weight {
67 // Proof Size summary in bytes:
68 // Measured: `90`
69 // Estimated: `1519`
70 // Minimum execution time: 203_000_000 picoseconds.
71 Weight::from_parts(209_000_000, 1519)
72 .saturating_add(RocksDbWeight::get().reads(1_u64))
73 .saturating_add(RocksDbWeight::get().writes(1_u64))
74 }
75}