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/moonbase-runtime/moonbase_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/moonbase/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: 17_114_000 picoseconds.
61
		Weight::from_parts(17_802_886, 4310)
62
			// Standard Error: 1_123
63
			.saturating_add(Weight::from_parts(34_893, 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:  `443 + a * (56 ±0) + p * (25 ±0)`
82
		//  Estimated: `5302 + a * (59 ±0) + p * (22 ±0)`
83
		// Minimum execution time: 43_594_000 picoseconds.
84
		Weight::from_parts(45_102_720, 5302)
85
			// Standard Error: 2_615
86
			.saturating_add(Weight::from_parts(167_274, 0).saturating_mul(a.into()))
87
			// Standard Error: 2_702
88
			.saturating_add(Weight::from_parts(14_046, 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, 59).saturating_mul(a.into()))
92
			.saturating_add(Weight::from_parts(0, 22).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:  `329 + a * (56 ±0)`
103
		//  Estimated: `5302`
104
		// Minimum execution time: 25_680_000 picoseconds.
105
		Weight::from_parts(29_366_308, 5302)
106
			// Standard Error: 5_033
107
			.saturating_add(Weight::from_parts(231_463, 0).saturating_mul(a.into()))
108
			.saturating_add(T::DbWeight::get().reads(2_u64))
109
			.saturating_add(T::DbWeight::get().writes(2_u64))
110
	}
111
	/// Storage: `Proxy::Announcements` (r:1 w:1)
112
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
113
	/// Storage: `System::Account` (r:1 w:1)
114
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
115
	/// The range of component `a` is `[0, 31]`.
116
	/// The range of component `p` is `[1, 31]`.
117
	fn reject_announcement(a: u32, _p: u32, ) -> Weight {
118
		// Proof Size summary in bytes:
119
		//  Measured:  `329 + a * (56 ±0)`
120
		//  Estimated: `5302`
121
		// Minimum execution time: 25_994_000 picoseconds.
122
		Weight::from_parts(29_364_433, 5302)
123
			// Standard Error: 5_142
124
			.saturating_add(Weight::from_parts(233_478, 0).saturating_mul(a.into()))
125
			.saturating_add(T::DbWeight::get().reads(2_u64))
126
			.saturating_add(T::DbWeight::get().writes(2_u64))
127
	}
128
	/// Storage: `Proxy::Proxies` (r:1 w:0)
129
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
130
	/// Storage: `Proxy::Announcements` (r:1 w:1)
131
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
132
	/// Storage: `System::Account` (r:1 w:1)
133
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
134
	/// The range of component `a` is `[0, 31]`.
135
	/// The range of component `p` is `[1, 31]`.
136
	fn announce(a: u32, p: u32, ) -> Weight {
137
		// Proof Size summary in bytes:
138
		//  Measured:  `345 + a * (56 ±0) + p * (25 ±0)`
139
		//  Estimated: `5302`
140
		// Minimum execution time: 36_281_000 picoseconds.
141
		Weight::from_parts(37_777_183, 5302)
142
			// Standard Error: 2_465
143
			.saturating_add(Weight::from_parts(178_764, 0).saturating_mul(a.into()))
144
			// Standard Error: 2_547
145
			.saturating_add(Weight::from_parts(13_155, 0).saturating_mul(p.into()))
146
			.saturating_add(T::DbWeight::get().reads(3_u64))
147
			.saturating_add(T::DbWeight::get().writes(2_u64))
148
	}
149
	/// Storage: `Proxy::Proxies` (r:1 w:1)
150
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
151
	/// The range of component `p` is `[1, 31]`.
152
	fn add_proxy(p: u32, ) -> Weight {
153
		// Proof Size summary in bytes:
154
		//  Measured:  `149 + p * (25 ±0)`
155
		//  Estimated: `4310`
156
		// Minimum execution time: 24_898_000 picoseconds.
157
		Weight::from_parts(25_732_760, 4310)
158
			// Standard Error: 1_044
159
			.saturating_add(Weight::from_parts(39_845, 0).saturating_mul(p.into()))
160
			.saturating_add(T::DbWeight::get().reads(1_u64))
161
			.saturating_add(T::DbWeight::get().writes(1_u64))
162
	}
163
	/// Storage: `Proxy::Proxies` (r:1 w:1)
164
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
165
	/// The range of component `p` is `[1, 31]`.
166
	fn remove_proxy(p: u32, ) -> Weight {
167
		// Proof Size summary in bytes:
168
		//  Measured:  `149 + p * (25 ±0)`
169
		//  Estimated: `4310`
170
		// Minimum execution time: 24_555_000 picoseconds.
171
		Weight::from_parts(25_504_787, 4310)
172
			// Standard Error: 1_253
173
			.saturating_add(Weight::from_parts(53_533, 0).saturating_mul(p.into()))
174
			.saturating_add(T::DbWeight::get().reads(1_u64))
175
			.saturating_add(T::DbWeight::get().writes(1_u64))
176
	}
177
	/// Storage: `Proxy::Proxies` (r:1 w:1)
178
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
179
	/// The range of component `p` is `[1, 31]`.
180
	fn remove_proxies(p: u32, ) -> Weight {
181
		// Proof Size summary in bytes:
182
		//  Measured:  `149 + p * (25 ±0)`
183
		//  Estimated: `4310`
184
		// Minimum execution time: 22_594_000 picoseconds.
185
		Weight::from_parts(23_388_217, 4310)
186
			// Standard Error: 1_187
187
			.saturating_add(Weight::from_parts(34_778, 0).saturating_mul(p.into()))
188
			.saturating_add(T::DbWeight::get().reads(1_u64))
189
			.saturating_add(T::DbWeight::get().writes(1_u64))
190
	}
191
	/// Storage: `Proxy::Proxies` (r:1 w:1)
192
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
193
	/// The range of component `p` is `[1, 31]`.
194
	fn create_pure(p: u32, ) -> Weight {
195
		// Proof Size summary in bytes:
196
		//  Measured:  `161`
197
		//  Estimated: `4310`
198
		// Minimum execution time: 26_055_000 picoseconds.
199
		Weight::from_parts(27_201_909, 4310)
200
			// Standard Error: 1_271
201
			.saturating_add(Weight::from_parts(13_569, 0).saturating_mul(p.into()))
202
			.saturating_add(T::DbWeight::get().reads(1_u64))
203
			.saturating_add(T::DbWeight::get().writes(1_u64))
204
	}
205
	/// Storage: `Proxy::Proxies` (r:1 w:1)
206
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
207
	/// The range of component `p` is `[0, 30]`.
208
	fn kill_pure(p: u32, ) -> Weight {
209
		// Proof Size summary in bytes:
210
		//  Measured:  `174 + p * (25 ±0)`
211
		//  Estimated: `4310`
212
		// Minimum execution time: 23_248_000 picoseconds.
213
		Weight::from_parts(24_084_471, 4310)
214
			// Standard Error: 1_054
215
			.saturating_add(Weight::from_parts(32_232, 0).saturating_mul(p.into()))
216
			.saturating_add(T::DbWeight::get().reads(1_u64))
217
			.saturating_add(T::DbWeight::get().writes(1_u64))
218
	}
219
}