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 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/moonbase-runtime/moonbase_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_author_mapping
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonbase/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_author_mapping`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_author_mapping::WeightInfo for WeightInfo<T> {
51
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
52
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
53
	/// Storage: `System::Account` (r:1 w:1)
54
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
55
	/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
56
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
57
8
	fn add_association() -> Weight {
58
8
		// Proof Size summary in bytes:
59
8
		//  Measured:  `376`
60
8
		//  Estimated: `3841`
61
8
		// Minimum execution time: 32_039_000 picoseconds.
62
8
		Weight::from_parts(32_769_000, 3841)
63
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
64
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
65
8
	}
66
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:2 w:2)
67
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
68
	/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
69
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
70
8
	fn update_association() -> Weight {
71
8
		// Proof Size summary in bytes:
72
8
		//  Measured:  `325`
73
8
		//  Estimated: `6265`
74
8
		// Minimum execution time: 19_543_000 picoseconds.
75
8
		Weight::from_parts(20_392_000, 6265)
76
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
77
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
78
8
	}
79
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
80
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
81
	/// Storage: `System::Account` (r:1 w:1)
82
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
83
	/// Storage: `AuthorMapping::NimbusLookup` (r:0 w:1)
84
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
85
8
	fn clear_association() -> Weight {
86
8
		// Proof Size summary in bytes:
87
8
		//  Measured:  `453`
88
8
		//  Estimated: `3918`
89
8
		// Minimum execution time: 31_896_000 picoseconds.
90
8
		Weight::from_parts(32_772_000, 3918)
91
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
92
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
93
8
	}
94
	/// Storage: `AuthorMapping::NimbusLookup` (r:1 w:1)
95
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
96
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
97
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
98
	/// Storage: `System::Account` (r:1 w:1)
99
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
100
	fn remove_keys() -> Weight {
101
		// Proof Size summary in bytes:
102
		//  Measured:  `547`
103
		//  Estimated: `4012`
104
		// Minimum execution time: 39_621_000 picoseconds.
105
		Weight::from_parts(40_926_000, 4012)
106
			.saturating_add(T::DbWeight::get().reads(3_u64))
107
			.saturating_add(T::DbWeight::get().writes(3_u64))
108
	}
109
	/// Storage: `AuthorMapping::NimbusLookup` (r:1 w:1)
110
	/// Proof: `AuthorMapping::NimbusLookup` (`max_values`: None, `max_size`: None, mode: `Measured`)
111
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:1)
112
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
113
	/// Storage: `System::Account` (r:1 w:1)
114
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
115
16
	fn set_keys() -> Weight {
116
16
		// Proof Size summary in bytes:
117
16
		//  Measured:  `432`
118
16
		//  Estimated: `3897`
119
16
		// Minimum execution time: 34_675_000 picoseconds.
120
16
		Weight::from_parts(35_545_000, 3897)
121
16
			.saturating_add(T::DbWeight::get().reads(3_u64))
122
16
			.saturating_add(T::DbWeight::get().writes(3_u64))
123
16
	}
124
}