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_services_payment
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_services_payment
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_services_payment.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_services_payment using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_services_payment::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `System::Account` (r:2 w:2)
58
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
59
132
	fn purchase_credits() -> Weight {
60
132
		// Proof Size summary in bytes:
61
132
		//  Measured:  `155`
62
132
		//  Estimated: `6196`
63
132
		// Minimum execution time: 53_086_000 picoseconds.
64
132
		Weight::from_parts(54_180_000, 6196)
65
132
			.saturating_add(T::DbWeight::get().reads(2_u64))
66
132
			.saturating_add(T::DbWeight::get().writes(2_u64))
67
132
	}
68
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:0 w:1)
69
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
70
204
	fn set_block_production_credits() -> Weight {
71
204
		// Proof Size summary in bytes:
72
204
		//  Measured:  `0`
73
204
		//  Estimated: `0`
74
204
		// Minimum execution time: 7_086_000 picoseconds.
75
204
		Weight::from_parts(7_333_000, 0)
76
204
			.saturating_add(T::DbWeight::get().writes(1_u64))
77
204
	}
78
	/// Storage: `ServicesPayment::GivenFreeCredits` (r:0 w:1)
79
	/// Proof: `ServicesPayment::GivenFreeCredits` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
80
36
	fn set_given_free_credits() -> Weight {
81
36
		// Proof Size summary in bytes:
82
36
		//  Measured:  `0`
83
36
		//  Estimated: `0`
84
36
		// Minimum execution time: 3_939_000 picoseconds.
85
36
		Weight::from_parts(4_078_000, 0)
86
36
			.saturating_add(T::DbWeight::get().writes(1_u64))
87
36
	}
88
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
89
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
90
	/// Storage: `ServicesPayment::RefundAddress` (r:0 w:1)
91
	/// Proof: `ServicesPayment::RefundAddress` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
92
36
	fn set_refund_address() -> Weight {
93
36
		// Proof Size summary in bytes:
94
36
		//  Measured:  `220`
95
36
		//  Estimated: `3685`
96
36
		// Minimum execution time: 14_761_000 picoseconds.
97
36
		Weight::from_parts(15_240_000, 3685)
98
36
			.saturating_add(T::DbWeight::get().reads(1_u64))
99
36
			.saturating_add(T::DbWeight::get().writes(1_u64))
100
36
	}
101
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
102
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
103
	/// Storage: `ServicesPayment::MaxCorePrice` (r:0 w:1)
104
	/// Proof: `ServicesPayment::MaxCorePrice` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
105
	fn set_max_core_price() -> Weight {
106
		// Proof Size summary in bytes:
107
		//  Measured:  `220`
108
		//  Estimated: `3685`
109
		// Minimum execution time: 14_214_000 picoseconds.
110
		Weight::from_parts(14_668_000, 3685)
111
			.saturating_add(T::DbWeight::get().reads(1_u64))
112
			.saturating_add(T::DbWeight::get().writes(1_u64))
113
	}
114
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:0)
115
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
116
	/// Storage: `System::Account` (r:1 w:1)
117
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
118
20203
	fn on_container_author_noted() -> Weight {
119
20203
		// Proof Size summary in bytes:
120
20203
		//  Measured:  `258`
121
20203
		//  Estimated: `3593`
122
20203
		// Minimum execution time: 23_426_000 picoseconds.
123
20203
		Weight::from_parts(23_939_000, 3593)
124
20203
			.saturating_add(T::DbWeight::get().reads(2_u64))
125
20203
			.saturating_add(T::DbWeight::get().writes(1_u64))
126
20203
	}
127
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:1 w:0)
128
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
129
	/// Storage: `System::Account` (r:1 w:1)
130
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
131
	/// Storage: `ServicesPayment::MaxTip` (r:1 w:0)
132
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
133
2050
	fn on_collators_assigned() -> Weight {
134
2050
		// Proof Size summary in bytes:
135
2050
		//  Measured:  `315`
136
2050
		//  Estimated: `3593`
137
2050
		// Minimum execution time: 41_000_000 picoseconds.
138
2050
		Weight::from_parts(41_728_000, 3593)
139
2050
			.saturating_add(T::DbWeight::get().reads(3_u64))
140
2050
			.saturating_add(T::DbWeight::get().writes(1_u64))
141
2050
	}
142
	/// Storage: `ServicesPayment::MaxTip` (r:0 w:1)
143
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
144
12
	fn set_max_tip() -> Weight {
145
12
		// Proof Size summary in bytes:
146
12
		//  Measured:  `0`
147
12
		//  Estimated: `0`
148
12
		// Minimum execution time: 4_380_000 picoseconds.
149
12
		Weight::from_parts(4_574_000, 0)
150
12
			.saturating_add(T::DbWeight::get().writes(1_u64))
151
12
	}
152
}