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_data_preservers
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2024-08-05, 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("dev"), 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_data_preservers
34
// --extrinsic
35
// *
36
// --chain=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/dancebox_weights/pallet_data_preservers.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_data_preservers using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_data_preservers::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `System::Account` (r:1 w:1)
58
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
59
	/// Storage: `Balances::Holds` (r:1 w:1)
60
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(139), added: 2614, mode: `MaxEncodedLen`)
61
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
62
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
64
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
65
	/// The range of component `x` is `[1, 200]`.
66
	/// The range of component `y` is `[1, 10]`.
67
128
	fn create_profile(_x: u32, y: u32, ) -> Weight {
68
128
		// Proof Size summary in bytes:
69
128
		//  Measured:  `109`
70
128
		//  Estimated: `3604`
71
128
		// Minimum execution time: 56_045_000 picoseconds.
72
128
		Weight::from_parts(58_374_002, 3604)
73
128
			// Standard Error: 4_754
74
128
			.saturating_add(Weight::from_parts(67_067, 0).saturating_mul(y.into()))
75
128
			.saturating_add(T::DbWeight::get().reads(4_u64))
76
128
			.saturating_add(T::DbWeight::get().writes(4_u64))
77
128
	}
78
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
79
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
80
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
81
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
82
	/// The range of component `x` is `[1, 200]`.
83
	/// The range of component `y` is `[1, 10]`.
84
8
	fn force_create_profile(x: u32, y: u32, ) -> Weight {
85
8
		// Proof Size summary in bytes:
86
8
		//  Measured:  `6`
87
8
		//  Estimated: `3471`
88
8
		// Minimum execution time: 13_796_000 picoseconds.
89
8
		Weight::from_parts(13_966_200, 3471)
90
8
			// Standard Error: 91
91
8
			.saturating_add(Weight::from_parts(1_534, 0).saturating_mul(x.into()))
92
8
			// Standard Error: 1_909
93
8
			.saturating_add(Weight::from_parts(77_826, 0).saturating_mul(y.into()))
94
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
95
8
			.saturating_add(T::DbWeight::get().writes(2_u64))
96
8
	}
97
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
98
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
99
	/// Storage: `System::Account` (r:1 w:1)
100
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
101
	/// Storage: `Balances::Holds` (r:1 w:1)
102
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(139), added: 2614, mode: `MaxEncodedLen`)
103
	/// The range of component `x` is `[1, 200]`.
104
	/// The range of component `y` is `[1, 10]`.
105
8
	fn update_profile(x: u32, y: u32, ) -> Weight {
106
8
		// Proof Size summary in bytes:
107
8
		//  Measured:  `315`
108
8
		//  Estimated: `3780`
109
8
		// Minimum execution time: 58_592_000 picoseconds.
110
8
		Weight::from_parts(60_383_892, 3780)
111
8
			// Standard Error: 168
112
8
			.saturating_add(Weight::from_parts(19, 0).saturating_mul(x.into()))
113
8
			// Standard Error: 3_510
114
8
			.saturating_add(Weight::from_parts(63_590, 0).saturating_mul(y.into()))
115
8
			.saturating_add(T::DbWeight::get().reads(3_u64))
116
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
117
8
	}
118
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
119
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
120
	/// Storage: `System::Account` (r:1 w:1)
121
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
122
	/// Storage: `Balances::Holds` (r:1 w:1)
123
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(139), added: 2614, mode: `MaxEncodedLen`)
124
	/// The range of component `x` is `[1, 200]`.
125
	/// The range of component `y` is `[1, 10]`.
126
8
	fn force_update_profile(x: u32, y: u32, ) -> Weight {
127
8
		// Proof Size summary in bytes:
128
8
		//  Measured:  `315`
129
8
		//  Estimated: `3780`
130
8
		// Minimum execution time: 51_053_000 picoseconds.
131
8
		Weight::from_parts(52_478_282, 3780)
132
8
			// Standard Error: 167
133
8
			.saturating_add(Weight::from_parts(1_668, 0).saturating_mul(x.into()))
134
8
			// Standard Error: 3_492
135
8
			.saturating_add(Weight::from_parts(79_722, 0).saturating_mul(y.into()))
136
8
			.saturating_add(T::DbWeight::get().reads(3_u64))
137
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
138
8
	}
139
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
140
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
141
	/// Storage: `System::Account` (r:1 w:1)
142
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
143
	/// Storage: `Balances::Holds` (r:1 w:1)
144
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(139), added: 2614, mode: `MaxEncodedLen`)
145
8
	fn delete_profile() -> Weight {
146
8
		// Proof Size summary in bytes:
147
8
		//  Measured:  `315`
148
8
		//  Estimated: `3780`
149
8
		// Minimum execution time: 50_609_000 picoseconds.
150
8
		Weight::from_parts(52_022_000, 3780)
151
8
			.saturating_add(T::DbWeight::get().reads(3_u64))
152
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
153
8
	}
154
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
155
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
156
	/// Storage: `System::Account` (r:1 w:1)
157
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
158
	/// Storage: `Balances::Holds` (r:1 w:1)
159
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(139), added: 2614, mode: `MaxEncodedLen`)
160
8
	fn force_delete_profile() -> Weight {
161
8
		// Proof Size summary in bytes:
162
8
		//  Measured:  `315`
163
8
		//  Estimated: `3780`
164
8
		// Minimum execution time: 50_389_000 picoseconds.
165
8
		Weight::from_parts(51_749_000, 3780)
166
8
			.saturating_add(T::DbWeight::get().reads(3_u64))
167
8
			.saturating_add(T::DbWeight::get().writes(3_u64))
168
8
	}
169
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
170
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
171
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
172
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
173
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
174
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
175
80
	fn start_assignment() -> Weight {
176
80
		// Proof Size summary in bytes:
177
80
		//  Measured:  `373`
178
80
		//  Estimated: `3838`
179
80
		// Minimum execution time: 25_885_000 picoseconds.
180
80
		Weight::from_parts(26_702_000, 3838)
181
80
			.saturating_add(T::DbWeight::get().reads(3_u64))
182
80
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
80
	}
184
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
185
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
186
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
187
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
188
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
189
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
190
16
	fn stop_assignment() -> Weight {
191
16
		// Proof Size summary in bytes:
192
16
		//  Measured:  `430`
193
16
		//  Estimated: `3895`
194
16
		// Minimum execution time: 28_066_000 picoseconds.
195
16
		Weight::from_parts(28_703_000, 3895)
196
16
			.saturating_add(T::DbWeight::get().reads(3_u64))
197
16
			.saturating_add(T::DbWeight::get().writes(2_u64))
198
16
	}
199
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
200
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
201
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
202
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
203
8
	fn force_start_assignment() -> Weight {
204
8
		// Proof Size summary in bytes:
205
8
		//  Measured:  `153`
206
8
		//  Estimated: `3618`
207
8
		// Minimum execution time: 19_354_000 picoseconds.
208
8
		Weight::from_parts(20_043_000, 3618)
209
8
			.saturating_add(T::DbWeight::get().reads(2_u64))
210
8
			.saturating_add(T::DbWeight::get().writes(2_u64))
211
8
	}
212
}