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_author_mapping`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
20
//! DATE: 2024-11-12, 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("moonbeam-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbeam-dev
30
// --steps=50
31
// --repeat=20
32
// --pallet=pallet_author_mapping
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/moonbeam/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_author_mapping`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_author_mapping::WeightInfo for WeightInfo<T> {
49
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
50
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
51
	/// Storage: `System::Account` (r:1 w:1)
52
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
53
	/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
54
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
55
	fn add_association() -> Weight {
56
		// Proof Size summary in bytes:
57
		//  Measured:  `343`
58
		//  Estimated: `3808`
59
		// Minimum execution time: 28_138_000 picoseconds.
60
		Weight::from_parts(28_869_000, 3808)
61
			.saturating_add(T::DbWeight::get().reads(2_u64))
62
			.saturating_add(T::DbWeight::get().writes(3_u64))
63
	}
64
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:2 w:2)
65
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
66
	/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
67
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
68
	fn update_association() -> Weight {
69
		// Proof Size summary in bytes:
70
		//  Measured:  `292`
71
		//  Estimated: `6232`
72
		// Minimum execution time: 16_953_000 picoseconds.
73
		Weight::from_parts(17_545_000, 6232)
74
			.saturating_add(T::DbWeight::get().reads(2_u64))
75
			.saturating_add(T::DbWeight::get().writes(3_u64))
76
	}
77
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
78
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
79
	/// Storage: `System::Account` (r:1 w:1)
80
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
81
	/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
82
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
83
	fn clear_association() -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `420`
86
		//  Estimated: `3885`
87
		// Minimum execution time: 30_318_000 picoseconds.
88
		Weight::from_parts(31_279_000, 3885)
89
			.saturating_add(T::DbWeight::get().reads(2_u64))
90
			.saturating_add(T::DbWeight::get().writes(3_u64))
91
	}
92
	/// Storage: `AuthorMapping::NimbusLookup` (r:1 w:1)
93
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
94
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
95
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
96
	/// Storage: `System::Account` (r:1 w:1)
97
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
98
	fn remove_keys() -> Weight {
99
		// Proof Size summary in bytes:
100
		//  Measured:  `514`
101
		//  Estimated: `3979`
102
		// Minimum execution time: 33_569_000 picoseconds.
103
		Weight::from_parts(34_706_000, 3979)
104
			.saturating_add(T::DbWeight::get().reads(3_u64))
105
			.saturating_add(T::DbWeight::get().writes(3_u64))
106
	}
107
	/// Storage: `AuthorMapping::NimbusLookup` (r:1 w:1)
108
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
109
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
110
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
111
	/// Storage: `System::Account` (r:1 w:1)
112
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
113
	fn set_keys() -> Weight {
114
		// Proof Size summary in bytes:
115
		//  Measured:  `399`
116
		//  Estimated: `3864`
117
		// Minimum execution time: 33_530_000 picoseconds.
118
		Weight::from_parts(34_330_000, 3864)
119
			.saturating_add(T::DbWeight::get().reads(3_u64))
120
			.saturating_add(T::DbWeight::get().writes(3_u64))
121
	}
122
}