1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

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

            
17

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

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_whitelist
34
// --extrinsic
35
// *
36
// --chain=starlight-dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-runtime-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// tmp/starlight_weights/pallet_whitelist.rs
46

            
47
#![cfg_attr(rustfmt, rustfmt_skip)]
48
#![allow(unused_parens)]
49
#![allow(unused_imports)]
50

            
51
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
52
use sp_std::marker::PhantomData;
53

            
54
/// Weights for pallet_whitelist using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_whitelist::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
58
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
59
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
60
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
61
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
62
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
63
	fn whitelist_call() -> Weight {
64
		// Proof Size summary in bytes:
65
		//  Measured:  `190`
66
		//  Estimated: `3556`
67
		// Minimum execution time: 22_738_000 picoseconds.
68
		Weight::from_parts(23_036_000, 3556)
69
			.saturating_add(T::DbWeight::get().reads(3_u64))
70
			.saturating_add(T::DbWeight::get().writes(2_u64))
71
	}
72
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
73
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
74
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
75
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
76
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
77
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
78
	fn remove_whitelisted_call() -> Weight {
79
		// Proof Size summary in bytes:
80
		//  Measured:  `319`
81
		//  Estimated: `3556`
82
		// Minimum execution time: 21_542_000 picoseconds.
83
		Weight::from_parts(22_201_000, 3556)
84
			.saturating_add(T::DbWeight::get().reads(3_u64))
85
			.saturating_add(T::DbWeight::get().writes(2_u64))
86
	}
87
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
88
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
89
	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
90
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
91
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
92
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
93
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
94
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
95
	/// The range of component `n` is `[1, 4194294]`.
96
	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `395 + n * (1 ±0)`
99
		//  Estimated: `3859 + n * (1 ±0)`
100
		// Minimum execution time: 35_228_000 picoseconds.
101
		Weight::from_parts(35_733_000, 3859)
102
			// Standard Error: 19
103
			.saturating_add(Weight::from_parts(1_632, 0).saturating_mul(n.into()))
104
			.saturating_add(T::DbWeight::get().reads(4_u64))
105
			.saturating_add(T::DbWeight::get().writes(3_u64))
106
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
107
	}
108
	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
109
	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
110
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
111
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
112
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
113
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
114
	/// The range of component `n` is `[1, 10000]`.
115
	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
116
		// Proof Size summary in bytes:
117
		//  Measured:  `319`
118
		//  Estimated: `3556`
119
		// Minimum execution time: 26_894_000 picoseconds.
120
		Weight::from_parts(27_342_083, 3556)
121
			// Standard Error: 4
122
			.saturating_add(Weight::from_parts(1_378, 0).saturating_mul(n.into()))
123
			.saturating_add(T::DbWeight::get().reads(3_u64))
124
			.saturating_add(T::DbWeight::get().writes(2_u64))
125
	}
126
}