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_sudo`
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_sudo
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/sudo/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_sudo`.
53
pub trait WeightInfo {
54
	fn set_key() -> Weight;
55
	fn sudo() -> Weight;
56
	fn sudo_as() -> Weight;
57
	fn remove_key() -> Weight;
58
}
59

            
60
/// Weights for `pallet_sudo` using the Substrate node and recommended hardware.
61
pub struct SubstrateWeight<T>(PhantomData<T>);
62
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
63
	/// Storage: `Sudo::Key` (r:1 w:1)
64
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
65
	fn set_key() -> Weight {
66
		// Proof Size summary in bytes:
67
		//  Measured:  `165`
68
		//  Estimated: `1517`
69
		// Minimum execution time: 9_486_000 picoseconds.
70
		Weight::from_parts(9_663_000, 1517)
71
			.saturating_add(T::DbWeight::get().reads(1_u64))
72
			.saturating_add(T::DbWeight::get().writes(1_u64))
73
	}
74
	/// Storage: `Sudo::Key` (r:1 w:0)
75
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
76
	fn sudo() -> Weight {
77
		// Proof Size summary in bytes:
78
		//  Measured:  `165`
79
		//  Estimated: `1517`
80
		// Minimum execution time: 10_501_000 picoseconds.
81
		Weight::from_parts(10_729_000, 1517)
82
			.saturating_add(T::DbWeight::get().reads(1_u64))
83
	}
84
	/// Storage: `Sudo::Key` (r:1 w:0)
85
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
86
	fn sudo_as() -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `165`
89
		//  Estimated: `1517`
90
		// Minimum execution time: 10_742_000 picoseconds.
91
		Weight::from_parts(11_003_000, 1517)
92
			.saturating_add(T::DbWeight::get().reads(1_u64))
93
	}
94
	/// Storage: `Sudo::Key` (r:1 w:1)
95
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
96
	fn remove_key() -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `165`
99
		//  Estimated: `1517`
100
		// Minimum execution time: 8_837_000 picoseconds.
101
		Weight::from_parts(9_127_000, 1517)
102
			.saturating_add(T::DbWeight::get().reads(1_u64))
103
			.saturating_add(T::DbWeight::get().writes(1_u64))
104
	}
105
}
106

            
107
// For backwards compatibility and tests.
108
impl WeightInfo for () {
109
	/// Storage: `Sudo::Key` (r:1 w:1)
110
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
111
	fn set_key() -> Weight {
112
		// Proof Size summary in bytes:
113
		//  Measured:  `165`
114
		//  Estimated: `1517`
115
		// Minimum execution time: 9_486_000 picoseconds.
116
		Weight::from_parts(9_663_000, 1517)
117
			.saturating_add(RocksDbWeight::get().reads(1_u64))
118
			.saturating_add(RocksDbWeight::get().writes(1_u64))
119
	}
120
	/// Storage: `Sudo::Key` (r:1 w:0)
121
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
122
	fn sudo() -> Weight {
123
		// Proof Size summary in bytes:
124
		//  Measured:  `165`
125
		//  Estimated: `1517`
126
		// Minimum execution time: 10_501_000 picoseconds.
127
		Weight::from_parts(10_729_000, 1517)
128
			.saturating_add(RocksDbWeight::get().reads(1_u64))
129
	}
130
	/// Storage: `Sudo::Key` (r:1 w:0)
131
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
132
	fn sudo_as() -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `165`
135
		//  Estimated: `1517`
136
		// Minimum execution time: 10_742_000 picoseconds.
137
		Weight::from_parts(11_003_000, 1517)
138
			.saturating_add(RocksDbWeight::get().reads(1_u64))
139
	}
140
	/// Storage: `Sudo::Key` (r:1 w:1)
141
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
142
	fn remove_key() -> Weight {
143
		// Proof Size summary in bytes:
144
		//  Measured:  `165`
145
		//  Estimated: `1517`
146
		// Minimum execution time: 8_837_000 picoseconds.
147
		Weight::from_parts(9_127_000, 1517)
148
			.saturating_add(RocksDbWeight::get().reads(1_u64))
149
			.saturating_add(RocksDbWeight::get().writes(1_u64))
150
	}
151
}