1
// This file is part of Substrate.
2

            
3
// Copyright (C) Parity Technologies (UK) Ltd.
4
// SPDX-License-Identifier: Apache-2.0
5

            
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
// You may obtain a copy of the License at
9
//
10
// 	http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17

            
18
//! Autogenerated weights for `pallet_utility`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `runner-anb7yjbi-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
25

            
26
// Executed Command:
27
// ./target/production/substrate-node
28
// benchmark
29
// pallet
30
// --chain=dev
31
// --steps=50
32
// --repeat=20
33
// --pallet=pallet_utility
34
// --no-storage-info
35
// --no-median-slopes
36
// --no-min-squares
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --heap-pages=4096
40
// --output=./substrate/frame/utility/src/weights.rs
41
// --header=./substrate/HEADER-APACHE2
42
// --template=./substrate/.maintain/frame-weight-template.hbs
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47
#![allow(missing_docs)]
48

            
49
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
50
use core::marker::PhantomData;
51

            
52
/// Weight functions needed for `pallet_utility`.
53
pub trait WeightInfo {
54
	fn batch(c: u32, ) -> Weight;
55
	fn as_derivative() -> Weight;
56
	fn batch_all(c: u32, ) -> Weight;
57
	fn dispatch_as() -> Weight;
58
	fn force_batch(c: u32, ) -> Weight;
59
}
60

            
61
/// Weights for `pallet_utility` using the Substrate node and recommended hardware.
62
pub struct SubstrateWeight<T>(PhantomData<T>);
63
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
64
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
65
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
66
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
67
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
68
	/// The range of component `c` is `[0, 1000]`.
69
	fn batch(c: u32, ) -> Weight {
70
		// Proof Size summary in bytes:
71
		//  Measured:  `145`
72
		//  Estimated: `3997`
73
		// Minimum execution time: 5_312_000 picoseconds.
74
		Weight::from_parts(2_694_370, 3997)
75
			// Standard Error: 5_055
76
			.saturating_add(Weight::from_parts(5_005_941, 0).saturating_mul(c.into()))
77
			.saturating_add(T::DbWeight::get().reads(2_u64))
78
	}
79
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
80
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
81
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
82
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
83
	fn as_derivative() -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `145`
86
		//  Estimated: `3997`
87
		// Minimum execution time: 9_263_000 picoseconds.
88
		Weight::from_parts(9_639_000, 3997)
89
			.saturating_add(T::DbWeight::get().reads(2_u64))
90
	}
91
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
92
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
93
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
94
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
95
	/// The range of component `c` is `[0, 1000]`.
96
	fn batch_all(c: u32, ) -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `145`
99
		//  Estimated: `3997`
100
		// Minimum execution time: 5_120_000 picoseconds.
101
		Weight::from_parts(12_948_874, 3997)
102
			// Standard Error: 4_643
103
			.saturating_add(Weight::from_parts(5_162_821, 0).saturating_mul(c.into()))
104
			.saturating_add(T::DbWeight::get().reads(2_u64))
105
	}
106
	fn dispatch_as() -> Weight {
107
		// Proof Size summary in bytes:
108
		//  Measured:  `0`
109
		//  Estimated: `0`
110
		// Minimum execution time: 7_126_000 picoseconds.
111
		Weight::from_parts(7_452_000, 0)
112
	}
113
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
114
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
115
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
116
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
117
	/// The range of component `c` is `[0, 1000]`.
118
	fn force_batch(c: u32, ) -> Weight {
119
		// Proof Size summary in bytes:
120
		//  Measured:  `145`
121
		//  Estimated: `3997`
122
		// Minimum execution time: 5_254_000 picoseconds.
123
		Weight::from_parts(4_879_712, 3997)
124
			// Standard Error: 4_988
125
			.saturating_add(Weight::from_parts(4_955_816, 0).saturating_mul(c.into()))
126
			.saturating_add(T::DbWeight::get().reads(2_u64))
127
	}
128
}
129

            
130
// For backwards compatibility and tests.
131
impl WeightInfo for () {
132
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
133
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
134
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
135
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
136
	/// The range of component `c` is `[0, 1000]`.
137
	fn batch(c: u32, ) -> Weight {
138
		// Proof Size summary in bytes:
139
		//  Measured:  `145`
140
		//  Estimated: `3997`
141
		// Minimum execution time: 5_312_000 picoseconds.
142
		Weight::from_parts(2_694_370, 3997)
143
			// Standard Error: 5_055
144
			.saturating_add(Weight::from_parts(5_005_941, 0).saturating_mul(c.into()))
145
			.saturating_add(RocksDbWeight::get().reads(2_u64))
146
	}
147
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
148
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
149
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
150
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
151
	fn as_derivative() -> Weight {
152
		// Proof Size summary in bytes:
153
		//  Measured:  `145`
154
		//  Estimated: `3997`
155
		// Minimum execution time: 9_263_000 picoseconds.
156
		Weight::from_parts(9_639_000, 3997)
157
			.saturating_add(RocksDbWeight::get().reads(2_u64))
158
	}
159
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
160
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
161
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
162
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
163
	/// The range of component `c` is `[0, 1000]`.
164
	fn batch_all(c: u32, ) -> Weight {
165
		// Proof Size summary in bytes:
166
		//  Measured:  `145`
167
		//  Estimated: `3997`
168
		// Minimum execution time: 5_120_000 picoseconds.
169
		Weight::from_parts(12_948_874, 3997)
170
			// Standard Error: 4_643
171
			.saturating_add(Weight::from_parts(5_162_821, 0).saturating_mul(c.into()))
172
			.saturating_add(RocksDbWeight::get().reads(2_u64))
173
	}
174
	fn dispatch_as() -> Weight {
175
		// Proof Size summary in bytes:
176
		//  Measured:  `0`
177
		//  Estimated: `0`
178
		// Minimum execution time: 7_126_000 picoseconds.
179
		Weight::from_parts(7_452_000, 0)
180
	}
181
	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
182
	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
183
	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
184
	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
185
	/// The range of component `c` is `[0, 1000]`.
186
	fn force_batch(c: u32, ) -> Weight {
187
		// Proof Size summary in bytes:
188
		//  Measured:  `145`
189
		//  Estimated: `3997`
190
		// Minimum execution time: 5_254_000 picoseconds.
191
		Weight::from_parts(4_879_712, 3997)
192
			// Standard Error: 4_988
193
			.saturating_add(Weight::from_parts(4_955_816, 0).saturating_mul(c.into()))
194
			.saturating_add(RocksDbWeight::get().reads(2_u64))
195
	}
196
}