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 42.0.0
21
//! DATE: 2024-09-25, 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
789
	fn proxy(p: u32, ) -> Weight {
61
789
		// Proof Size summary in bytes:
62
789
		//  Measured:  `127 + p * (37 ±0)`
63
789
		//  Estimated: `4706`
64
789
		// Minimum execution time: 16_347_000 picoseconds.
65
789
		Weight::from_parts(17_005_832, 4706)
66
789
			// Standard Error: 999
67
789
			.saturating_add(Weight::from_parts(40_743, 0).saturating_mul(p.into()))
68
789
			.saturating_add(T::DbWeight::get().reads(1_u64))
69
789
	}
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
999
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
79
999
		// Proof Size summary in bytes:
80
999
		//  Measured:  `454 + a * (68 ±0) + p * (37 ±0)`
81
999
		//  Estimated: `5698`
82
999
		// Minimum execution time: 45_769_000 picoseconds.
83
999
		Weight::from_parts(46_062_878, 5698)
84
999
			// Standard Error: 1_914
85
999
			.saturating_add(Weight::from_parts(184_010, 0).saturating_mul(a.into()))
86
999
			// Standard Error: 1_977
87
999
			.saturating_add(Weight::from_parts(38_504, 0).saturating_mul(p.into()))
88
999
			.saturating_add(T::DbWeight::get().reads(3_u64))
89
999
			.saturating_add(T::DbWeight::get().writes(2_u64))
90
999
	}
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
294
	fn remove_announcement(a: u32, p: u32, ) -> Weight {
98
294
		// Proof Size summary in bytes:
99
294
		//  Measured:  `369 + a * (68 ±0)`
100
294
		//  Estimated: `5698`
101
294
		// Minimum execution time: 31_620_000 picoseconds.
102
294
		Weight::from_parts(32_912_962, 5698)
103
294
			// Standard Error: 3_858
104
294
			.saturating_add(Weight::from_parts(159_798, 0).saturating_mul(a.into()))
105
294
			// Standard Error: 3_986
106
294
			.saturating_add(Weight::from_parts(4_103, 0).saturating_mul(p.into()))
107
294
			.saturating_add(T::DbWeight::get().reads(2_u64))
108
294
			.saturating_add(T::DbWeight::get().writes(2_u64))
109
294
	}
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
201
	fn reject_announcement(a: u32, p: u32, ) -> Weight {
117
201
		// Proof Size summary in bytes:
118
201
		//  Measured:  `369 + a * (68 ±0)`
119
201
		//  Estimated: `5698`
120
201
		// Minimum execution time: 31_695_000 picoseconds.
121
201
		Weight::from_parts(32_902_515, 5698)
122
201
			// Standard Error: 3_857
123
201
			.saturating_add(Weight::from_parts(158_212, 0).saturating_mul(a.into()))
124
201
			// Standard Error: 3_985
125
201
			.saturating_add(Weight::from_parts(2_567, 0).saturating_mul(p.into()))
126
201
			.saturating_add(T::DbWeight::get().reads(2_u64))
127
201
			.saturating_add(T::DbWeight::get().writes(2_u64))
128
201
	}
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
276
	fn announce(a: u32, p: u32, ) -> Weight {
138
276
		// Proof Size summary in bytes:
139
276
		//  Measured:  `386 + a * (68 ±0) + p * (37 ±0)`
140
276
		//  Estimated: `5698`
141
276
		// Minimum execution time: 40_414_000 picoseconds.
142
276
		Weight::from_parts(40_712_037, 5698)
143
276
			// Standard Error: 1_631
144
276
			.saturating_add(Weight::from_parts(179_834, 0).saturating_mul(a.into()))
145
276
			// Standard Error: 1_685
146
276
			.saturating_add(Weight::from_parts(36_652, 0).saturating_mul(p.into()))
147
276
			.saturating_add(T::DbWeight::get().reads(3_u64))
148
276
			.saturating_add(T::DbWeight::get().writes(2_u64))
149
276
	}
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
5436
	fn add_proxy(p: u32, ) -> Weight {
154
5436
		// Proof Size summary in bytes:
155
5436
		//  Measured:  `127 + p * (37 ±0)`
156
5436
		//  Estimated: `4706`
157
5436
		// Minimum execution time: 28_561_000 picoseconds.
158
5436
		Weight::from_parts(29_218_284, 4706)
159
5436
			// Standard Error: 949
160
5436
			.saturating_add(Weight::from_parts(46_535, 0).saturating_mul(p.into()))
161
5436
			.saturating_add(T::DbWeight::get().reads(1_u64))
162
5436
			.saturating_add(T::DbWeight::get().writes(1_u64))
163
5436
	}
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
453
	fn remove_proxy(p: u32, ) -> Weight {
168
453
		// Proof Size summary in bytes:
169
453
		//  Measured:  `127 + p * (37 ±0)`
170
453
		//  Estimated: `4706`
171
453
		// Minimum execution time: 28_725_000 picoseconds.
172
453
		Weight::from_parts(29_538_639, 4706)
173
453
			// Standard Error: 1_125
174
453
			.saturating_add(Weight::from_parts(50_669, 0).saturating_mul(p.into()))
175
453
			.saturating_add(T::DbWeight::get().reads(1_u64))
176
453
			.saturating_add(T::DbWeight::get().writes(1_u64))
177
453
	}
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
183
	fn remove_proxies(p: u32, ) -> Weight {
182
183
		// Proof Size summary in bytes:
183
183
		//  Measured:  `127 + p * (37 ±0)`
184
183
		//  Estimated: `4706`
185
183
		// Minimum execution time: 25_948_000 picoseconds.
186
183
		Weight::from_parts(26_661_680, 4706)
187
183
			// Standard Error: 1_049
188
183
			.saturating_add(Weight::from_parts(43_223, 0).saturating_mul(p.into()))
189
183
			.saturating_add(T::DbWeight::get().reads(1_u64))
190
183
			.saturating_add(T::DbWeight::get().writes(1_u64))
191
183
	}
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
669
	fn create_pure(p: u32, ) -> Weight {
196
669
		// Proof Size summary in bytes:
197
669
		//  Measured:  `139`
198
669
		//  Estimated: `4706`
199
669
		// Minimum execution time: 30_668_000 picoseconds.
200
669
		Weight::from_parts(31_332_030, 4706)
201
669
			// Standard Error: 1_052
202
669
			.saturating_add(Weight::from_parts(12_779, 0).saturating_mul(p.into()))
203
669
			.saturating_add(T::DbWeight::get().reads(1_u64))
204
669
			.saturating_add(T::DbWeight::get().writes(1_u64))
205
669
	}
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
390
	fn kill_pure(p: u32, ) -> Weight {
210
390
		// Proof Size summary in bytes:
211
390
		//  Measured:  `164 + p * (37 ±0)`
212
390
		//  Estimated: `4706`
213
390
		// Minimum execution time: 26_675_000 picoseconds.
214
390
		Weight::from_parts(27_858_055, 4706)
215
390
			// Standard Error: 1_245
216
390
			.saturating_add(Weight::from_parts(44_727, 0).saturating_mul(p.into()))
217
390
			.saturating_add(T::DbWeight::get().reads(1_u64))
218
390
			.saturating_add(T::DbWeight::get().writes(1_u64))
219
390
	}
220
}