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-11-12, 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("moonbeam-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbeam-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/moonbeam/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: 16_731_000 picoseconds.
59
		Weight::from_parts(17_541_928, 4310)
60
			// Standard Error: 1_255
61
			.saturating_add(Weight::from_parts(40_367, 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:  `481 + a * (56 ±0) + p * (25 ±0)`
80
		//  Estimated: `5302 + a * (58 ±0) + p * (24 ±0)`
81
		// Minimum execution time: 38_753_000 picoseconds.
82
		Weight::from_parts(38_629_152, 5302)
83
			// Standard Error: 1_941
84
			.saturating_add(Weight::from_parts(147_239, 0).saturating_mul(a.into()))
85
			// Standard Error: 2_005
86
			.saturating_add(Weight::from_parts(45_567, 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, 58).saturating_mul(a.into()))
90
			.saturating_add(Weight::from_parts(0, 24).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:  `367 + a * (56 ±0)`
101
		//  Estimated: `5302`
102
		// Minimum execution time: 25_416_000 picoseconds.
103
		Weight::from_parts(25_952_902, 5302)
104
			// Standard Error: 1_490
105
			.saturating_add(Weight::from_parts(140_938, 0).saturating_mul(a.into()))
106
			// Standard Error: 1_539
107
			.saturating_add(Weight::from_parts(14_977, 0).saturating_mul(p.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:  `367 + a * (56 ±0)`
120
		//  Estimated: `5302`
121
		// Minimum execution time: 25_186_000 picoseconds.
122
		Weight::from_parts(25_692_773, 5302)
123
			// Standard Error: 1_442
124
			.saturating_add(Weight::from_parts(150_181, 0).saturating_mul(a.into()))
125
			// Standard Error: 1_490
126
			.saturating_add(Weight::from_parts(15_757, 0).saturating_mul(p.into()))
127
			.saturating_add(T::DbWeight::get().reads(2_u64))
128
			.saturating_add(T::DbWeight::get().writes(2_u64))
129
	}
130
	/// Storage: `Proxy::Proxies` (r:1 w:0)
131
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
132
	/// Storage: `Proxy::Announcements` (r:1 w:1)
133
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(1837), added: 4312, mode: `MaxEncodedLen`)
134
	/// Storage: `System::Account` (r:1 w:1)
135
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
136
	/// The range of component `a` is `[0, 31]`.
137
	/// The range of component `p` is `[1, 31]`.
138
	fn announce(a: u32, p: u32, ) -> Weight {
139
		// Proof Size summary in bytes:
140
		//  Measured:  `383 + a * (56 ±0) + p * (25 ±0)`
141
		//  Estimated: `5302`
142
		// Minimum execution time: 33_042_000 picoseconds.
143
		Weight::from_parts(32_958_243, 5302)
144
			// Standard Error: 1_697
145
			.saturating_add(Weight::from_parts(140_008, 0).saturating_mul(a.into()))
146
			// Standard Error: 1_753
147
			.saturating_add(Weight::from_parts(32_467, 0).saturating_mul(p.into()))
148
			.saturating_add(T::DbWeight::get().reads(3_u64))
149
			.saturating_add(T::DbWeight::get().writes(2_u64))
150
	}
151
	/// Storage: `Proxy::Proxies` (r:1 w:1)
152
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
153
	/// The range of component `p` is `[1, 31]`.
154
	fn add_proxy(p: u32, ) -> Weight {
155
		// Proof Size summary in bytes:
156
		//  Measured:  `149 + p * (25 ±0)`
157
		//  Estimated: `4310`
158
		// Minimum execution time: 21_848_000 picoseconds.
159
		Weight::from_parts(22_668_810, 4310)
160
			// Standard Error: 1_029
161
			.saturating_add(Weight::from_parts(37_175, 0).saturating_mul(p.into()))
162
			.saturating_add(T::DbWeight::get().reads(1_u64))
163
			.saturating_add(T::DbWeight::get().writes(1_u64))
164
	}
165
	/// Storage: `Proxy::Proxies` (r:1 w:1)
166
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
167
	/// The range of component `p` is `[1, 31]`.
168
	fn remove_proxy(p: u32, ) -> Weight {
169
		// Proof Size summary in bytes:
170
		//  Measured:  `149 + p * (25 ±0)`
171
		//  Estimated: `4310`
172
		// Minimum execution time: 21_691_000 picoseconds.
173
		Weight::from_parts(22_563_870, 4310)
174
			// Standard Error: 1_234
175
			.saturating_add(Weight::from_parts(47_418, 0).saturating_mul(p.into()))
176
			.saturating_add(T::DbWeight::get().reads(1_u64))
177
			.saturating_add(T::DbWeight::get().writes(1_u64))
178
	}
179
	/// Storage: `Proxy::Proxies` (r:1 w:1)
180
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
181
	/// The range of component `p` is `[1, 31]`.
182
	fn remove_proxies(p: u32, ) -> Weight {
183
		// Proof Size summary in bytes:
184
		//  Measured:  `149 + p * (25 ±0)`
185
		//  Estimated: `4310`
186
		// Minimum execution time: 19_815_000 picoseconds.
187
		Weight::from_parts(20_720_039, 4310)
188
			// Standard Error: 1_068
189
			.saturating_add(Weight::from_parts(33_627, 0).saturating_mul(p.into()))
190
			.saturating_add(T::DbWeight::get().reads(1_u64))
191
			.saturating_add(T::DbWeight::get().writes(1_u64))
192
	}
193
	/// Storage: `Proxy::Proxies` (r:1 w:1)
194
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
195
	/// The range of component `p` is `[1, 31]`.
196
	fn create_pure(p: u32, ) -> Weight {
197
		// Proof Size summary in bytes:
198
		//  Measured:  `161`
199
		//  Estimated: `4310`
200
		// Minimum execution time: 23_188_000 picoseconds.
201
		Weight::from_parts(24_144_660, 4310)
202
			// Standard Error: 1_097
203
			.saturating_add(Weight::from_parts(4_699, 0).saturating_mul(p.into()))
204
			.saturating_add(T::DbWeight::get().reads(1_u64))
205
			.saturating_add(T::DbWeight::get().writes(1_u64))
206
	}
207
	/// Storage: `Proxy::Proxies` (r:1 w:1)
208
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`)
209
	/// The range of component `p` is `[0, 30]`.
210
	fn kill_pure(p: u32, ) -> Weight {
211
		// Proof Size summary in bytes:
212
		//  Measured:  `174 + p * (25 ±0)`
213
		//  Estimated: `4310`
214
		// Minimum execution time: 20_329_000 picoseconds.
215
		Weight::from_parts(21_233_410, 4310)
216
			// Standard Error: 953
217
			.saturating_add(Weight::from_parts(38_458, 0).saturating_mul(p.into()))
218
			.saturating_add(T::DbWeight::get().reads(1_u64))
219
			.saturating_add(T::DbWeight::get().writes(1_u64))
220
	}
221
}