1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi 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
// Tanssi 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 Tanssi.  If not, see <http://www.gnu.org/licenses/>
16

            
17

            
18
//! Autogenerated weights for pallet_proxy
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2025-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("starlight-dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_proxy
34
// --extrinsic
35
// *
36
// --chain=starlight-dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-runtime-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// tmp/starlight_weights/pallet_proxy.rs
46

            
47
#![cfg_attr(rustfmt, rustfmt_skip)]
48
#![allow(unused_parens)]
49
#![allow(unused_imports)]
50

            
51
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
52
use sp_std::marker::PhantomData;
53

            
54
/// Weights for pallet_proxy using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_proxy::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Proxy::Proxies` (r:1 w:0)
58
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
59
	/// The range of component `p` is `[1, 31]`.
60
	fn proxy(p: u32, ) -> Weight {
61
		// Proof Size summary in bytes:
62
		//  Measured:  `127 + p * (37 ±0)`
63
		//  Estimated: `4706`
64
		// Minimum execution time: 19_453_000 picoseconds.
65
		Weight::from_parts(20_198_197, 4706)
66
			// Standard Error: 1_169
67
			.saturating_add(Weight::from_parts(39_256, 0).saturating_mul(p.into()))
68
			.saturating_add(T::DbWeight::get().reads(1_u64))
69
	}
70
	/// Storage: `Proxy::Proxies` (r:1 w:0)
71
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
72
	/// Storage: `Proxy::Announcements` (r:1 w:1)
73
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
74
	/// Storage: `System::Account` (r:1 w:1)
75
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
76
	/// The range of component `a` is `[0, 31]`.
77
	/// The range of component `p` is `[1, 31]`.
78
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
79
		// Proof Size summary in bytes:
80
		//  Measured:  `488 + a * (68 ±0) + p * (37 ±0)`
81
		//  Estimated: `5698`
82
		// Minimum execution time: 48_488_000 picoseconds.
83
		Weight::from_parts(49_244_730, 5698)
84
			// Standard Error: 1_804
85
			.saturating_add(Weight::from_parts(189_135, 0).saturating_mul(a.into()))
86
			// Standard Error: 1_864
87
			.saturating_add(Weight::from_parts(45_950, 0).saturating_mul(p.into()))
88
			.saturating_add(T::DbWeight::get().reads(3_u64))
89
			.saturating_add(T::DbWeight::get().writes(2_u64))
90
	}
91
	/// Storage: `Proxy::Announcements` (r:1 w:1)
92
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
93
	/// Storage: `System::Account` (r:1 w:1)
94
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
95
	/// The range of component `a` is `[0, 31]`.
96
	/// The range of component `p` is `[1, 31]`.
97
	fn remove_announcement(a: u32, p: u32, ) -> Weight {
98
		// Proof Size summary in bytes:
99
		//  Measured:  `403 + a * (68 ±0)`
100
		//  Estimated: `5698`
101
		// Minimum execution time: 33_142_000 picoseconds.
102
		Weight::from_parts(34_077_257, 5698)
103
			// Standard Error: 1_382
104
			.saturating_add(Weight::from_parts(177_965, 0).saturating_mul(a.into()))
105
			// Standard Error: 1_428
106
			.saturating_add(Weight::from_parts(9_939, 0).saturating_mul(p.into()))
107
			.saturating_add(T::DbWeight::get().reads(2_u64))
108
			.saturating_add(T::DbWeight::get().writes(2_u64))
109
	}
110
	/// Storage: `Proxy::Announcements` (r:1 w:1)
111
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
112
	/// Storage: `System::Account` (r:1 w:1)
113
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
114
	/// The range of component `a` is `[0, 31]`.
115
	/// The range of component `p` is `[1, 31]`.
116
	fn reject_announcement(a: u32, p: u32, ) -> Weight {
117
		// Proof Size summary in bytes:
118
		//  Measured:  `403 + a * (68 ±0)`
119
		//  Estimated: `5698`
120
		// Minimum execution time: 32_753_000 picoseconds.
121
		Weight::from_parts(33_834_942, 5698)
122
			// Standard Error: 1_314
123
			.saturating_add(Weight::from_parts(182_925, 0).saturating_mul(a.into()))
124
			// Standard Error: 1_358
125
			.saturating_add(Weight::from_parts(14_446, 0).saturating_mul(p.into()))
126
			.saturating_add(T::DbWeight::get().reads(2_u64))
127
			.saturating_add(T::DbWeight::get().writes(2_u64))
128
	}
129
	/// Storage: `Proxy::Proxies` (r:1 w:0)
130
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
131
	/// Storage: `Proxy::Announcements` (r:1 w:1)
132
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
133
	/// Storage: `System::Account` (r:1 w:1)
