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 42.0.0
20
//! DATE: 2024-10-10, 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: Some("moonbase-dev"), DB CACHE: 1024
24

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

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

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

            
46
/// Weights for `pallet_proxy`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
49
	/// Storage: `Proxy::Proxies` (r:1 w:0)
50
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
51
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
52
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
53
	/// The range of component `p` is `[1, 31]`.
54
	fn proxy(p: u32, ) -> Weight {
55
		// Proof Size summary in bytes:
56
		//  Measured:  `191 + p * (25 ±0)`
57
		//  Estimated: `4310 + p * (25 ±0)`
58
		// Minimum execution time: 14_586_000 picoseconds.
59
		Weight::from_parts(15_377_186, 4310)
60
			// Standard Error: 1_094
61
			.saturating_add(Weight::from_parts(34_865, 0).saturating_mul(p.into()))
62
			.saturating_add(T::DbWeight::get().reads(2_u64))
63
			.saturating_add(Weight::from_parts(0, 25).saturating_mul(p.into()))
64
			// 1 DB read that happen when filtering the proxy call transaction
65
			.saturating_add(T::DbWeight::get().reads(1))
66
	}
67
	/// Storage: `Proxy::Proxies` (r:1 w:0)
68
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
69
	/// Storage: `Proxy::Announcements` (r:1 w:1)
70
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
71
	/// Storage: `System::Account` (r:1 w:1)
72
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
73
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
74
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
75
	/// The range of component `a` is `[0, 31]`.
76
	/// The range of component `p` is `[1, 31]`.
77
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
78
		// Proof Size summary in bytes:
79
		//  Measured:  `443 + a * (56 ±0) + p * (25 ±0)`
80
		//  Estimated: `5302 + a * (60 ±0) + p * (22 ±0)`
81
		// Minimum execution time: 39_155_000 picoseconds.
82
		Weight::from_parts(39_580_029, 5302)
83
			// Standard Error: 2_261
84
			.saturating_add(Weight::from_parts(178_748, 0).saturating_mul(a.into()))
85
			// Standard Error: 2_336
86
			.saturating_add(Weight::from_parts(27_980, 0).saturating_mul(p.into()))
87
			.saturating_add(T::DbWeight::get().reads(4_u64))
88
			.saturating_add(T::DbWeight::get().writes(2_u64))
89
			.saturating_add(Weight::from_parts(0, 60).saturating_mul(a.into()))
90
			.saturating_add(Weight::from_parts(0, 22).saturating_mul(p.into()))
91
	}
92
	/// Storage: `Proxy::Announcements` (r:1 w:1)
93
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
94
	/// Storage: `System::Account` (r:1 w:1)
95
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
96
	/// The range of component `a` is `[0, 31]`.
97
	/// The range of component `p` is `[1, 31]`.
98
	fn remove_announcement(a: u32, _p: u32, ) -> Weight {
99
		// Proof Size summary in bytes:
100
		//  Measured:  `329 + a * (56 ±0)`
101
		//  Estimated: `5302`
102
		// Minimum execution time: 23_473_000 picoseconds.
103
		Weight::from_parts(26_209_989, 5302)
104
			// Standard Error: 3_454
105
			.saturating_add(Weight::from_parts(200_052, 0).saturating_mul(a.into()))
106
			.saturating_add(T::DbWeight::get().reads(2_u64))
107
			.saturating_add(T::DbWeight::get().writes(2_u64))
108
	}
109
	/// Storage: `Proxy::Announcements` (r:1 w:1)
110
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
111
	/// Storage: `System::Account` (r:1 w:1)
112
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
113
	/// The range of component `a` is `[0, 31]`.
114
	/// The range of component `p` is `[1, 31]`.
115
	fn reject_announcement(a: u32, _p: u32, ) -> Weight {
116
		// Proof Size summary in bytes:
117
		//  Measured:  `329 + a * (56 ±0)`
118
		//  Estimated: `5302`
119
		// Minimum execution time: 23_328_000 picoseconds.
120
		Weight::from_parts(26_139_743, 5302)
121
			// Standard Error: 3_496
122
			.saturating_add(Weight::from_parts(203_561, 0).saturating_mul(a.into()))
123
			.saturating_add(T::DbWeight::get().reads(2_u64))
124
			.saturating_add(T::DbWeight::get().writes(2_u64))
125
	}
126
	/// Storage: `Proxy::Proxies` (r:1 w:0)
127
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
128
	/// Storage: `Proxy::Announcements` (r:1 w:1)
129
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
130
	/// Storage: `System::Account` (r:1 w:1)
131
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
132
	/// The range of component `a` is `[0, 31]`.
