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 43.0.0
20
//! DATE: 2025-02-04, 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: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonriver-runtime/moonriver_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_whitelist
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonriver/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

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

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