1
// Copyright 2025 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam 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
// Moonbeam 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 Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17

            
18
//! Autogenerated weights for `pallet_sudo`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
21
//! DATE: 2026-02-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/production/wbuild/moonbase-runtime/moonbase_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_sudo
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --disable-log-color
42
// --output=./runtime/moonbase/src/weights
43

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

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

            
51
/// Weights for `pallet_sudo`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> {
54
	/// Storage: `Sudo::Key` (r:1 w:1)
55
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
56
	fn set_key() -> Weight {
57
		// Proof Size summary in bytes:
58
		//  Measured:  `153`
59
		//  Estimated: `1505`
60
		// Minimum execution time: 9_860_000 picoseconds.
61
		Weight::from_parts(10_479_000, 1505)
62
			.saturating_add(T::DbWeight::get().reads(1_u64))
63
			.saturating_add(T::DbWeight::get().writes(1_u64))
64
	}
65
	/// Storage: `Sudo::Key` (r:1 w:0)
66
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
67
	fn sudo() -> Weight {
68
		// Proof Size summary in bytes:
69
		//  Measured:  `153`
70
		//  Estimated: `1505`
71
		// Minimum execution time: 10_951_000 picoseconds.
72
		Weight::from_parts(11_339_000, 1505)
73
			.saturating_add(T::DbWeight::get().reads(1_u64))
74
	}
75
	/// Storage: `Sudo::Key` (r:1 w:0)
76
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
77
	fn sudo_as() -> Weight {
78
		// Proof Size summary in bytes:
79
		//  Measured:  `153`
80
		//  Estimated: `1505`
81
		// Minimum execution time: 10_903_000 picoseconds.
82
		Weight::from_parts(11_276_000, 1505)
83
			.saturating_add(T::DbWeight::get().reads(1_u64))
84
	}
85
	/// Storage: `Sudo::Key` (r:1 w:1)
86
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
87
	fn remove_key() -> Weight {
88
		// Proof Size summary in bytes:
89
		//  Measured:  `153`
90
		//  Estimated: `1505`
91
		// Minimum execution time: 9_274_000 picoseconds.
92
		Weight::from_parts(9_552_000, 1505)
93
			.saturating_add(T::DbWeight::get().reads(1_u64))
94
			.saturating_add(T::DbWeight::get().writes(1_u64))
95
	}
96
	/// Storage: `Sudo::Key` (r:1 w:0)
97
	/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
98
	fn check_only_sudo_account() -> Weight {
99
		// Proof Size summary in bytes:
100
		//  Measured:  `153`
101
		//  Estimated: `1505`
102
		// Minimum execution time: 5_443_000 picoseconds.
103
		Weight::from_parts(5_703_000, 1505)
104
			.saturating_add(T::DbWeight::get().reads(1_u64))
105
	}
106
}