1
// Copyright 2024 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8

            
9
// Moonbeam is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13

            
14
// You should have received a copy of the GNU General Public License
15
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17
//! Autogenerated weights for `pallet_proxy`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_proxy
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonbeam/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

            
45
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
46
use sp_std::marker::PhantomData;
47

            
48
/// Weights for `pallet_proxy`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
51
	/// Storage: `Proxy::Proxies` (r:1 w:0)
52
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
53
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
54
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
55
	/// The range of component `p` is `[1, 31]`.
56
	fn proxy(p: u32, ) -> Weight {
57
		// Proof Size summary in bytes:
58
		//  Measured:  `191 + p * (25 ±0)`
59
		//  Estimated: `4310 + p * (25 ±0)`
60
		// Minimum execution time: 19_947_000 picoseconds.
61
		Weight::from_parts(21_072_110, 4310)
62
			// Standard Error: 1_160
63
			.saturating_add(Weight::from_parts(35_972, 0).saturating_mul(p.into()))
64
			.saturating_add(T::DbWeight::get().reads(2_u64))
65
			.saturating_add(Weight::from_parts(0, 25).saturating_mul(p.into()))
66
			// 1 DB read that happen when filtering the proxy call transaction
67
			.saturating_add(T::DbWeight::get().reads(1))
68
	}
69
	/// Storage: `Proxy::Proxies` (r:1 w:0)
70
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
71
	/// Storage: `Proxy::Announcements` (r:1 w:1)
72
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
73
	/// Storage: `System::Account` (r:1 w:1)
74
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
75
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
76
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
77
	/// The range of component `a` is `[0, 31]`.
78
	/// The range of component `p` is `[1, 31]`.
79
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
80
		// Proof Size summary in bytes:
81
		//  Measured:  `481 + a * (56 ±0) + p * (25 ±0)`
82
		//  Estimated: `5302 + a * (58 ±0) + p * (24 ±0)`
83
		// Minimum execution time: 44_853_000 picoseconds.
84
		Weight::from_parts(45_079_241, 5302)
85
			// Standard Error: 2_004
86
			.saturating_add(Weight::from_parts(138_711, 0).saturating_mul(a.into()))
87
			// Standard Error: 2_070
88
			.saturating_add(Weight::from_parts(42_081, 0).saturating_mul(p.into()))
89
			.saturating_add(T::DbWeight::get().reads(4_u64))
90
			.saturating_add(T::DbWeight::get().writes(2_u64))
91
			.saturating_add(Weight::from_parts(0, 58).saturating_mul(a.into()))
92
			.saturating_add(Weight::from_parts(0, 24).saturating_mul(p.into()))
93
	}
94
	/// Storage: `Proxy::Announcements` (r:1 w:1)
95
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
96
	/// Storage: `System::Account` (r:1 w:1)
97
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
98
	/// The range of component `a` is `[0, 31]`.
99
	/// The range of component `p` is `[1, 31]`.
100
	fn remove_announcement(a: u32, p: u32, ) -> Weight {
101
		// Proof Size summary in bytes:
102
		//  Measured:  `367 + a * (56 ±0)`
103
		//  Estimated: `5302`
104
		// Minimum execution time: 30_435_000 picoseconds.
105
		Weight::from_parts(31_028_964, 5302)
106
			// Standard Error: 1_732
107
			.saturating_add(Weight::from_parts(126_513, 0).saturating_mul(a.into()))
108
			// Standard Error: 1_789
109
			.saturating_add(Weight::from_parts(9_594, 0).saturating_mul(p.into()))
110
			.saturating_add(T::DbWeight::get().reads(2_u64))
111
			.saturating_add(T::DbWeight::get().writes(2_u64))
112
	}
113
	/// Storage: `Proxy::Announcements` (r:1 w:1)
114
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
115
	/// Storage: `System::Account` (r:1 w:1)
116
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
117
	/// The range of component `a` is `[0, 31]`.
118
	/// The range of component `p` is `[1, 31]`.
119
	fn reject_announcement(a: u32, p: u32, ) -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `367 + a * (56 ±0)`
122
		//  Estimated: `5302`
123
		// Minimum execution time: 29_869_000 picoseconds.
124
		Weight::from_parts(30_636_508, 5302)
125
			// Standard Error: 1_835
126
			.saturating_add(Weight::from_parts(136_521, 0).saturating_mul(a.into()))
127
			// Standard Error: 1_896
128
			.saturating_add(Weight::from_parts(17_308, 0).saturating_mul(p.into()))
129
			.saturating_add(T::DbWeight::get().reads(2_u64))
130
			.saturating_add(T::DbWeight::get().writes(2_u64))
131
	}
132
	/// Storage: `Proxy::Proxies` (r:1 w:0)
133
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
134
	/// Storage: `Proxy::Announcements` (r:1 w:1)
