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-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_author_mapping
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_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
8
	fn add_association() -> Weight {
56
8
		// Proof Size summary in bytes:
57
8
		//  Measured:  `376`
58
8
		//  Estimated: `3841`
59
8
		// Minimum execution time: 29_186_000 picoseconds.
60
8
		Weight::from_parts(30_345_000, 3841)
61
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
62
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
63
8
	}
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
8
	fn update_association() -> Weight {
69
8
		// Proof Size summary in bytes:
70
8
		//  Measured:  `325`
71
8
		//  Estimated: `6265`
72
8
		// Minimum execution time: 17_409_000 picoseconds.
73
8
		Weight::from_parts(17_832_000, 6265)
74
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
75
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
76
8
	}
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
8
	fn clear_association() -> Weight {
84
8
		// Proof Size summary in bytes:
85
8
		//  Measured:  `453`
86
8
		//  Estimated: `3918`
87
8
		// Minimum execution time: 29_139_000 picoseconds.
88
8
		Weight::from_parts(29_791_000, 3918)
89
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
90
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
91
8
	}
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:  `547`
101
		//  Estimated: `4012`
102
		// Minimum execution time: 34_869_000 picoseconds.
103
		Weight::from_parts(35_655_000, 4012)
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
16
	fn set_keys() -> Weight {
114
16
		// Proof Size summary in bytes:
115
16
		//  Measured:  `432`
116
16
		//  Estimated: `3897`
117
16
		// Minimum execution time: 31_752_000 picoseconds.
118
16
		Weight::from_parts(32_801_000, 3897)
119
16
			.saturating_add(T::DbWeight::get().reads(3_u64))
120
16
			.saturating_add(T::DbWeight::get().writes(3_u64))
121
16
	}
122
}