pallet_emission0/weights.rs
1
2//! Autogenerated weights for `pallet_emission0`
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
5//! DATE: 2025-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `MacBook-Pro-de-Joao.local`, CPU: `<UNKNOWN>`
8//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
9
10// Executed Command:
11// ./target/release/torus-node
12// benchmark
13// pallet
14// --pallet
15// pallet_emission0
16// --chain
17// dev
18// --extrinsic
19// *
20// --steps
21// 50
22// --repeat
23// 20
24// --output
25// pallets/emission0/src/weights.rs
26// --template=./.maintain/frame-weight-template.hbs
27
28#![cfg_attr(rustfmt, rustfmt_skip)]
29#![allow(unused_parens)]
30#![allow(unused_imports)]
31#![allow(missing_docs)]
32
33use polkadot_sdk::{
34 frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}},
35 *,
36};
37use core::marker::PhantomData;
38
39/// Weight functions needed for `pallet_emission0`.
40pub trait WeightInfo {
41 fn set_weights() -> Weight;
42 fn delegate_weight_control() -> Weight;
43 fn regain_weight_control() -> Weight;
44}
45
46/// Weights for `pallet_emission0` using the Substrate node and recommended hardware.
47pub struct SubstrateWeight<T>(PhantomData<T>);
48impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
49 /// Storage: `Governance::Allocators` (r:1 w:0)
50 /// Proof: `Governance::Allocators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
51 /// Storage: `Emission0::WeightControlDelegation` (r:1 w:0)
52 /// Proof: `Emission0::WeightControlDelegation` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
53 /// Storage: `Torus0::Agents` (r:2 w:0)
54 /// Proof: `Torus0::Agents` (`max_values`: None, `max_size`: Some(857), added: 3332, mode: `MaxEncodedLen`)
55 /// Storage: `Governance::Whitelist` (r:2 w:0)
56 /// Proof: `Governance::Whitelist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
57 /// Storage: `Torus0::StakedBy` (r:2 w:0)
58 /// Proof: `Torus0::StakedBy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
59 /// Storage: `Torus0::MinValidatorStake` (r:1 w:0)
60 /// Proof: `Torus0::MinValidatorStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
61 /// Storage: `Emission0::ConsensusMembers` (r:1 w:1)
62 /// Proof: `Emission0::ConsensusMembers` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`)
63 fn set_weights() -> Weight {
64 // Proof Size summary in bytes:
65 // Measured: `610`
66 // Estimated: `7654`
67 // Minimum execution time: 32_000_000 picoseconds.
68 Weight::from_parts(33_000_000, 7654)
69 .saturating_add(T::DbWeight::get().reads(10_u64))
70 .saturating_add(T::DbWeight::get().writes(1_u64))
71 }
72 /// Storage: `Torus0::Agents` (r:2 w:0)
73 /// Proof: `Torus0::Agents` (`max_values`: None, `max_size`: Some(857), added: 3332, mode: `MaxEncodedLen`)
74 /// Storage: `Governance::Whitelist` (r:2 w:0)
75 /// Proof: `Governance::Whitelist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
76 /// Storage: `Governance::Allocators` (r:1 w:0)
77 /// Proof: `Governance::Allocators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
78 /// Storage: `Emission0::WeightControlDelegation` (r:0 w:1)
79 /// Proof: `Emission0::WeightControlDelegation` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
80 fn delegate_weight_control() -> Weight {
81 // Proof Size summary in bytes:
82 // Measured: `325`
83 // Estimated: `7654`
84 // Minimum execution time: 21_000_000 picoseconds.
85 Weight::from_parts(22_000_000, 7654)
86 .saturating_add(T::DbWeight::get().reads(5_u64))
87 .saturating_add(T::DbWeight::get().writes(1_u64))
88 }
89 /// Storage: `Governance::Allocators` (r:1 w:0)
90 /// Proof: `Governance::Allocators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
91 /// Storage: `Emission0::WeightControlDelegation` (r:1 w:1)
92 /// Proof: `Emission0::WeightControlDelegation` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
93 fn regain_weight_control() -> Weight {
94 // Proof Size summary in bytes:
95 // Measured: `333`
96 // Estimated: `3529`
97 // Minimum execution time: 11_000_000 picoseconds.
98 Weight::from_parts(12_000_000, 3529)
99 .saturating_add(T::DbWeight::get().reads(2_u64))
100 .saturating_add(T::DbWeight::get().writes(1_u64))
101 }
102}
103
104// For backwards compatibility and tests.
105impl WeightInfo for () {
106 /// Storage: `Governance::Allocators` (r:1 w:0)
107 /// Proof: `Governance::Allocators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
108 /// Storage: `Emission0::WeightControlDelegation` (r:1 w:0)
109 /// Proof: `Emission0::WeightControlDelegation` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
110 /// Storage: `Torus0::Agents` (r:2 w:0)
111 /// Proof: `Torus0::Agents` (`max_values`: None, `max_size`: Some(857), added: 3332, mode: `MaxEncodedLen`)
112 /// Storage: `Governance::Whitelist` (r:2 w:0)
113 /// Proof: `Governance::Whitelist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
114 /// Storage: `Torus0::StakedBy` (r:2 w:0)
115 /// Proof: `Torus0::StakedBy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
116 /// Storage: `Torus0::MinValidatorStake` (r:1 w:0)
117 /// Proof: `Torus0::MinValidatorStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
118 /// Storage: `Emission0::ConsensusMembers` (r:1 w:1)
119 /// Proof: `Emission0::ConsensusMembers` (`max_values`: None, `max_size`: Some(4294967295), added: 2474, mode: `MaxEncodedLen`)
120 fn set_weights() -> Weight {
121 // Proof Size summary in bytes:
122 // Measured: `610`
123 // Estimated: `7654`
124 // Minimum execution time: 32_000_000 picoseconds.
125 Weight::from_parts(33_000_000, 7654)
126 .saturating_add(RocksDbWeight::get().reads(10_u64))
127 .saturating_add(RocksDbWeight::get().writes(1_u64))
128 }
129 /// Storage: `Torus0::Agents` (r:2 w:0)
130 /// Proof: `Torus0::Agents` (`max_values`: None, `max_size`: Some(857), added: 3332, mode: `MaxEncodedLen`)
131 /// Storage: `Governance::Whitelist` (r:2 w:0)
132 /// Proof: `Governance::Whitelist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
133 /// Storage: `Governance::Allocators` (r:1 w:0)
134 /// Proof: `Governance::Allocators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
135 /// Storage: `Emission0::WeightControlDelegation` (r:0 w:1)
136 /// Proof: `Emission0::WeightControlDelegation` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
137 fn delegate_weight_control() -> Weight {
138 // Proof Size summary in bytes:
139 // Measured: `325`
140 // Estimated: `7654`
141 // Minimum execution time: 21_000_000 picoseconds.
142 Weight::from_parts(22_000_000, 7654)
143 .saturating_add(RocksDbWeight::get().reads(5_u64))
144 .saturating_add(RocksDbWeight::get().writes(1_u64))
145 }
146 /// Storage: `Governance::Allocators` (r:1 w:0)
147 /// Proof: `Governance::Allocators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`)
148 /// Storage: `Emission0::WeightControlDelegation` (r:1 w:1)
149 /// Proof: `Emission0::WeightControlDelegation` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
150 fn regain_weight_control() -> Weight {
151 // Proof Size summary in bytes:
152 // Measured: `333`
153 // Estimated: `3529`
154 // Minimum execution time: 11_000_000 picoseconds.
155 Weight::from_parts(12_000_000, 3529)
156 .saturating_add(RocksDbWeight::get().reads(2_u64))
157 .saturating_add(RocksDbWeight::get().writes(1_u64))
158 }
159}