pallet_governed_map/
weights.rs

1
2//! Autogenerated weights for pallet_governed_map
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
5//! DATE: 2025-05-09, 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_governed_map
19// --extrinsic
20// *
21// --steps=50
22// --repeat=20
23// --wasm-execution=compiled
24// --output
25// toolkit/governed-map/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_governed_map.
38pub trait WeightInfo {
39	fn register_changes(l: u32, ) -> Weight;
40	fn set_main_chain_scripts() -> Weight;
41}
42
43/// Weights for pallet_governed_map using the Substrate node and recommended hardware.
44pub struct SubstrateWeight<T>(PhantomData<T>);
45impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
46	/// Storage: `GovernedMap::LastUpdateBlock` (r:1 w:1)
47	/// Proof: `GovernedMap::LastUpdateBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
48	/// Storage: `GovernedMap::MainChainScripts` (r:1 w:0)
49	/// Proof: `GovernedMap::MainChainScripts` (`max_values`: Some(1), `max_size`: Some(150), added: 645, mode: `MaxEncodedLen`)
50	/// Storage: `GovernedMap::Initialized` (r:1 w:1)
51	/// Proof: `GovernedMap::Initialized` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
52	/// Storage: `GovernedMap::Mapping` (r:16 w:16)
53	/// Proof: `GovernedMap::Mapping` (`max_values`: None, `max_size`: Some(588), added: 3063, mode: `MaxEncodedLen`)
54	/// The range of component `l` is `[1, 16]`.
55	fn register_changes(l: u32, ) -> Weight {
56		// Proof Size summary in bytes:
57		//  Measured:  `115`
58		//  Estimated: `1635 + l * (3063 ±0)`
59		// Minimum execution time: 14_000_000 picoseconds.
60		Weight::from_parts(15_000_000, 1635)
61			// Standard Error: 121_312
62			.saturating_add(Weight::from_parts(10_759_247, 0).saturating_mul(l.into()))
63			.saturating_add(T::DbWeight::get().reads(3_u64))
64			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(l.into())))
65			.saturating_add(T::DbWeight::get().writes(2_u64))
66			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(l.into())))
67			.saturating_add(Weight::from_parts(0, 3063).saturating_mul(l.into()))
68	}
69	/// Storage: `GovernedMap::MainChainScripts` (r:0 w:1)
70	/// Proof: `GovernedMap::MainChainScripts` (`max_values`: Some(1), `max_size`: Some(150), added: 645, mode: `MaxEncodedLen`)
71	/// Storage: `GovernedMap::Initialized` (r:0 w:1)
72	/// Proof: `GovernedMap::Initialized` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
73	fn set_main_chain_scripts() -> Weight {
74		// Proof Size summary in bytes:
75		//  Measured:  `0`
76		//  Estimated: `0`
77		// Minimum execution time: 7_000_000 picoseconds.
78		Weight::from_parts(8_000_000, 0)
79			.saturating_add(T::DbWeight::get().writes(2_u64))
80	}
81}
82
83// For backwards compatibility and tests
84impl WeightInfo for () {
85	/// Storage: `GovernedMap::LastUpdateBlock` (r:1 w:1)
86	/// Proof: `GovernedMap::LastUpdateBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
87	/// Storage: `GovernedMap::MainChainScripts` (r:1 w:0)
88	/// Proof: `GovernedMap::MainChainScripts` (`max_values`: Some(1), `max_size`: Some(150), added: 645, mode: `MaxEncodedLen`)
89	/// Storage: `GovernedMap::Initialized` (r:1 w:1)
90	/// Proof: `GovernedMap::Initialized` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
91	/// Storage: `GovernedMap::Mapping` (r:16 w:16)
92	/// Proof: `GovernedMap::Mapping` (`max_values`: None, `max_size`: Some(588), added: 3063, mode: `MaxEncodedLen`)
93	/// The range of component `l` is `[1, 16]`.
94	fn register_changes(l: u32, ) -> Weight {
95		// Proof Size summary in bytes:
96		//  Measured:  `115`
97		//  Estimated: `1635 + l * (3063 ±0)`
98		// Minimum execution time: 14_000_000 picoseconds.
99		Weight::from_parts(15_000_000, 1635)
100			// Standard Error: 121_312
101			.saturating_add(Weight::from_parts(10_759_247, 0).saturating_mul(l.into()))
102			.saturating_add(RocksDbWeight::get().reads(3_u64))
103			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(l.into())))
104			.saturating_add(RocksDbWeight::get().writes(2_u64))
105			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(l.into())))
106			.saturating_add(Weight::from_parts(0, 3063).saturating_mul(l.into()))
107	}
108	/// Storage: `GovernedMap::MainChainScripts` (r:0 w:1)
109	/// Proof: `GovernedMap::MainChainScripts` (`max_values`: Some(1), `max_size`: Some(150), added: 645, mode: `MaxEncodedLen`)
110	/// Storage: `GovernedMap::Initialized` (r:0 w:1)
111	/// Proof: `GovernedMap::Initialized` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
112	fn set_main_chain_scripts() -> Weight {
113		// Proof Size summary in bytes:
114		//  Measured:  `0`
115		//  Estimated: `0`
116		// Minimum execution time: 7_000_000 picoseconds.
117		Weight::from_parts(8_000_000, 0)
118			.saturating_add(RocksDbWeight::get().writes(2_u64))
119	}
120}