135
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
136
	/// Storage: `System::Account` (r:1 w:1)
137
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
138
	/// The range of component `a` is `[0, 31]`.
139
	/// The range of component `p` is `[1, 31]`.
140
	fn announce(a: u32, p: u32, ) -> Weight {
141
		// Proof Size summary in bytes:
142
		//  Measured:  `383 + a * (56 ±0) + p * (25 ±0)`
143
		//  Estimated: `5302`
144
		// Minimum execution time: 37_639_000 picoseconds.
145
		Weight::from_parts(37_965_423, 5302)
146
			// Standard Error: 1_777
147
			.saturating_add(Weight::from_parts(148_031, 0).saturating_mul(a.into()))
148
			// Standard Error: 1_836
149
			.saturating_add(Weight::from_parts(47_530, 0).saturating_mul(p.into()))
150
			.saturating_add(T::DbWeight::get().reads(3_u64))
151
			.saturating_add(T::DbWeight::get().writes(2_u64))
152
	}
153
	/// Storage: `Proxy::Proxies` (r:1 w:1)
154
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
155
	/// The range of component `p` is `[1, 31]`.
156
	fn add_proxy(p: u32, ) -> Weight {
157
		// Proof Size summary in bytes:
158
		//  Measured:  `149 + p * (25 ±0)`
159
		//  Estimated: `4310`
160
		// Minimum execution time: 24_558_000 picoseconds.
161
		Weight::from_parts(25_745_541, 4310)
162
			// Standard Error: 1_241
163
			.saturating_add(Weight::from_parts(46_703, 0).saturating_mul(p.into()))
164
			.saturating_add(T::DbWeight::get().reads(1_u64))
165
			.saturating_add(T::DbWeight::get().writes(1_u64))
166
	}
167
	/// Storage: `Proxy::Proxies` (r:1 w:1)
168
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
169
	/// The range of component `p` is `[1, 31]`.
170
	fn remove_proxy(p: u32, ) -> Weight {
171
		// Proof Size summary in bytes:
172
		//  Measured:  `149 + p * (25 ±0)`
173
		//  Estimated: `4310`
174
		// Minimum execution time: 25_162_000 picoseconds.
175
		Weight::from_parts(26_104_145, 4310)
176
			// Standard Error: 1_237
177
			.saturating_add(Weight::from_parts(52_014, 0).saturating_mul(p.into()))
178
			.saturating_add(T::DbWeight::get().reads(1_u64))
179
			.saturating_add(T::DbWeight::get().writes(1_u64))
180
	}
181
	/// Storage: `Proxy::Proxies` (r:1 w:1)
182
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
183
	/// The range of component `p` is `[1, 31]`.
184
	fn remove_proxies(p: u32, ) -> Weight {
185
		// Proof Size summary in bytes:
186
		//  Measured:  `149 + p * (25 ±0)`
187
		//  Estimated: `4310`
188
		// Minimum execution time: 22_907_000 picoseconds.
189
		Weight::from_parts(23_798_628, 4310)
190
			// Standard Error: 1_064
191
			.saturating_add(Weight::from_parts(38_117, 0).saturating_mul(p.into()))
192
			.saturating_add(T::DbWeight::get().reads(1_u64))
193
			.saturating_add(T::DbWeight::get().writes(1_u64))
194
	}
195
	/// Storage: `Proxy::Proxies` (r:1 w:1)
196
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
197
	/// The range of component `p` is `[1, 31]`.
198
	fn create_pure(p: u32, ) -> Weight {
199
		// Proof Size summary in bytes:
200
		//  Measured:  `161`
201
		//  Estimated: `4310`
202
		// Minimum execution time: 26_424_000 picoseconds.
203
		Weight::from_parts(27_490_764, 4310)
204
			// Standard Error: 1_365
205
			.saturating_add(Weight::from_parts(13_712, 0).saturating_mul(p.into()))
206
			.saturating_add(T::DbWeight::get().reads(1_u64))
207
			.saturating_add(T::DbWeight::get().writes(1_u64))
208
	}
209
	/// Storage: `Proxy::Proxies` (r:1 w:1)
210
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
211
	/// The range of component `p` is `[0, 30]`.
212
	fn kill_pure(p: u32, ) -> Weight {
213
		// Proof Size summary in bytes:
214
		//  Measured:  `174 + p * (25 ±0)`
215
		//  Estimated: `4310`
216
		// Minimum execution time: 23_590_000 picoseconds.
217
		Weight::from_parts(24_480_359, 4310)
218
			// Standard Error: 1_091
219
			.saturating_add(Weight::from_parts(42_406, 0).saturating_mul(p.into()))
220
			.saturating_add(T::DbWeight::get().reads(1_u64))
221
			.saturating_add(T::DbWeight::get().writes(1_u64))
222
	}
223
}