pallet_permission0/weights.rs
1
2//! Autogenerated weights for `pallet_permission0`
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_permission0
16// --chain
17// dev
18// --extrinsic
19// *
20// --steps
21// 50
22// --repeat
23// 20
24// --output
25// pallets/permission0/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_permission0`.
40pub trait WeightInfo {
41 fn grant_emission_permission() -> Weight;
42 fn revoke_permission() -> Weight;
43 fn execute_permission() -> Weight;
44 fn toggle_permission_accumulation() -> Weight;
45 fn enforcement_execute_permission() -> Weight;
46 fn set_enforcement_authority() -> Weight;
47 fn grant_curator_permission() -> Weight;
48}
49
50/// Weights for `pallet_permission0` using the Substrate node and recommended hardware.
51pub struct SubstrateWeight<T>(PhantomData<T>);
52impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
53 /// Storage: `Torus0::Agents` (r:3 w:0)
54 /// Proof: `Torus0::Agents` (`max_values`: None, `max_size`: Some(857), added: 3332, mode: `MaxEncodedLen`)
55 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:1 w:1)
56 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
57 /// Storage: `Permission0::Permissions` (r:1 w:1)
58 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
59 /// Storage: `Permission0::PermissionsByParticipants` (r:1 w:1)
60 /// Proof: `Permission0::PermissionsByParticipants` (`max_values`: None, `max_size`: Some(3266), added: 5741, mode: `MaxEncodedLen`)
61 /// Storage: `Permission0::PermissionsByGrantor` (r:1 w:1)
62 /// Proof: `Permission0::PermissionsByGrantor` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
63 /// Storage: `Permission0::PermissionsByGrantee` (r:1 w:1)
64 /// Proof: `Permission0::PermissionsByGrantee` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
65 fn grant_emission_permission() -> Weight {
66 // Proof Size summary in bytes:
67 // Measured: `279`
68 // Estimated: `11000`
69 // Minimum execution time: 35_000_000 picoseconds.
70 Weight::from_parts(35_000_000, 11000)
71 .saturating_add(T::DbWeight::get().reads(8_u64))
72 .saturating_add(T::DbWeight::get().writes(5_u64))
73 }
74 /// Storage: `Permission0::Permissions` (r:1 w:1)
75 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
76 /// Storage: `Permission0::PermissionsByParticipants` (r:1 w:1)
77 /// Proof: `Permission0::PermissionsByParticipants` (`max_values`: None, `max_size`: Some(3266), added: 5741, mode: `MaxEncodedLen`)
78 /// Storage: `Permission0::PermissionsByGrantor` (r:1 w:1)
79 /// Proof: `Permission0::PermissionsByGrantor` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
80 /// Storage: `Permission0::PermissionsByGrantee` (r:1 w:1)
81 /// Proof: `Permission0::PermissionsByGrantee` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
82 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:0 w:1)
83 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
84 /// Storage: `Permission0::RevocationTracking` (r:0 w:1)
85 /// Proof: `Permission0::RevocationTracking` (`max_values`: None, `max_size`: Some(353), added: 2828, mode: `MaxEncodedLen`)
86 fn revoke_permission() -> Weight {
87 // Proof Size summary in bytes:
88 // Measured: `590`
89 // Estimated: `11000`
90 // Minimum execution time: 30_000_000 picoseconds.
91 Weight::from_parts(31_000_000, 11000)
92 .saturating_add(T::DbWeight::get().reads(4_u64))
93 .saturating_add(T::DbWeight::get().writes(6_u64))
94 }
95 /// Storage: `Permission0::Permissions` (r:1 w:1)
96 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
97 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:2 w:1)
98 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
99 /// Storage: `System::Account` (r:1 w:0)
100 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
101 fn execute_permission() -> Weight {
102 // Proof Size summary in bytes:
103 // Measured: `546`
104 // Estimated: `11000`
105 // Minimum execution time: 41_000_000 picoseconds.
106 Weight::from_parts(42_000_000, 11000)
107 .saturating_add(T::DbWeight::get().reads(4_u64))
108 .saturating_add(T::DbWeight::get().writes(2_u64))
109 }
110 /// Storage: `Permission0::Permissions` (r:1 w:1)
111 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
112 /// Storage: `Permission0::EnforcementTracking` (r:0 w:1)
113 /// Proof: `Permission0::EnforcementTracking` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
114 fn toggle_permission_accumulation() -> Weight {
115 // Proof Size summary in bytes:
116 // Measured: `356`
117 // Estimated: `11000`
118 // Minimum execution time: 14_000_000 picoseconds.
119 Weight::from_parts(15_000_000, 11000)
120 .saturating_add(T::DbWeight::get().reads(1_u64))
121 .saturating_add(T::DbWeight::get().writes(2_u64))
122 }
123 /// Storage: `Permission0::Permissions` (r:1 w:1)
124 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
125 /// Storage: `Permission0::EnforcementTracking` (r:1 w:1)
126 /// Proof: `Permission0::EnforcementTracking` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
127 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:2 w:1)
128 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
129 /// Storage: `System::Account` (r:1 w:0)
130 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
131 fn enforcement_execute_permission() -> Weight {
132 // Proof Size summary in bytes:
133 // Measured: `583`
134 // Estimated: `11000`
135 // Minimum execution time: 47_000_000 picoseconds.
136 Weight::from_parts(47_000_000, 11000)
137 .saturating_add(T::DbWeight::get().reads(5_u64))
138 .saturating_add(T::DbWeight::get().writes(3_u64))
139 }
140 /// Storage: `Permission0::Permissions` (r:1 w:1)
141 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
142 fn set_enforcement_authority() -> Weight {
143 // Proof Size summary in bytes:
144 // Measured: `356`
145 // Estimated: `11000`
146 // Minimum execution time: 16_000_000 picoseconds.
147 Weight::from_parts(17_000_000, 11000)
148 .saturating_add(T::DbWeight::get().reads(1_u64))
149 .saturating_add(T::DbWeight::get().writes(1_u64))
150 }
151 /// Storage: `Permission0::PermissionsByGrantee` (r:1 w:1)
152 /// Proof: `Permission0::PermissionsByGrantee` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
153 /// Storage: `Permission0::Permissions` (r:1 w:1)
154 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
155 /// Storage: `Permission0::PermissionsByParticipants` (r:1 w:1)
156 /// Proof: `Permission0::PermissionsByParticipants` (`max_values`: None, `max_size`: Some(3266), added: 5741, mode: `MaxEncodedLen`)
157 /// Storage: `Permission0::PermissionsByGrantor` (r:1 w:1)
158 /// Proof: `Permission0::PermissionsByGrantor` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
159 fn grant_curator_permission() -> Weight {
160 // Proof Size summary in bytes:
161 // Measured: `42`
162 // Estimated: `11000`
163 // Minimum execution time: 18_000_000 picoseconds.
164 Weight::from_parts(19_000_000, 11000)
165 .saturating_add(T::DbWeight::get().reads(4_u64))
166 .saturating_add(T::DbWeight::get().writes(4_u64))
167 }
168}
169
170// For backwards compatibility and tests.
171impl WeightInfo for () {
172 /// Storage: `Torus0::Agents` (r:3 w:0)
173 /// Proof: `Torus0::Agents` (`max_values`: None, `max_size`: Some(857), added: 3332, mode: `MaxEncodedLen`)
174 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:1 w:1)
175 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
176 /// Storage: `Permission0::Permissions` (r:1 w:1)
177 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
178 /// Storage: `Permission0::PermissionsByParticipants` (r:1 w:1)
179 /// Proof: `Permission0::PermissionsByParticipants` (`max_values`: None, `max_size`: Some(3266), added: 5741, mode: `MaxEncodedLen`)
180 /// Storage: `Permission0::PermissionsByGrantor` (r:1 w:1)
181 /// Proof: `Permission0::PermissionsByGrantor` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
182 /// Storage: `Permission0::PermissionsByGrantee` (r:1 w:1)
183 /// Proof: `Permission0::PermissionsByGrantee` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
184 fn grant_emission_permission() -> Weight {
185 // Proof Size summary in bytes:
186 // Measured: `279`
187 // Estimated: `11000`
188 // Minimum execution time: 35_000_000 picoseconds.
189 Weight::from_parts(35_000_000, 11000)
190 .saturating_add(RocksDbWeight::get().reads(8_u64))
191 .saturating_add(RocksDbWeight::get().writes(5_u64))
192 }
193 /// Storage: `Permission0::Permissions` (r:1 w:1)
194 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
195 /// Storage: `Permission0::PermissionsByParticipants` (r:1 w:1)
196 /// Proof: `Permission0::PermissionsByParticipants` (`max_values`: None, `max_size`: Some(3266), added: 5741, mode: `MaxEncodedLen`)
197 /// Storage: `Permission0::PermissionsByGrantor` (r:1 w:1)
198 /// Proof: `Permission0::PermissionsByGrantor` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
199 /// Storage: `Permission0::PermissionsByGrantee` (r:1 w:1)
200 /// Proof: `Permission0::PermissionsByGrantee` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
201 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:0 w:1)
202 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
203 /// Storage: `Permission0::RevocationTracking` (r:0 w:1)
204 /// Proof: `Permission0::RevocationTracking` (`max_values`: None, `max_size`: Some(353), added: 2828, mode: `MaxEncodedLen`)
205 fn revoke_permission() -> Weight {
206 // Proof Size summary in bytes:
207 // Measured: `590`
208 // Estimated: `11000`
209 // Minimum execution time: 30_000_000 picoseconds.
210 Weight::from_parts(31_000_000, 11000)
211 .saturating_add(RocksDbWeight::get().reads(4_u64))
212 .saturating_add(RocksDbWeight::get().writes(6_u64))
213 }
214 /// Storage: `Permission0::Permissions` (r:1 w:1)
215 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
216 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:2 w:1)
217 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
218 /// Storage: `System::Account` (r:1 w:0)
219 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
220 fn execute_permission() -> Weight {
221 // Proof Size summary in bytes:
222 // Measured: `546`
223 // Estimated: `11000`
224 // Minimum execution time: 41_000_000 picoseconds.
225 Weight::from_parts(42_000_000, 11000)
226 .saturating_add(RocksDbWeight::get().reads(4_u64))
227 .saturating_add(RocksDbWeight::get().writes(2_u64))
228 }
229 /// Storage: `Permission0::Permissions` (r:1 w:1)
230 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
231 /// Storage: `Permission0::EnforcementTracking` (r:0 w:1)
232 /// Proof: `Permission0::EnforcementTracking` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
233 fn toggle_permission_accumulation() -> Weight {
234 // Proof Size summary in bytes:
235 // Measured: `356`
236 // Estimated: `11000`
237 // Minimum execution time: 14_000_000 picoseconds.
238 Weight::from_parts(15_000_000, 11000)
239 .saturating_add(RocksDbWeight::get().reads(1_u64))
240 .saturating_add(RocksDbWeight::get().writes(2_u64))
241 }
242 /// Storage: `Permission0::Permissions` (r:1 w:1)
243 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
244 /// Storage: `Permission0::EnforcementTracking` (r:1 w:1)
245 /// Proof: `Permission0::EnforcementTracking` (`max_values`: None, `max_size`: Some(355), added: 2830, mode: `MaxEncodedLen`)
246 /// Storage: `Permission0::AccumulatedStreamAmounts` (r:2 w:1)
247 /// Proof: `Permission0::AccumulatedStreamAmounts` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
248 /// Storage: `System::Account` (r:1 w:0)
249 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
250 fn enforcement_execute_permission() -> Weight {
251 // Proof Size summary in bytes:
252 // Measured: `583`
253 // Estimated: `11000`
254 // Minimum execution time: 47_000_000 picoseconds.
255 Weight::from_parts(47_000_000, 11000)
256 .saturating_add(RocksDbWeight::get().reads(5_u64))
257 .saturating_add(RocksDbWeight::get().writes(3_u64))
258 }
259 /// Storage: `Permission0::Permissions` (r:1 w:1)
260 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
261 fn set_enforcement_authority() -> Weight {
262 // Proof Size summary in bytes:
263 // Measured: `356`
264 // Estimated: `11000`
265 // Minimum execution time: 16_000_000 picoseconds.
266 Weight::from_parts(17_000_000, 11000)
267 .saturating_add(RocksDbWeight::get().reads(1_u64))
268 .saturating_add(RocksDbWeight::get().writes(1_u64))
269 }
270 /// Storage: `Permission0::PermissionsByGrantee` (r:1 w:1)
271 /// Proof: `Permission0::PermissionsByGrantee` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
272 /// Storage: `Permission0::Permissions` (r:1 w:1)
273 /// Proof: `Permission0::Permissions` (`max_values`: None, `max_size`: Some(7535), added: 10010, mode: `MaxEncodedLen`)
274 /// Storage: `Permission0::PermissionsByParticipants` (r:1 w:1)
275 /// Proof: `Permission0::PermissionsByParticipants` (`max_values`: None, `max_size`: Some(3266), added: 5741, mode: `MaxEncodedLen`)
276 /// Storage: `Permission0::PermissionsByGrantor` (r:1 w:1)
277 /// Proof: `Permission0::PermissionsByGrantor` (`max_values`: None, `max_size`: Some(3234), added: 5709, mode: `MaxEncodedLen`)
278 fn grant_curator_permission() -> Weight {
279 // Proof Size summary in bytes:
280 // Measured: `42`
281 // Estimated: `11000`
282 // Minimum execution time: 18_000_000 picoseconds.
283 Weight::from_parts(19_000_000, 11000)
284 .saturating_add(RocksDbWeight::get().reads(4_u64))
285 .saturating_add(RocksDbWeight::get().writes(4_u64))
286 }
287}