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("flashbox_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=flashbox_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/flashbox_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(121), added: 2596, 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
	fn create_profile(x: u32, y: u32, ) -> Weight {
68
		// Proof Size summary in bytes:
69
		//  Measured:  `109`
70
		//  Estimated: `3593`
71
		// Minimum execution time: 56_743_000 picoseconds.
72
		Weight::from_parts(57_880_102, 3593)
73
			// Standard Error: 260
74
			.saturating_add(Weight::from_parts(350, 0).saturating_mul(x.into()))
75
			// Standard Error: 5_421
76
			.saturating_add(Weight::from_parts(72_881, 0).saturating_mul(y.into()))
77
			.saturating_add(T::DbWeight::get().reads(4_u64))
78
			.saturating_add(T::DbWeight::get().writes(4_u64))
79
	}
80
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
81
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
82
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
83
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
84
	/// The range of component `x` is `[1, 200]`.
85
	/// The range of component `y` is `[1, 10]`.
86
	fn force_create_profile(x: u32, y: u32, ) -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `6`
89
		//  Estimated: `3471`
90
		// Minimum execution time: 13_607_000 picoseconds.
91
		Weight::from_parts(13_891_622, 3471)
92
			// Standard Error: 89
93
			.saturating_add(Weight::from_parts(1_064, 0).saturating_mul(x.into()))
94
			// Standard Error: 1_866
95
			.saturating_add(Weight::from_parts(64_664, 0).saturating_mul(y.into()))
96
			.saturating_add(T::DbWeight::get().reads(2_u64))
97
			.saturating_add(T::DbWeight::get().writes(2_u64))
98
	}
99
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
100
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
101
	/// Storage: `System::Account` (r:1 w:1)
102
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
103
	/// Storage: `Balances::Holds` (r:1 w:1)
104
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
105
	/// The range of component `x` is `[1, 200]`.
106
	/// The range of component `y` is `[1, 10]`.
107
	fn update_profile(x: u32, y: u32, ) -> Weight {
108
		// Proof Size summary in bytes:
109
		//  Measured:  `315`
110
		//  Estimated: `3780`
111
		// Minimum execution time: 58_853_000 picoseconds.
112
		Weight::from_parts(60_042_394, 3780)
113
			// Standard Error: 158
114
			.saturating_add(Weight::from_parts(788, 0).saturating_mul(x.into()))
115
			// Standard Error: 3_307
116
			.saturating_add(Weight::from_parts(65_274, 0).saturating_mul(y.into()))
117
			.saturating_add(T::DbWeight::get().reads(3_u64))
118
			.saturating_add(T::DbWeight::get().writes(3_u64))
119
	}
120
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
121
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
122
	/// Storage: `System::Account` (r:1 w:1)
123
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
124
	/// Storage: `Balances::Holds` (r:1 w:1)
125
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
126
	/// The range of component `x` is `[1, 200]`.
127
	/// The range of component `y` is `[1, 10]`.
128
	fn force_update_profile(x: u32, y: u32, ) -> Weight {
129
		// Proof Size summary in bytes:
130
		//  Measured:  `315`
131
		//  Estimated: `3780`
132
		// Minimum execution time: 50_911_000 picoseconds.
133
		Weight::from_parts(52_063_929, 3780)
134
			// Standard Error: 170
135
			.saturating_add(Weight::from_parts(120, 0).saturating_mul(x.into()))
136
			// Standard Error: 3_564
137
			.saturating_add(Weight::from_parts(60_865, 0).saturating_mul(y.into()))
138
			.saturating_add(T::DbWeight::get().reads(3_u64))
139
			.saturating_add(T::DbWeight::get().writes(3_u64))
140
	}
141
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
142
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
143
	/// Storage: `System::Account` (r:1 w:1)
144
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
145
	/// Storage: `Balances::Holds` (r:1 w:1)
146
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
147
	fn delete_profile() -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `315`
150
		//  Estimated: `3780`
151
		// Minimum execution time: 50_075_000 picoseconds.
152
		Weight::from_parts(51_104_000, 3780)
153
			.saturating_add(T::DbWeight::get().reads(3_u64))
154
			.saturating_add(T::DbWeight::get().writes(3_u64))
155
	}
156
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
157
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
158
	/// Storage: `System::Account` (r:1 w:1)
159
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
160
	/// Storage: `Balances::Holds` (r:1 w:1)
161
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
162
	fn force_delete_profile() -> Weight {
163
		// Proof Size summary in bytes:
164
		//  Measured:  `315`
165
		//  Estimated: `3780`
166
		// Minimum execution time: 49_469_000 picoseconds.
167
		Weight::from_parts(50_675_000, 3780)
168
			.saturating_add(T::DbWeight::get().reads(3_u64))
169
			.saturating_add(T::DbWeight::get().writes(3_u64))
170
	}
171
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
172
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
173
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
174
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
175
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
176
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
177
	fn start_assignment() -> Weight {
178
		// Proof Size summary in bytes:
179
		//  Measured:  `373`
180
		//  Estimated: `3838`
181
		// Minimum execution time: 25_403_000 picoseconds.
182
		Weight::from_parts(26_158_000, 3838)
183
			.saturating_add(T::DbWeight::get().reads(3_u64))
184
			.saturating_add(T::DbWeight::get().writes(2_u64))
185
	}
186
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
187
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
188
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
189
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
190
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
191
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
192
	fn stop_assignment() -> Weight {
193
		// Proof Size summary in bytes:
194
		//  Measured:  `430`
195
		//  Estimated: `3895`
196
		// Minimum execution time: 27_902_000 picoseconds.
197
		Weight::from_parts(28_376_000, 3895)
198
			.saturating_add(T::DbWeight::get().reads(3_u64))
199
			.saturating_add(T::DbWeight::get().writes(2_u64))
200
	}
201
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
202
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
203
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
204
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
205
	fn force_start_assignment() -> Weight {
206
		// Proof Size summary in bytes:
207
		//  Measured:  `153`
208
		//  Estimated: `3618`
209
		// Minimum execution time: 19_507_000 picoseconds.
210
		Weight::from_parts(19_891_000, 3618)
211
			.saturating_add(T::DbWeight::get().reads(2_u64))
212
			.saturating_add(T::DbWeight::get().writes(2_u64))
213
	}
214
}