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("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=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/dancebox_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
128
	fn proxy(p: u32, ) -> Weight {
65
128
		// Proof Size summary in bytes:
66
128
		//  Measured:  `208 + p * (37 ±0)`
67
128
		//  Estimated: `4706 + p * (37 ±0)`
68
128
		// Minimum execution time: 21_725_000 picoseconds.
69
128
		Weight::from_parts(22_568_434, 4706)
70
128
			// Standard Error: 1_576
71
128
			.saturating_add(Weight::from_parts(45_203, 0).saturating_mul(p.into()))
72
128
			.saturating_add(T::DbWeight::get().reads(3_u64))
73
128
			.saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into()))
74
128
	}
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
16
	fn proxy_announced(a: u32, p: u32, ) -> Weight {
88
16
		// Proof Size summary in bytes:
89
16
		//  Measured:  `535 + a * (68 ±0) + p * (37 ±0)`
90
16
		//  Estimated: `5698 + a * (68 ±0) + p * (37 ±0)`
91
16
		// Minimum execution time: 49_622_000 picoseconds.
92
16
		Weight::from_parts(50_650_822, 5698)
93
16
			// Standard Error: 3_928
94
16
			.saturating_add(Weight::from_parts(138_462, 0).saturating_mul(a.into()))
95
16
			// Standard Error: 4_058
96
16
			.saturating_add(Weight::from_parts(27_289, 0).saturating_mul(p.into()))
97
16
			.saturating_add(T::DbWeight::get().reads(5_u64))
98
16
			.saturating_add(T::DbWeight::get().writes(2_u64))
99
16
			.saturating_add(Weight::from_parts(0, 68).saturating_mul(a.into()))
100
16
			.saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into()))
101
16
	}
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: 26_904_000 picoseconds.
113
		Weight::from_parts(27_727_249, 5698)
114
			// Standard Error: 1_443
115
			.saturating_add(Weight::from_parts(158_477, 0).saturating_mul(a.into()))
116
			// Standard Error: 1_491
117
			.saturating_add(Weight::from_parts(7_741, 0).saturating_mul(p.into()))
118
			.saturating_add(T::DbWeight::get().reads(2_u64))
119
			.saturating_add(T::DbWeight::get().writes(2_u64))
120
	}
121
	/// Storage: `Proxy::Announcements` (r:1 w:1)
122
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
123
	/// Storage: `System::Account` (r:1 w:1)
124
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
125
	/// The range of component `a` is `[0, 31]`.
126
	/// The range of component `p` is `[1, 31]`.
127
16
	fn reject_announcement(a: u32, p: u32, ) -> Weight {
128
16
		// Proof Size summary in bytes:
129
16
		//  Measured:  `370 + a * (68 ±0)`
130
16
		//  Estimated: `5698`
131
16
		// Minimum execution time: 27_005_000 picoseconds.
132
16
		Weight::from_parts(27_733_787, 5698)
133
16
			// Standard Error: 1_416
134
16
			.saturating_add(Weight::from_parts(157_421, 0).saturating_mul(a.into()))
135
16
			// Standard Error: 1_463
136
16
			.saturating_add(Weight::from_parts(8_296, 0).saturating_mul(p.into()))
137
16
			.saturating_add(T::DbWeight::get().reads(2_u64))
138
16
			.saturating_add(T::DbWeight::get().writes(2_u64))
139
16
	}
140
	/// Storage: `Proxy::Proxies` (r:1 w:0)
141
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
142
	/// Storage: `Proxy::Announcements` (r:1 w:1)
143
	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
144
	/// Storage: `System::Account` (r:1 w:1)
145
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
146
	/// The range of component `a` is `[0, 31]`.
147
	/// The range of component `p` is `[1, 31]`.