133
	/// The range of component `p` is `[1, 31]`.
134
	fn announce(a: u32, p: u32, ) -> Weight {
135
		// Proof Size summary in bytes:
136
		//  Measured:  `345 + a * (56 ±0) + p * (25 ±0)`
137
		//  Estimated: `5302`
138
		// Minimum execution time: 33_295_000 picoseconds.
139
		Weight::from_parts(33_799_923, 5302)
140
			// Standard Error: 1_797
141
			.saturating_add(Weight::from_parts(166_234, 0).saturating_mul(a.into()))
142
			// Standard Error: 1_857
143
			.saturating_add(Weight::from_parts(14_785, 0).saturating_mul(p.into()))
144
			.saturating_add(T::DbWeight::get().reads(3_u64))
145
			.saturating_add(T::DbWeight::get().writes(2_u64))
146
	}
147
	/// Storage: `Proxy::Proxies` (r:1 w:1)
148
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
149
	/// The range of component `p` is `[1, 31]`.
150
	fn add_proxy(p: u32, ) -> Weight {
151
		// Proof Size summary in bytes:
152
		//  Measured:  `149 + p * (25 ±0)`
153
		//  Estimated: `4310`
154
		// Minimum execution time: 23_192_000 picoseconds.
155
		Weight::from_parts(23_993_610, 4310)
156
			// Standard Error: 1_053
157
			.saturating_add(Weight::from_parts(37_528, 0).saturating_mul(p.into()))
158
			.saturating_add(T::DbWeight::get().reads(1_u64))
159
			.saturating_add(T::DbWeight::get().writes(1_u64))
160
	}
161
	/// Storage: `Proxy::Proxies` (r:1 w:1)
162
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
163
	/// The range of component `p` is `[1, 31]`.
164
	fn remove_proxy(p: u32, ) -> Weight {
165
		// Proof Size summary in bytes:
166
		//  Measured:  `149 + p * (25 ±0)`
167
		//  Estimated: `4310`
168
		// Minimum execution time: 23_031_000 picoseconds.
169
		Weight::from_parts(23_878_806, 4310)
170
			// Standard Error: 1_163
171
			.saturating_add(Weight::from_parts(43_391, 0).saturating_mul(p.into()))
172
			.saturating_add(T::DbWeight::get().reads(1_u64))
173
			.saturating_add(T::DbWeight::get().writes(1_u64))
174
	}
175
	/// Storage: `Proxy::Proxies` (r:1 w:1)
176
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
177
	/// The range of component `p` is `[1, 31]`.
178
	fn remove_proxies(p: u32, ) -> Weight {
179
		// Proof Size summary in bytes:
180
		//  Measured:  `149 + p * (25 ±0)`
181
		//  Estimated: `4310`
182
		// Minimum execution time: 20_886_000 picoseconds.
183
		Weight::from_parts(21_806_461, 4310)
184
			// Standard Error: 1_004
185
			.saturating_add(Weight::from_parts(28_797, 0).saturating_mul(p.into()))
186
			.saturating_add(T::DbWeight::get().reads(1_u64))
187
			.saturating_add(T::DbWeight::get().writes(1_u64))
188
	}
189
	/// Storage: `Proxy::Proxies` (r:1 w:1)
190
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
191
	/// The range of component `p` is `[1, 31]`.
192
	fn create_pure(p: u32, ) -> Weight {
193
		// Proof Size summary in bytes:
194
		//  Measured:  `161`
195
		//  Estimated: `4310`
196
		// Minimum execution time: 24_541_000 picoseconds.
197
		Weight::from_parts(25_363_398, 4310)
198
			// Standard Error: 1_033
199
			.saturating_add(Weight::from_parts(7_508, 0).saturating_mul(p.into()))
200
			.saturating_add(T::DbWeight::get().reads(1_u64))
201
			.saturating_add(T::DbWeight::get().writes(1_u64))
202
	}
203
	/// Storage: `Proxy::Proxies` (r:1 w:1)
204
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
205
	/// The range of component `p` is `[0, 30]`.
206
	fn kill_pure(p: u32, ) -> Weight {
207
		// Proof Size summary in bytes:
208
		//  Measured:  `174 + p * (25 ±0)`
209
		//  Estimated: `4310`
210
		// Minimum execution time: 21_751_000 picoseconds.
211
		Weight::from_parts(22_497_548, 4310)
212
			// Standard Error: 979
213
			.saturating_add(Weight::from_parts(35_681, 0).saturating_mul(p.into()))
214
			.saturating_add(T::DbWeight::get().reads(1_u64))
215
			.saturating_add(T::DbWeight::get().writes(1_u64))
216
	}
217
}