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 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_collator_assignment
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_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: `CollatorAssignment::Randomness` (r:1 w:1)
58
	/// Proof: `CollatorAssignment::Randomness` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
59
	/// Storage: `Registrar::PendingParaIds` (r:1 w:0)
60
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
61
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
62
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// Storage: `Registrar::ParathreadParams` (r:20 w:0)
64
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`)
65
	/// Storage: `CollatorAssignment::PendingCollatorContainerChain` (r:1 w:1)
66
	/// Proof: `CollatorAssignment::PendingCollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
67
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:20 w:0)
68
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
69
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:20 w:20)
70
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
71
	/// Storage: `ServicesPayment::MaxTip` (r:20 w:0)
72
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
73
	/// Storage: `Configuration::PendingConfigs` (r:1 w:0)
74
	/// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
75
	/// Storage: `Configuration::ActiveConfig` (r:1 w:0)
76
	/// Proof: `Configuration::ActiveConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
77
	/// Storage: `Invulnerables::Invulnerables` (r:1 w:0)
78
	/// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
79
	/// Storage: `System::BlockWeight` (r:1 w:1)
80
	/// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
81
	/// Storage: `CollatorAssignment::CollatorContainerChain` (r:0 w:1)
82
	/// Proof: `CollatorAssignment::CollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
83
	/// The range of component `x` is `[1, 200]`.
84
	/// The range of component `y` is `[1, 20]`.
85
2396
	fn new_session(x: u32, y: u32, ) -> Weight {
86
2396
		// Proof Size summary in bytes:
87
2396
		//  Measured:  `782 + y * (59 ±0)`
88
2396
		//  Estimated: `4687 + y * (2535 ±0)`
89
2396
		// Minimum execution time: 113_188_000 picoseconds.
90
2396
		Weight::from_parts(48_718_202, 4687)
91
2396
			// Standard Error: 8_576
92
2396
			.saturating_add(Weight::from_parts(256_898, 0).saturating_mul(x.into()))
93
2396
			// Standard Error: 87_325
94
2396
			.saturating_add(Weight::from_parts(16_347_372, 0).saturating_mul(y.into()))
95
2396
			.saturating_add(T::DbWeight::get().reads(8_u64))
96
2396
			.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(y.into())))
97
2396
			.saturating_add(T::DbWeight::get().writes(4_u64))
98
2396
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into())))
99
2396
			.saturating_add(Weight::from_parts(0, 2535).saturating_mul(y.into()))
100
2396
	}
101
}