134
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
135
	/// The range of component `a` is `[0, 31]`.
136
	/// The range of component `p` is `[1, 31]`.
137
	fn announce(a: u32, p: u32, ) -> Weight {
138
		// Proof Size summary in bytes:
139
		//  Measured:  `420 + a * (68 ±0) + p * (37 ±0)`
140
		//  Estimated: `5698`
141
		// Minimum execution time: 43_825_000 picoseconds.
142
		Weight::from_parts(44_408_397, 5698)
143
			// Standard Error: 1_691
144
			.saturating_add(Weight::from_parts(174_507, 0).saturating_mul(a.into()))
145
			// Standard Error: 1_747
146
			.saturating_add(Weight::from_parts(36_355, 0).saturating_mul(p.into()))
147
			.saturating_add(T::DbWeight::get().reads(3_u64))
148
			.saturating_add(T::DbWeight::get().writes(2_u64))
149
	}
150
	/// Storage: `Proxy::Proxies` (r:1 w:1)
151
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
152
	/// The range of component `p` is `[1, 31]`.
153
	fn add_proxy(p: u32, ) -> Weight {
154
		// Proof Size summary in bytes:
155
		//  Measured:  `127 + p * (37 ±0)`
156
		//  Estimated: `4706`
157
		// Minimum execution time: 31_950_000 picoseconds.
158
		Weight::from_parts(32_865_274, 4706)
159
			// Standard Error: 1_071
160
			.saturating_add(Weight::from_parts(38_734, 0).saturating_mul(p.into()))
161
			.saturating_add(T::DbWeight::get().reads(1_u64))
162
			.saturating_add(T::DbWeight::get().writes(1_u64))
163
	}
164
	/// Storage: `Proxy::Proxies` (r:1 w:1)
165
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
166
	/// The range of component `p` is `[1, 31]`.
167
	fn remove_proxy(p: u32, ) -> Weight {
168
		// Proof Size summary in bytes:
169
		//  Measured:  `127 + p * (37 ±0)`
170
		//  Estimated: `4706`
171
		// Minimum execution time: 31_721_000 picoseconds.
172
		Weight::from_parts(32_786_188, 4706)
173
			// Standard Error: 1_348
174
			.saturating_add(Weight::from_parts(56_202, 0).saturating_mul(p.into()))
175
			.saturating_add(T::DbWeight::get().reads(1_u64))
176
			.saturating_add(T::DbWeight::get().writes(1_u64))
177
	}
178
	/// Storage: `Proxy::Proxies` (r:1 w:1)
179
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
180
	/// The range of component `p` is `[1, 31]`.
181
	fn remove_proxies(p: u32, ) -> Weight {
182
		// Proof Size summary in bytes:
183
		//  Measured:  `127 + p * (37 ±0)`
184
		//  Estimated: `4706`
185
		// Minimum execution time: 28_912_000 picoseconds.
186
		Weight::from_parts(29_784_581, 4706)
187
			// Standard Error: 1_159
188
			.saturating_add(Weight::from_parts(41_394, 0).saturating_mul(p.into()))
189
			.saturating_add(T::DbWeight::get().reads(1_u64))
190
			.saturating_add(T::DbWeight::get().writes(1_u64))
191
	}
192
	/// Storage: `Proxy::Proxies` (r:1 w:1)
193
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
194
	/// The range of component `p` is `[1, 31]`.
195
	fn create_pure(p: u32, ) -> Weight {
196
		// Proof Size summary in bytes:
197
		//  Measured:  `139`
198
		//  Estimated: `4706`
199
		// Minimum execution time: 34_121_000 picoseconds.
200
		Weight::from_parts(35_259_582, 4706)
201
			// Standard Error: 1_235
202
			.saturating_add(Weight::from_parts(11_015, 0).saturating_mul(p.into()))
203
			.saturating_add(T::DbWeight::get().reads(1_u64))
204
			.saturating_add(T::DbWeight::get().writes(1_u64))
205
	}
206
	/// Storage: `Proxy::Proxies` (r:1 w:1)
207
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
208
	/// The range of component `p` is `[0, 30]`.
209
	fn kill_pure(p: u32, ) -> Weight {
210
		// Proof Size summary in bytes:
211
		//  Measured:  `164 + p * (37 ±0)`
212
		//  Estimated: `4706`
213
		// Minimum execution time: 29_787_000 picoseconds.
214
		Weight::from_parts(30_772_677, 4706)
215
			// Standard Error: 1_231
216
			.saturating_add(Weight::from_parts(43_308, 0).saturating_mul(p.into()))
217
			.saturating_add(T::DbWeight::get().reads(1_u64))
218
			.saturating_add(T::DbWeight::get().writes(1_u64))
219
	}
220
}