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 runtime_common::paras_registrar
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
21
//! DATE: 2024-09-25, 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("starlight-dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// runtime_common::paras_registrar
34
// --extrinsic
35
// *
36
// --chain=starlight-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/starlight_weights/runtime_common::paras_registrar.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 runtime_common::paras_registrar using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> runtime_common::paras_registrar::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Registrar::NextFreeParaId` (r:1 w:1)
58
	/// Proof: `Registrar::NextFreeParaId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
59
	/// Storage: `Registrar::Paras` (r:1 w:1)
60
	/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `Paras::ParaLifecycles` (r:1 w:0)
62
	/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
63
	fn reserve() -> Weight {
64
		// Proof Size summary in bytes:
65
		//  Measured:  `97`
66
		//  Estimated: `3562`
67
		// Minimum execution time: 33_857_000 picoseconds.
68
		Weight::from_parts(34_778_000, 3562)
69
			.saturating_add(T::DbWeight::get().reads(3_u64))
70
			.saturating_add(T::DbWeight::get().writes(2_u64))
71
	}
72
	/// Storage: `Registrar::Paras` (r:1 w:1)
73
	/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
74
	/// Storage: `Paras::ParaLifecycles` (r:1 w:1)
75
	/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
76
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
77
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
78
	/// Storage: `Paras::CodeByHash` (r:1 w:1)
79
	/// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
80
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
81
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
82
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
83
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84
	/// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
85
	/// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
86
	/// Storage: `Paras::CurrentCodeHash` (r:0 w:1)
87
	/// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
88
	/// Storage: `Paras::UpcomingParasGenesis` (r:0 w:1)
89
	/// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`)
90
	fn register() -> Weight {
91
		// Proof Size summary in bytes:
92
		//  Measured:  `420`
93
		//  Estimated: `3885`
94
		// Minimum execution time: 8_014_302_000 picoseconds.
95
		Weight::from_parts(8_154_693_000, 3885)
96
			.saturating_add(T::DbWeight::get().reads(7_u64))
97
			.saturating_add(T::DbWeight::get().writes(8_u64))
98
	}
99
	/// Storage: `Registrar::Paras` (r:1 w:1)
100
	/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
101
	/// Storage: `Paras::ParaLifecycles` (r:1 w:1)
102
	/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
103
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
104
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
105
	/// Storage: `Paras::CodeByHash` (r:1 w:1)
106
	/// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
107
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
108
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
109
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
110
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
111
	/// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
112
	/// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
113
	/// Storage: `Paras::CurrentCodeHash` (r:0 w:1)
114
	/// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
115
	/// Storage: `Paras::UpcomingParasGenesis` (r:0 w:1)
116
	/// Proof: `Paras::UpcomingParasGenesis` (`max_values`: None, `max_size`: None, mode: `Measured`)
117
	fn force_register() -> Weight {
118
		// Proof Size summary in bytes:
119
		//  Measured:  `337`
120
		//  Estimated: `3802`
121
		// Minimum execution time: 7_984_516_000 picoseconds.
122
		Weight::from_parts(8_247_497_000, 3802)
123
			.saturating_add(T::DbWeight::get().reads(7_u64))
124
			.saturating_add(T::DbWeight::get().writes(8_u64))
125
	}
126
	/// Storage: `Registrar::Paras` (r:1 w:1)
127
	/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
128
	/// Storage: `Paras::ParaLifecycles` (r:1 w:1)
129
	/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
130
	/// Storage: `Paras::FutureCodeHash` (r:1 w:0)
131
	/// Proof: `Paras::FutureCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
132
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
133
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
134
	/// Storage: `Paras::ActionsQueue` (r:1 w:1)
135
	/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
136
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
137
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
138
	/// Storage: `Registrar::PendingSwap` (r:0 w:1)
139
	/// Proof: `Registrar::PendingSwap` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	fn deregister() -> Weight {
141
		// Proof Size summary in bytes:
142
		//  Measured:  `567`
143
		//  Estimated: `4032`
144
		// Minimum execution time: 78_970_000 picoseconds.
145
		Weight::from_parts(85_612_000, 4032)
146
			.saturating_add(T::DbWeight::get().reads(6_u64))
147
			.saturating_add(T::DbWeight::get().writes(4_u64))
148
	}
149
	/// Storage: `Registrar::Paras` (r:1 w:0)
150
	/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
151
	/// Storage: `Paras::ParaLifecycles` (r:2 w:2)
152
	/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
153
	/// Storage: `Registrar::PendingSwap` (r:1 w:1)
154
	/// Proof: `Registrar::PendingSwap` (`max_values`: None, `max_size`: None, mode: `Measured`)
155
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
156
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
157
	/// Storage: `Paras::ActionsQueue` (r:1 w:1)
158
	/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
159
	fn swap() -> Weight {
160
		// Proof Size summary in bytes:
161
		//  Measured:  `683`
162
		//  Estimated: `6623`
163
		// Minimum execution time: 67_064_000 picoseconds.
164
		Weight::from_parts(73_715_000, 6623)
165
			.saturating_add(T::DbWeight::get().reads(6_u64))
166
			.saturating_add(T::DbWeight::get().writes(4_u64))
167
	}
168
	/// Storage: `Paras::FutureCodeHash` (r:1 w:1)
169
	/// Proof: `Paras::FutureCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
170
	/// Storage: `Paras::UpgradeRestrictionSignal` (r:1 w:1)
171
	/// Proof: `Paras::UpgradeRestrictionSignal` (`max_values`: None, `max_size`: None, mode: `Measured`)
172
	/// Storage: `Paras::CurrentCodeHash` (r:1 w:0)
173
	/// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
174
	/// Storage: `Paras::UpgradeCooldowns` (r:1 w:1)
175
	/// Proof: `Paras::UpgradeCooldowns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
176
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
177
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
178
	/// Storage: `Paras::CodeByHash` (r:1 w:1)
179
	/// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
180
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
181
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
182
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
183
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
184
	/// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
185
	/// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
186
	/// The range of component `b` is `[9, 3145728]`.
187
	fn schedule_code_upgrade(b: u32, ) -> Weight {
188
		// Proof Size summary in bytes:
189
		//  Measured:  `268`
190
		//  Estimated: `3733`
191
		// Minimum execution time: 45_076_000 picoseconds.
192
		Weight::from_parts(45_345_000, 3733)
193
			// Standard Error: 8
194
			.saturating_add(Weight::from_parts(2_337, 0).saturating_mul(b.into()))
195
			.saturating_add(T::DbWeight::get().reads(9_u64))
196
			.saturating_add(T::DbWeight::get().writes(7_u64))
197
	}
198
	/// Storage: `Paras::Heads` (r:0 w:1)
199
	/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
200
	/// The range of component `b` is `[1, 1048576]`.
201
	fn set_current_head(b: u32, ) -> Weight {
202
		// Proof Size summary in bytes:
203
		//  Measured:  `0`
204
		//  Estimated: `0`
205
		// Minimum execution time: 8_563_000 picoseconds.
206
		Weight::from_parts(9_640_849, 0)
207
			// Standard Error: 0
208
			.saturating_add(Weight::from_parts(891, 0).saturating_mul(b.into()))
209
			.saturating_add(T::DbWeight::get().writes(1_u64))
210
	}
211
}