1
// Copyright 2024 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam 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
// Moonbeam 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 Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17
//! Autogenerated weights for `pallet_treasury`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
20
//! DATE: 2024-10-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbase-dev
30
// --steps=50
31
// --repeat=20
32
// --pallet=pallet_treasury
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/common/src/weights/
38

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

            
43
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
44
use sp_std::marker::PhantomData;
45

            
46
/// Weights for `pallet_treasury`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
49
	/// Storage: `Treasury::ProposalCount` (r:1 w:1)
50
	/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
51
	/// Storage: `Treasury::Approvals` (r:1 w:1)
52
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
53
	/// Storage: `Treasury::Proposals` (r:0 w:1)
54
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
55
	fn spend_local() -> Weight {
56
		// Proof Size summary in bytes:
57
		//  Measured:  `180`
58
		//  Estimated: `1887`
59
		// Minimum execution time: 11_095_000 picoseconds.
60
		Weight::from_parts(11_489_000, 1887)
61
			.saturating_add(T::DbWeight::get().reads(2_u64))
62
			.saturating_add(T::DbWeight::get().writes(3_u64))
63
	}
64
	/// Storage: `Treasury::Approvals` (r:1 w:1)
65
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
66
	fn remove_approval() -> Weight {
67
		// Proof Size summary in bytes:
68
		//  Measured:  `265`
69
		//  Estimated: `1887`
70
		// Minimum execution time: 6_540_000 picoseconds.
71
		Weight::from_parts(6_767_000, 1887)
72
			.saturating_add(T::DbWeight::get().reads(1_u64))
73
			.saturating_add(T::DbWeight::get().writes(1_u64))
74
	}
75
	/// Storage: `System::Account` (r:100 w:100)
76
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
77
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
78
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
79
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
80
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
81
	/// Storage: `Treasury::Approvals` (r:1 w:1)
82
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
83
	/// Storage: `Treasury::Proposals` (r:99 w:99)
84
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
85
	/// The range of component `p` is `[0, 99]`.
86
	fn on_initialize_proposals(p: u32, ) -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `943 + p * (148 ±0)`
89
		//  Estimated: `3581 + p * (2591 ±0)`
90
		// Minimum execution time: 18_993_000 picoseconds.
91
		Weight::from_parts(28_162_234, 3581)
92
			// Standard Error: 11_668
93
			.saturating_add(Weight::from_parts(20_056_551, 0).saturating_mul(p.into()))
94
			.saturating_add(T::DbWeight::get().reads(4_u64))
95
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(p.into())))
96
			.saturating_add(T::DbWeight::get().writes(4_u64))
97
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into())))
98
			.saturating_add(Weight::from_parts(0, 2591).saturating_mul(p.into()))
99
	}
100
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
101
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
102
	/// Storage: `Treasury::Spends` (r:0 w:1)
103
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
104
	fn spend() -> Weight {
105
		// Proof Size summary in bytes:
106
		//  Measured:  `180`
107
		//  Estimated: `1489`
108
		// Minimum execution time: 9_882_000 picoseconds.
109
		Weight::from_parts(10_237_000, 1489)
110
			.saturating_add(T::DbWeight::get().reads(1_u64))
111
			.saturating_add(T::DbWeight::get().writes(2_u64))
112
	}
113
	/// Storage: `Treasury::Spends` (r:1 w:1)
114
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
115
	/// Storage: `System::Account` (r:2 w:2)
116
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
117
	fn payout() -> Weight {
118
		// Proof Size summary in bytes:
119
		//  Measured:  `586`
120
		//  Estimated: `6172`
121
		// Minimum execution time: 53_473_000 picoseconds.
122
		Weight::from_parts(54_803_000, 6172)
123
			.saturating_add(T::DbWeight::get().reads(3_u64))
124
			.saturating_add(T::DbWeight::get().writes(3_u64))
125
	}
126
	/// Storage: `Treasury::Spends` (r:1 w:1)
127
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
128
	fn check_status() -> Weight {
129
		// Proof Size summary in bytes:
130
		//  Measured:  `286`
131
		//  Estimated: `3522`
132
		// Minimum execution time: 11_933_000 picoseconds.
133
		Weight::from_parts(12_274_000, 3522)
134
			.saturating_add(T::DbWeight::get().reads(1_u64))
135
			.saturating_add(T::DbWeight::get().writes(1_u64))
136
	}
137
	/// Storage: `Treasury::Spends` (r:1 w:1)
138
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
139
	fn void_spend() -> Weight {
140
		// Proof Size summary in bytes:
141
		//  Measured:  `286`
142
		//  Estimated: `3522`
143
		// Minimum execution time: 10_631_000 picoseconds.
144
		Weight::from_parts(11_010_000, 3522)
145
			.saturating_add(T::DbWeight::get().reads(1_u64))
146
			.saturating_add(T::DbWeight::get().writes(1_u64))
147
	}
148
}