148
16
	fn announce(a: u32, p: u32, ) -> Weight {
149
16
		// Proof Size summary in bytes:
150
16
		//  Measured:  `387 + a * (68 ±0) + p * (37 ±0)`
151
16
		//  Estimated: `5698`
152
16
		// Minimum execution time: 36_007_000 picoseconds.
153
16
		Weight::from_parts(35_733_693, 5698)
154
16
			// Standard Error: 1_358
155
16
			.saturating_add(Weight::from_parts(164_895, 0).saturating_mul(a.into()))
156
16
			// Standard Error: 1_404
157
16
			.saturating_add(Weight::from_parts(41_711, 0).saturating_mul(p.into()))
158
16
			.saturating_add(T::DbWeight::get().reads(3_u64))
159
16
			.saturating_add(T::DbWeight::get().writes(2_u64))
160
16
	}
161
	/// Storage: `Proxy::Proxies` (r:1 w:1)
162
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
163
	/// The range of component `p` is `[1, 31]`.
164
88
	fn add_proxy(p: u32, ) -> Weight {
165
88
		// Proof Size summary in bytes:
166
88
		//  Measured:  `128 + p * (37 ±0)`
167
88
		//  Estimated: `4706`
168
88
		// Minimum execution time: 25_819_000 picoseconds.
169
88
		Weight::from_parts(26_574_914, 4706)
170
88
			// Standard Error: 981
171
88
			.saturating_add(Weight::from_parts(40_403, 0).saturating_mul(p.into()))
172
88
			.saturating_add(T::DbWeight::get().reads(1_u64))
173
88
			.saturating_add(T::DbWeight::get().writes(1_u64))
174
88
	}
175
	/// Storage: `Proxy::Proxies` (r:1 w:1)
176
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
177
	/// The range of component `p` is `[1, 31]`.
178
	fn remove_proxy(p: u32, ) -> Weight {
179
		// Proof Size summary in bytes:
180
		//  Measured:  `128 + p * (37 ±0)`
181
		//  Estimated: `4706`
182
		// Minimum execution time: 25_814_000 picoseconds.
183
		Weight::from_parts(26_694_655, 4706)
184
			// Standard Error: 1_873
185
			.saturating_add(Weight::from_parts(42_500, 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(1241), added: 3716, mode: `MaxEncodedLen`)
191
	/// The range of component `p` is `[1, 31]`.
192
	fn remove_proxies(p: u32, ) -> Weight {
193
		// Proof Size summary in bytes:
194
		//  Measured:  `128 + p * (37 ±0)`
195
		//  Estimated: `4706`
196
		// Minimum execution time: 24_895_000 picoseconds.
197
		Weight::from_parts(25_696_225, 4706)
198
			// Standard Error: 1_138
199
			.saturating_add(Weight::from_parts(36_470, 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(1241), added: 3716, mode: `MaxEncodedLen`)
205
	/// The range of component `p` is `[1, 31]`.
206
8
	fn create_pure(p: u32, ) -> Weight {
207
8
		// Proof Size summary in bytes:
208
8
		//  Measured:  `140`
209
8
		//  Estimated: `4706`
210
8
		// Minimum execution time: 27_663_000 picoseconds.
211
8
		Weight::from_parts(28_543_352, 4706)
212
8
			// Standard Error: 986
213
8
			.saturating_add(Weight::from_parts(13_643, 0).saturating_mul(p.into()))
214
8
			.saturating_add(T::DbWeight::get().reads(1_u64))
215
8
			.saturating_add(T::DbWeight::get().writes(1_u64))
216
8
	}
217
	/// Storage: `Proxy::Proxies` (r:1 w:1)
218
	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
219
	/// The range of component `p` is `[0, 30]`.
220
	fn kill_pure(p: u32, ) -> Weight {
221
		// Proof Size summary in bytes:
222
		//  Measured:  `165 + p * (37 ±0)`
223
		//  Estimated: `4706`
224
		// Minimum execution time: 25_812_000 picoseconds.
225
		Weight::from_parts(26_757_617, 4706)
226
			// Standard Error: 1_253
227
			.saturating_add(Weight::from_parts(46_091, 0).saturating_mul(p.into()))
228
			.saturating_add(T::DbWeight::get().reads(1_u64))
229
			.saturating_add(T::DbWeight::get().writes(1_u64))
230
	}
231
}