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
192
	fn create_profile(_x: u32, y: u32, ) -> Weight {
68
192
		// Proof Size summary in bytes:
69
192
		//  Measured:  `109`
70
192
		//  Estimated: `3604`
71
192
		// Minimum execution time: 56_045_000 picoseconds.
72
192
		Weight::from_parts(58_374_002, 3604)
73
192
			// Standard Error: 4_754
74
192
			.saturating_add(Weight::from_parts(67_067, 0).saturating_mul(y.into()))
75
192
			.saturating_add(T::DbWeight::get().reads(4_u64))
76
192
			.saturating_add(T::DbWeight::get().writes(4_u64))
77
192
	}
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
12
	fn force_create_profile(x: u32, y: u32, ) -> Weight {
85
12
		// Proof Size summary in bytes:
86
12
		//  Measured:  `6`
87
12
		//  Estimated: `3471`
88
12
		// Minimum execution time: 13_796_000 picoseconds.
89
12
		Weight::from_parts(13_966_200, 3471)
90
12
			// Standard Error: 91
91
12
			.saturating_add(Weight::from_parts(1_534, 0).saturating_mul(x.into()))
92
12
			// Standard Error: 1_909
93
12
			.saturating_add(Weight::from_parts(77_826, 0).saturating_mul(y.into()))
94
12
			.saturating_add(T::DbWeight::get().reads(2_u64))
95
12
			.saturating_add(T::DbWeight::get().writes(2_u64))
96
12
	}
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
12
	fn update_profile(x: u32, y: u32, ) -> Weight {
106
12
		// Proof Size summary in bytes:
107
12
		//  Measured:  `315`
108
12
		//  Estimated: `3780`
109
12
		// Minimum execution time: 58_592_000 picoseconds.
110
12
		Weight::from_parts(60_383_892, 3780)
111
12
			// Standard Error: 168
112
12
			.saturating_add(Weight::from_parts(19, 0).saturating_mul(x.into()))
113
12
			// Standard Error: 3_510
114
12
			.saturating_add(Weight::from_parts(63_590, 0).saturating_mul(y.into()))
115
12
			.saturating_add(T::DbWeight::get().reads(3_u64))
116
12
			.saturating_add(T::DbWeight::get().writes(3_u64))
117
12
	}
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
12
	fn force_update_profile(x: u32, y: u32, ) -> Weight {
127
12
		// Proof Size summary in bytes:
128
12
		//  Measured:  `315`
129
12
		//  Estimated: `3780`
130
12
		// Minimum execution time: 51_053_000 picoseconds.
131
12
		Weight::from_parts(52_478_282, 3780)
132
12
			// Standard Error: 167
133
12
			.saturating_add(Weight::from_parts(1_668, 0).saturating_mul(x.into()))
134
12
			// Standard Error: 3_492
135
12
			.saturating_add(Weight::from_parts(79_722, 0).saturating_mul(y.into()))
136
12
			.saturating_add(T::DbWeight::get().reads(3_u64))
137
12
			.saturating_add(T::DbWeight::get().writes(3_u64))
138
12
	}
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
12
	fn delete_profile() -> Weight {
146
12
		// Proof Size summary in bytes:
147
12
		//  Measured:  `315`
148
12
		//  Estimated: `3780`
149
12
		// Minimum execution time: 50_609_000 picoseconds.
150
12
		Weight::from_parts(52_022_000, 3780)
151
12
			.saturating_add(T::DbWeight::get().reads(3_u64))
152
12
			.saturating_add(T::DbWeight::get().writes(3_u64))
153
12
	}
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
12
	fn force_delete_profile() -> Weight {
161
12
		// Proof Size summary in bytes:
162
12
		//  Measured:  `315`
163
12
		//  Estimated: `3780`
164
12
		// Minimum execution time: 50_389_000 picoseconds.
165
12
		Weight::from_parts(51_749_000, 3780)
166
12
			.saturating_add(T::DbWeight::get().reads(3_u64))
167
12
			.saturating_add(T::DbWeight::get().writes(3_u64))
168
12
	}
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
120
	fn start_assignment() -> Weight {
176
120
		// Proof Size summary in bytes:
177
120
		//  Measured:  `373`
178
120
		//  Estimated: `3838`
179
120
		// Minimum execution time: 25_885_000 picoseconds.
180
120
		Weight::from_parts(26_702_000, 3838)
181
120
			.saturating_add(T::DbWeight::get().reads(3_u64))
182
120
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
120
	}
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
24
	fn stop_assignment() -> Weight {
191
24
		// Proof Size summary in bytes:
192
24
		//  Measured:  `430`
193
24
		//  Estimated: `3895`
194
24
		// Minimum execution time: 28_066_000 picoseconds.
195
24
		Weight::from_parts(28_703_000, 3895)
196
24
			.saturating_add(T::DbWeight::get().reads(3_u64))
197
24
			.saturating_add(T::DbWeight::get().writes(2_u64))
198
24
	}
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
12
	fn force_start_assignment() -> Weight {
204
12
		// Proof Size summary in bytes:
205
12
		//  Measured:  `153`
206
12
		//  Estimated: `3618`
207
12
		// Minimum execution time: 19_354_000 picoseconds.
208
12
		Weight::from_parts(20_043_000, 3618)
209
12
			.saturating_add(T::DbWeight::get().reads(2_u64))
210
12
			.saturating_add(T::DbWeight::get().writes(2_u64))
211
12
	}
212
}