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_collator_assignment
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
21
//! DATE: 2024-10-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dancelight-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
// pallet-collator-assignment
34
// --extrinsic
35
// *
36
// --chain=dancelight-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/dancelight_weights/pallet-collator-assignment.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_collator_assignment using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_collator_assignment::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `TanssiCollatorAssignment::Randomness` (r:1 w:1)
58
	/// Proof: `TanssiCollatorAssignment::Randomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
59
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
60
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
61
	/// Storage: `CollatorConfiguration::PendingConfigs` (r:1 w:0)
62
	/// Proof: `CollatorConfiguration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// Storage: `CollatorConfiguration::ActiveConfig` (r:1 w:0)
64
	/// Proof: `CollatorConfiguration::ActiveConfig` (`max_values`: Some(1), `max_size`: Some(37), added: 532, mode: `MaxEncodedLen`)
65
	/// Storage: `Configuration::PendingConfigs` (r:1 w:0)
66
	/// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
67
	/// Storage: `ContainerRegistrar::PendingParaIds` (r:1 w:0)
68
	/// Proof: `ContainerRegistrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
69
	/// Storage: `ContainerRegistrar::RegisteredParaIds` (r:1 w:0)
70
	/// Proof: `ContainerRegistrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
71
	/// Storage: `ContainerRegistrar::ParathreadParams` (r:20 w:0)
72
	/// Proof: `ContainerRegistrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
73
	/// Storage: `TanssiCollatorAssignment::PendingCollatorContainerChain` (r:1 w:1)
74
	/// Proof: `TanssiCollatorAssignment::PendingCollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
75
	/// Storage: `TanssiCollatorAssignment::CollatorContainerChain` (r:1 w:1)
76
	/// Proof: `TanssiCollatorAssignment::CollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
77
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:20 w:0)
78
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
79
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:20 w:2)
80
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
81
	/// Storage: `ServicesPayment::MaxTip` (r:20 w:0)
82
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
83
	/// Storage: `TanssiCollatorAssignment::CollatorFullnessRatio` (r:0 w:1)
84
	/// Proof: `TanssiCollatorAssignment::CollatorFullnessRatio` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
85
	/// The range of component `x` is `[1, 200]`.
86
	/// The range of component `y` is `[1, 20]`.
87
385
	fn new_session(x: u32, y: u32, ) -> Weight {
88
385
		// Proof Size summary in bytes:
89
385
		//  Measured:  `4429 + y * (385 ±0)`
90
385
		//  Estimated: `5915 + y * (2511 ±0)`
91
385
		// Minimum execution time: 68_365_000 picoseconds.
92
385
		Weight::from_parts(31_795_337, 5915)
93
385
			// Standard Error: 4_926
94
385
			.saturating_add(Weight::from_parts(180_182, 0).saturating_mul(x.into()))
95
385
			// Standard Error: 50_158
96
385
			.saturating_add(Weight::from_parts(9_087_194, 0).saturating_mul(y.into()))
97
385
			.saturating_add(T::DbWeight::get().reads(9_u64))
98
385
			.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(y.into())))
99
385
			.saturating_add(T::DbWeight::get().writes(6_u64))
100
385
			.saturating_add(Weight::from_parts(0, 2511).saturating_mul(y.into()))
101
385
	}
102
}