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("flashbox_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=flashbox_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/flashbox_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
	fn purchase_credits() -> Weight {
60
		// Proof Size summary in bytes:
61
		//  Measured:  `155`
62
		//  Estimated: `6196`
63
		// Minimum execution time: 53_220_000 picoseconds.
64
		Weight::from_parts(53_712_000, 6196)
65
			.saturating_add(T::DbWeight::get().reads(2_u64))
66
			.saturating_add(T::DbWeight::get().writes(2_u64))
67
	}
68
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:0 w:1)
69
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
70
	fn set_block_production_credits() -> Weight {
71
		// Proof Size summary in bytes:
72
		//  Measured:  `0`
73
		//  Estimated: `0`
74
		// Minimum execution time: 6_982_000 picoseconds.
75
		Weight::from_parts(7_319_000, 0)
76
			.saturating_add(T::DbWeight::get().writes(1_u64))
77
	}
78
	/// Storage: `ServicesPayment::GivenFreeCredits` (r:0 w:1)
79
	/// Proof: `ServicesPayment::GivenFreeCredits` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
80
	fn set_given_free_credits() -> Weight {
81
		// Proof Size summary in bytes:
82
		//  Measured:  `0`
83
		//  Estimated: `0`
84
		// Minimum execution time: 4_114_000 picoseconds.
85
		Weight::from_parts(4_344_000, 0)
86
			.saturating_add(T::DbWeight::get().writes(1_u64))
87
	}
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
	fn set_refund_address() -> Weight {
93
		// Proof Size summary in bytes:
94
		//  Measured:  `220`
95
		//  Estimated: `3685`
96
		// Minimum execution time: 14_537_000 picoseconds.
97
		Weight::from_parts(14_947_000, 3685)
98
			.saturating_add(T::DbWeight::get().reads(1_u64))
99
			.saturating_add(T::DbWeight::get().writes(1_u64))
100
	}
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_236_000 picoseconds.
110
		Weight::from_parts(14_654_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
7
	fn on_container_author_noted() -> Weight {
119
7
		// Proof Size summary in bytes:
120
7
		//  Measured:  `258`
121
7
		//  Estimated: `3593`
122
7
		// Minimum execution time: 23_092_000 picoseconds.
123
7
		Weight::from_parts(23_709_000, 3593)
124
7
			.saturating_add(T::DbWeight::get().reads(2_u64))
125
7
			.saturating_add(T::DbWeight::get().writes(1_u64))
126
7
	}
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
59
	fn on_collators_assigned() -> Weight {
134
59
		// Proof Size summary in bytes:
135
59
		//  Measured:  `315`
136
59
		//  Estimated: `3593`
137
59
		// Minimum execution time: 40_559_000 picoseconds.
138
59
		Weight::from_parts(41_371_000, 3593)
139
59
			.saturating_add(T::DbWeight::get().reads(3_u64))
140
59
			.saturating_add(T::DbWeight::get().writes(1_u64))
141
59
	}
142
	/// Storage: `ServicesPayment::MaxTip` (r:0 w:1)
143
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
144
	fn set_max_tip() -> Weight {
145
		// Proof Size summary in bytes:
146
		//  Measured:  `0`
147
		//  Estimated: `0`
148
		// Minimum execution time: 4_308_000 picoseconds.
149
		Weight::from_parts(4_527_000, 0)
150
			.saturating_add(T::DbWeight::get().writes(1_u64))
151
	}
152
}