1
// Copyright 2024 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
//! Autogenerated weights for `pallet_whitelist`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
20
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbase-dev
30
// --steps=50
31
// --repeat=20
32
// --pallet=pallet_whitelist
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/common/src/weights/
38

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

            
43
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
44
use sp_std::marker::PhantomData;
45

            
46
/// Weights for `pallet_whitelist`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_whitelist::WeightInfo for WeightInfo<T> {
49
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
50
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
51
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
52
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
53
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
54
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
55
	fn whitelist_call() -> Weight {
56
		// Proof Size summary in bytes:
57
		//  Measured:  `46`
58
		//  Estimated: `3544`
59
		// Minimum execution time: 16_013_000 picoseconds.
60
		Weight::from_parts(16_404_000, 3544)
61
			.saturating_add(T::DbWeight::get().reads(3_u64))
62
			.saturating_add(T::DbWeight::get().writes(2_u64))
63
	}
64
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
65
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
66
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
67
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
68
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
69
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
70
	fn remove_whitelisted_call() -> Weight {
71
		// Proof Size summary in bytes:
72
		//  Measured:  `175`
73
		//  Estimated: `3544`
74
		// Minimum execution time: 15_611_000 picoseconds.
75
		Weight::from_parts(16_220_000, 3544)
76
			.saturating_add(T::DbWeight::get().reads(3_u64))
77
			.saturating_add(T::DbWeight::get().writes(2_u64))
78
	}
79
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
80
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
81
	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
82
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
83
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
84
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
85
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
86
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
87
	/// The range of component `n` is `[1, 4194294]`.
88
	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
89
		// Proof Size summary in bytes:
90
		//  Measured:  `251 + n * (1 ±0)`
91
		//  Estimated: `3715 + n * (1 ±0)`
92
		// Minimum execution time: 27_013_000 picoseconds.
93
		Weight::from_parts(27_362_000, 3715)
94
			// Standard Error: 3
95
			.saturating_add(Weight::from_parts(1_171, 0).saturating_mul(n.into()))
96
			.saturating_add(T::DbWeight::get().reads(4_u64))
97
			.saturating_add(T::DbWeight::get().writes(3_u64))
98
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
99
	}
100
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
101
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
102
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
103
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
104
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
105
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
106
	/// The range of component `n` is `[1, 10000]`.
107
	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
108
		// Proof Size summary in bytes:
109
		//  Measured:  `175`
110
		//  Estimated: `3544`
111
		// Minimum execution time: 19_524_000 picoseconds.
112
		Weight::from_parts(20_231_572, 3544)
113
			// Standard Error: 2
114
			.saturating_add(Weight::from_parts(1_420, 0).saturating_mul(n.into()))
115
			.saturating_add(T::DbWeight::get().reads(3_u64))
116
			.saturating_add(T::DbWeight::get().writes(2_u64))
117
	}
118
}