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_author_noting
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21
//! DATE: 2023-10-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
24
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

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

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

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

            
53
/// Weight functions needed for pallet_author_noting.
54
pub trait WeightInfo {
55
	fn set_latest_author_data(x: u32, ) -> Weight;
56
	fn set_author() -> Weight;
57
	fn kill_author_data() -> Weight;
58
}
59

            
60
/// Weights for pallet_author_noting using the Substrate node and recommended hardware.
61
pub struct SubstrateWeight<T>(PhantomData<T>);
62
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
63
	/// Storage: AuthorNoting DidSetContainerAuthorData (r:1 w:1)
64
	/// Proof: AuthorNoting DidSetContainerAuthorData (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
65
	/// Storage: Registrar RegisteredParaIds (r:1 w:0)
66
	/// Proof Skipped: Registrar RegisteredParaIds (max_values: Some(1), max_size: None, mode: Measured)
67
	/// Storage: ParachainSystem ValidationData (r:1 w:0)
68
	/// Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured)
69
	/// Storage: CollatorAssignment CollatorContainerChain (r:1 w:0)
70
	/// Proof Skipped: CollatorAssignment CollatorContainerChain (max_values: Some(1), max_size: None, mode: Measured)
71
	/// Storage: AuthorNoting LatestAuthor (r:0 w:100)
72
	/// Proof: AuthorNoting LatestAuthor (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
73
	/// The range of component `x` is `[0, 100]`.
74
	fn set_latest_author_data(x: u32, ) -> Weight {
75
		// Proof Size summary in bytes:
76
		//  Measured:  `427 + x * (73 ±0)`
77
		//  Estimated: `1912 + x * (73 ±0)`
78
		// Minimum execution time: 7_767_000 picoseconds.
79
		Weight::from_parts(7_985_000, 1912)
80
			// Standard Error: 125_649
81
			.saturating_add(Weight::from_parts(19_274_325, 0).saturating_mul(x.into()))
82
			.saturating_add(T::DbWeight::get().reads(4_u64))
83
			.saturating_add(T::DbWeight::get().writes(1_u64))
84
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
85
			.saturating_add(Weight::from_parts(0, 73).saturating_mul(x.into()))
86
	}
87
	/// Storage: AuthorNoting LatestAuthor (r:0 w:1)
88
	/// Proof: AuthorNoting LatestAuthor (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
89
	fn set_author() -> Weight {
90
		// Proof Size summary in bytes:
91
		//  Measured:  `0`
92
		//  Estimated: `0`
93
		// Minimum execution time: 7_877_000 picoseconds.
94
		Weight::from_parts(8_127_000, 0)
95
			.saturating_add(T::DbWeight::get().writes(1_u64))
96
	}
97
	/// Storage: AuthorNoting LatestAuthor (r:0 w:1)
98
	/// Proof: AuthorNoting LatestAuthor (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
99
	fn kill_author_data() -> Weight {
100
		// Proof Size summary in bytes:
101
		//  Measured:  `0`
102
		//  Estimated: `0`
103
		// Minimum execution time: 7_190_000 picoseconds.
104
		Weight::from_parts(7_520_000, 0)
105
			.saturating_add(T::DbWeight::get().writes(1_u64))
106
	}
107
}
108

            
109
// For backwards compatibility and tests
110
impl WeightInfo for () {
111
	/// Storage: AuthorNoting DidSetContainerAuthorData (r:1 w:1)
112
	/// Proof: AuthorNoting DidSetContainerAuthorData (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
113
	/// Storage: Registrar RegisteredParaIds (r:1 w:0)
114
	/// Proof Skipped: Registrar RegisteredParaIds (max_values: Some(1), max_size: None, mode: Measured)
115
	/// Storage: ParachainSystem ValidationData (r:1 w:0)
116
	/// Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured)
117
	/// Storage: CollatorAssignment CollatorContainerChain (r:1 w:0)
118
	/// Proof Skipped: CollatorAssignment CollatorContainerChain (max_values: Some(1), max_size: None, mode: Measured)
119
	/// Storage: AuthorNoting LatestAuthor (r:0 w:100)
120
	/// Proof: AuthorNoting LatestAuthor (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
121
	/// The range of component `x` is `[0, 100]`.
122
16
	fn set_latest_author_data(x: u32, ) -> Weight {
123
16
		// Proof Size summary in bytes:
124
16
		//  Measured:  `427 + x * (73 ±0)`
125
16
		//  Estimated: `1912 + x * (73 ±0)`
126
16
		// Minimum execution time: 7_767_000 picoseconds.
127
16
		Weight::from_parts(7_985_000, 1912)
128
16
			// Standard Error: 125_649
129
16
			.saturating_add(Weight::from_parts(19_274_325, 0).saturating_mul(x.into()))
130
16
			.saturating_add(RocksDbWeight::get().reads(4_u64))
131
16
			.saturating_add(RocksDbWeight::get().writes(1_u64))
132
16
			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(x.into())))
133
16
			.saturating_add(Weight::from_parts(0, 73).saturating_mul(x.into()))
134
16
	}
135
	/// Storage: AuthorNoting LatestAuthor (r:0 w:1)
136
	/// Proof: AuthorNoting LatestAuthor (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
137
2
	fn set_author() -> Weight {
138
2
		// Proof Size summary in bytes:
139
2
		//  Measured:  `0`
140
2
		//  Estimated: `0`
141
2
		// Minimum execution time: 7_877_000 picoseconds.
142
2
		Weight::from_parts(8_127_000, 0)
143
2
			.saturating_add(RocksDbWeight::get().writes(1_u64))
144
2
	}
145
	/// Storage: AuthorNoting LatestAuthor (r:0 w:1)
146
	/// Proof: AuthorNoting LatestAuthor (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
147
	fn kill_author_data() -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `0`
150
		//  Estimated: `0`
151
		// Minimum execution time: 7_190_000 picoseconds.
152
		Weight::from_parts(7_520_000, 0)
153
			.saturating_add(RocksDbWeight::get().writes(1_u64))
154
	}
155
}