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: 2024-08-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("flashbox_dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./target/release/tanssi-node
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_proxy
34
// --extrinsic
35
// *
36
// --chain=flashbox_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/flashbox_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
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
60
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
61
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
62
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
63
	/// The range of component `p` is `[1, 31]`.
64
	fn proxy(p: u32, ) -> Weight {
65
		// Proof Size summary in bytes:
66
		//  Measured:  `174 + p * (37 ±0)`
67
		//  Estimated: `4706 + p * (37 ±0)`
68
		// Minimum execution time: 22_075_000 picoseconds.
69
		Weight::from_parts(22_834_805, 4706)
70
			// Standard Error: 1_427
71
			.saturating_add(Weight::from_parts(36_889, 0).saturating_mul(p.into()))
72
			.saturating_add(T::DbWeight::get().reads(3_u64))
73
			.saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into()))
74
	}
75
	/// Storage: `Proxy::Proxies` (r:1 w:0)
76
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
77
	/// Storage: `Proxy::Announcements` (r:1 w:1)
78
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
79
	/// Storage: `System::Account` (r:1 w:1)
80
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
81
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
82
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
83
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
84
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
85
	/// The range of component `a` is `[0, 31]`.
86
	/// The range of component `p` is `[1, 31]`.
87
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
88
		// Proof Size summary in bytes:
89
		//  Measured:  `501 + a * (68 ±0) + p * (37 ±0)`
90
		//  Estimated: `5698 + a * (68 ±0) + p * (37 ±0)`
91
		// Minimum execution time: 49_255_000 picoseconds.
92
		Weight::from_parts(50_367_964, 5698)
93
			// Standard Error: 3_785
94
			.saturating_add(Weight::from_parts(155_375, 0).saturating_mul(a.into()))
95
			// Standard Error: 3_910
96
			.saturating_add(Weight::from_parts(30_861, 0).saturating_mul(p.into()))
97
			.saturating_add(T::DbWeight::get().reads(5_u64))
98
			.saturating_add(T::DbWeight::get().writes(2_u64))
99
			.saturating_add(Weight::from_parts(0, 68).saturating_mul(a.into()))
100
			.saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into()))
101
	}
102
	/// Storage: `Proxy::Announcements` (r:1 w:1)
103
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
104
	/// Storage: `System::Account` (r:1 w:1)
105
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
106
	/// The range of component `a` is `[0, 31]`.
107
	/// The range of component `p` is `[1, 31]`.
108
	fn remove_announcement(a: u32, _p: u32, ) -> Weight {
109
		// Proof Size summary in bytes:
110
		//  Measured:  `370 + a * (68 ±0)`
111
		//  Estimated: `5698`
112
		// Minimum execution time: 27_071_000 picoseconds.
113
		Weight::from_parts(28_227_234, 5698)
114
			// Standard Error: 1_412
115
			.saturating_add(Weight::from_parts(159_508, 0).saturating_mul(a.into()))
116
			.saturating_add(T::DbWeight::get().reads(2_u64))
117
			.saturating_add(T::DbWeight::get().writes(2_u64))
118
	}
119
	/// Storage: `Proxy::Announcements` (r:1 w:1)
120
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
121
	/// Storage: `System::Account` (r:1 w:1)
122
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
123
	/// The range of component `a` is `[0, 31]`.
124
	/// The range of component `p` is `[1, 31]`.
125
	fn reject_announcement(a: u32, p: u32, ) -> Weight {
126
		// Proof Size summary in bytes:
127
		//  Measured:  `370 + a * (68 ±0)`
128
		//  Estimated: `5698`
129
		// Minimum execution time: 26_986_000 picoseconds.
130
		Weight::from_parts(27_812_041, 5698)
131
			// Standard Error: 1_313
132
			.saturating_add(Weight::from_parts(169_134, 0).saturating_mul(a.into()))
133
			// Standard Error: 1_356
134
			.saturating_add(Weight::from_parts(4_984, 0).saturating_mul(p.into()))
135
			.saturating_add(T::DbWeight::get().reads(2_u64))
136
			.saturating_add(T::DbWeight::get().writes(2_u64))
137
	}
138
	/// Storage: `Proxy::Proxies` (r:1 w:0)
139
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
140
	/// Storage: `Proxy::Announcements` (r:1 w:1)
141
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
142
	/// Storage: `System::Account` (r:1 w:1)
143
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
144
	/// The range of component `a` is `[0, 31]`.
145
	/// The range of component `p` is `[1, 31]`.
