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 43.0.0
20
//! DATE: 2025-02-04, 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: None, DB CACHE: 1024
24

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

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

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

            
48
/// Weights for `pallet_treasury`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
51
	/// Storage: `Treasury::ProposalCount` (r:1 w:1)
52
	/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
53
	/// Storage: `Treasury::Approvals` (r:1 w:1)
54
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
55
	/// Storage: `Treasury::Proposals` (r:0 w:1)
56
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
57
	fn spend_local() -> Weight {
58
		// Proof Size summary in bytes:
59
		//  Measured:  `180`
60
		//  Estimated: `1887`
61
		// Minimum execution time: 12_966_000 picoseconds.
62
		Weight::from_parts(13_417_000, 1887)
63
			.saturating_add(T::DbWeight::get().reads(2_u64))
64
			.saturating_add(T::DbWeight::get().writes(3_u64))
65
	}
66
	/// Storage: `Treasury::Approvals` (r:1 w:1)
67
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
68
	fn remove_approval() -> Weight {
69
		// Proof Size summary in bytes:
70
		//  Measured:  `265`
71
		//  Estimated: `1887`
72
		// Minimum execution time: 8_003_000 picoseconds.
73
		Weight::from_parts(8_284_000, 1887)
74
			.saturating_add(T::DbWeight::get().reads(1_u64))
75
			.saturating_add(T::DbWeight::get().writes(1_u64))
76
	}
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
	/// Storage: `System::Account` (r:99 w:99)
86
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
87
	/// The range of component `p` is `[0, 99]`.
88
	fn on_initialize_proposals(p: u32, ) -> Weight {
89
		// Proof Size summary in bytes:
90
		//  Measured:  `514 + p * (145 ±0)`
91
		//  Estimated: `1887 + p * (2591 ±0)`
92
		// Minimum execution time: 18_635_000 picoseconds.
93
		Weight::from_parts(27_516_554, 1887)
94
			// Standard Error: 14_235
95
			.saturating_add(Weight::from_parts(20_994_665, 0).saturating_mul(p.into()))
96
			.saturating_add(T::DbWeight::get().reads(3_u64))
97
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(p.into())))
98
			.saturating_add(T::DbWeight::get().writes(3_u64))
99
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into())))
100
			.saturating_add(Weight::from_parts(0, 2591).saturating_mul(p.into()))
101
	}
102
	/// Storage: `Treasury::SpendCount` (r:1 w:1)
103
	/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
104
	/// Storage: `Treasury::Spends` (r:0 w:1)
105
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
106
8
	fn spend() -> Weight {
107
8
		// Proof Size summary in bytes:
108
8
		//  Measured:  `180`
109
8
		//  Estimated: `1489`
110
8
		// Minimum execution time: 11_675_000 picoseconds.
111
8
		Weight::from_parts(12_055_000, 1489)
112
8
			.saturating_add(T::DbWeight::get().reads(1_u64))
113
8
			.saturating_add(T::DbWeight::get().writes(2_u64))
114
8
	}
115
	/// Storage: `Treasury::Spends` (r:1 w:1)
116
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
117
	/// Storage: `System::Account` (r:1 w:1)
118
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
119
	fn payout() -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `391`
122
		//  Estimated: `3581`
123
		// Minimum execution time: 52_458_000 picoseconds.
124
		Weight::from_parts(53_496_000, 3581)
125
			.saturating_add(T::DbWeight::get().reads(2_u64))
126
			.saturating_add(T::DbWeight::get().writes(2_u64))
127
	}
128
	/// Storage: `Treasury::Spends` (r:1 w:1)
129
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
130
	fn check_status() -> Weight {
131
		// Proof Size summary in bytes:
132
		//  Measured:  `286`
133
		//  Estimated: `3522`
134
		// Minimum execution time: 13_869_000 picoseconds.
135
		Weight::from_parts(14_582_000, 3522)
136
			.saturating_add(T::DbWeight::get().reads(1_u64))
137
			.saturating_add(T::DbWeight::get().writes(1_u64))
138
	}
139
	/// Storage: `Treasury::Spends` (r:1 w:1)
140
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
141
	fn void_spend() -> Weight {
142
		// Proof Size summary in bytes:
143
		//  Measured:  `286`
144
		//  Estimated: `3522`
145
		// Minimum execution time: 12_651_000 picoseconds.
146
		Weight::from_parts(13_290_000, 3522)
147
			.saturating_add(T::DbWeight::get().reads(1_u64))
148
			.saturating_add(T::DbWeight::get().writes(1_u64))
149
	}
150
}