1
// Copyright 2025 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

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

            
26
// Executed Command:
27
// ./frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_treasury
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonbeam/src/weights
42

            
43
#![cfg_attr(rustfmt, rustfmt_skip)]
44
#![allow(unused_parens)]
45
#![allow(unused_imports)]
46

            
47
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48
use sp_std::marker::PhantomData;
49

            
50
/// Weights for `pallet_treasury`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
53
	/// Storage: `Treasury::ProposalCount` (r:1 w:1)
54
	/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
55
	/// Storage: `Treasury::Approvals` (r:1 w:1)
56
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
57
	/// Storage: `Treasury::Proposals` (r:0 w:1)
58
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
59
	fn spend_local() -> Weight {
60
		// Proof Size summary in bytes:
61
		//  Measured:  `180`
62
		//  Estimated: `1887`
63
		// Minimum execution time: 12_960_000 picoseconds.
64
		Weight::from_parts(13_451_000, 1887)
65
			.saturating_add(T::DbWeight::get().reads(2_u64))
66
			.saturating_add(T::DbWeight::get().writes(3_u64))
67
	}
68
	/// Storage: `Treasury::Approvals` (r:1 w:1)
69
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
70
	fn remove_approval() -> Weight {
71
		// Proof Size summary in bytes:
72
		//  Measured:  `265`
73
		//  Estimated: `1887`
74
		// Minimum execution time: 7_987_000 picoseconds.
75
		Weight::from_parts(8_457_000, 1887)
76
			.saturating_add(T::DbWeight::get().reads(1_u64))
77
			.saturating_add(T::DbWeight::get().writes(1_u64))
78
	}
79
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
80
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
81
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
82
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
83
	/// Storage: `Treasury::Approvals` (r:1 w:1)
84
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
85
	/// Storage: `Treasury::Proposals` (r:99 w:99)
86
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
87
	/// Storage: `System::Account` (r:99 w:99)
88
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
89
	/// The range of component `p` is `[0, 99]`.
90
	fn on_initialize_proposals(p: u32, ) -> Weight {
91
		// Proof Size summary in bytes:
92
		//  Measured:  `522 + p * (146 ±0)`
93
		//  Estimated: `1887 + p * (2591 ±0)`
94
		// Minimum execution time: 18_645_000 picoseconds.
95
		Weight::from_parts(29_685_347, 1887)
96
			// Standard Error: 12_588
97
			.saturating_add(Weight::from_parts(22_165_395, 0).saturating_mul(p.into()))
98
			.saturating_add(T::DbWeight::get().reads(3_u64))
99
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(p.into())))
100
			.saturating_add(T::DbWeight::get().writes(3_u64))
101
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into())))
102
			.saturating_add(Weight::from_parts(0, 2591).saturating_mul(p.into()))
103
	}
104
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
105
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
106
	/// Storage: `Treasury::Spends` (r:0 w:1)
107
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
108
6
	fn spend() -> Weight {
109
6
		// Proof Size summary in bytes:
110
6
		//  Measured:  `180`
111
6
		//  Estimated: `1489`
112
6
		// Minimum execution time: 11_856_000 picoseconds.
113
6
		Weight::from_parts(12_227_000, 1489)
114
6
			.saturating_add(T::DbWeight::get().reads(1_u64))
115
6
			.saturating_add(T::DbWeight::get().writes(2_u64))
116
6
	}
117
	/// Storage: `Treasury::Spends` (r:1 w:1)
118
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
119
	/// Storage: `System::Account` (r:1 w:1)
120
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
121
	fn payout() -> Weight {
122
		// Proof Size summary in bytes:
123
		//  Measured:  `424`
124
		//  Estimated: `3581`
125
		// Minimum execution time: 53_444_000 picoseconds.
126
		Weight::from_parts(54_279_000, 3581)
127
			.saturating_add(T::DbWeight::get().reads(2_u64))
128
			.saturating_add(T::DbWeight::get().writes(2_u64))
129
	}
130
	/// Storage: `Treasury::Spends` (r:1 w:1)
131
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
132
	fn check_status() -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `286`
135
		//  Estimated: `3522`
136
		// Minimum execution time: 13_999_000 picoseconds.
137
		Weight::from_parts(14_535_000, 3522)
138
			.saturating_add(T::DbWeight::get().reads(1_u64))
139
			.saturating_add(T::DbWeight::get().writes(1_u64))
140
	}
141
	/// Storage: `Treasury::Spends` (r:1 w:1)
142
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
143
	fn void_spend() -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `286`
146
		//  Estimated: `3522`
147
		// Minimum execution time: 12_863_000 picoseconds.
148
		Weight::from_parts(13_328_000, 3522)
149
			.saturating_add(T::DbWeight::get().reads(1_u64))
150
			.saturating_add(T::DbWeight::get().writes(1_u64))
151
	}
152
}