146
	fn announce(a: u32, p: u32, ) -> Weight {
147
		// Proof Size summary in bytes:
148
		//  Measured:  `387 + a * (68 ±0) + p * (37 ±0)`
149
		//  Estimated: `5698`
150
		// Minimum execution time: 35_940_000 picoseconds.
151
		Weight::from_parts(35_998_071, 5698)
152
			// Standard Error: 1_278
153
			.saturating_add(Weight::from_parts(169_907, 0).saturating_mul(a.into()))
154
			// Standard Error: 1_320
155
			.saturating_add(Weight::from_parts(39_099, 0).saturating_mul(p.into()))
156
			.saturating_add(T::DbWeight::get().reads(3_u64))
157
			.saturating_add(T::DbWeight::get().writes(2_u64))
158
	}
159
	/// Storage: `Proxy::Proxies` (r:1 w:1)
160
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
161
	/// The range of component `p` is `[1, 31]`.
162
	fn add_proxy(p: u32, ) -> Weight {
163
		// Proof Size summary in bytes:
164
		//  Measured:  `128 + p * (37 ±0)`
165
		//  Estimated: `4706`
166
		// Minimum execution time: 25_727_000 picoseconds.
167
		Weight::from_parts(26_548_994, 4706)
168
			// Standard Error: 1_000
169
			.saturating_add(Weight::from_parts(38_901, 0).saturating_mul(p.into()))
170
			.saturating_add(T::DbWeight::get().reads(1_u64))
171
			.saturating_add(T::DbWeight::get().writes(1_u64))
172
	}
173
	/// Storage: `Proxy::Proxies` (r:1 w:1)
174
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
175
	/// The range of component `p` is `[1, 31]`.
176
	fn remove_proxy(p: u32, ) -> Weight {
177
		// Proof Size summary in bytes:
178
		//  Measured:  `128 + p * (37 ±0)`
179
		//  Estimated: `4706`
180
		// Minimum execution time: 25_964_000 picoseconds.
181
		Weight::from_parts(26_996_645, 4706)
182
			// Standard Error: 1_695
183
			.saturating_add(Weight::from_parts(34_211, 0).saturating_mul(p.into()))
184
			.saturating_add(T::DbWeight::get().reads(1_u64))
185
			.saturating_add(T::DbWeight::get().writes(1_u64))
186
	}
187
	/// Storage: `Proxy::Proxies` (r:1 w:1)
188
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
189
	/// The range of component `p` is `[1, 31]`.
190
	fn remove_proxies(p: u32, ) -> Weight {
191
		// Proof Size summary in bytes:
192
		//  Measured:  `128 + p * (37 ±0)`
193
		//  Estimated: `4706`
194
		// Minimum execution time: 25_014_000 picoseconds.
195
		Weight::from_parts(25_783_160, 4706)
196
			// Standard Error: 1_049
197
			.saturating_add(Weight::from_parts(34_298, 0).saturating_mul(p.into()))
198
			.saturating_add(T::DbWeight::get().reads(1_u64))
199
			.saturating_add(T::DbWeight::get().writes(1_u64))
200
	}
201
	/// Storage: `Proxy::Proxies` (r:1 w:1)
202
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
203
	/// The range of component `p` is `[1, 31]`.
204
	fn create_pure(p: u32, ) -> Weight {
205
		// Proof Size summary in bytes:
206
		//  Measured:  `140`
207
		//  Estimated: `4706`
208
		// Minimum execution time: 27_762_000 picoseconds.
209
		Weight::from_parts(28_534_658, 4706)
210
			// Standard Error: 1_069
211
			.saturating_add(Weight::from_parts(10_606, 0).saturating_mul(p.into()))
212
			.saturating_add(T::DbWeight::get().reads(1_u64))
213
			.saturating_add(T::DbWeight::get().writes(1_u64))
214
	}
215
	/// Storage: `Proxy::Proxies` (r:1 w:1)
216
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
217
	/// The range of component `p` is `[0, 30]`.
218
	fn kill_pure(p: u32, ) -> Weight {
219
		// Proof Size summary in bytes:
220
		//  Measured:  `165 + p * (37 ±0)`
221
		//  Estimated: `4706`
222
		// Minimum execution time: 26_368_000 picoseconds.
223
		Weight::from_parts(27_224_229, 4706)
224
			// Standard Error: 1_068
225
			.saturating_add(Weight::from_parts(40_461, 0).saturating_mul(p.into()))
226
			.saturating_add(T::DbWeight::get().reads(1_u64))
227
			.saturating_add(T::DbWeight::get().writes(1_u64))
228
	}
229
}