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_treasury
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
21
//! DATE: 2025-11-03, 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
// --wasm-execution=compiled
31
// --pallet
32
// pallet_treasury
33
// --extrinsic
34
// *
35
// --chain=dev
36
// --steps
37
// 50
38
// --repeat
39
// 20
40
// --template=benchmarking/frame-weight-runtime-template.hbs
41
// --json-file
42
// raw.json
43
// --output
44
// tmp/dancebox_weights/pallet_treasury.rs
45

            
46
#![cfg_attr(rustfmt, rustfmt_skip)]
47
#![allow(unused_parens)]
48
#![allow(unused_imports)]
49

            
50
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51
use core::marker::PhantomData;
52

            
53
/// Weights for pallet_treasury using the Substrate node and recommended hardware.
54
pub struct SubstrateWeight<T>(PhantomData<T>);
55
impl<T: frame_system::Config> pallet_treasury::WeightInfo for SubstrateWeight<T> {
56
	/// Storage: `Treasury::ProposalCount` (r:1 w:1)
57
	/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
58
	/// Storage: `Treasury::Approvals` (r:1 w:1)
59
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
60
	/// Storage: `Treasury::Proposals` (r:0 w:1)
61
	/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
62
	fn spend_local() -> Weight {
63
		// Proof Size summary in bytes:
64
		//  Measured:  `147`
65
		//  Estimated: `1887`
66
		// Minimum execution time: 18_020_000 picoseconds.
67
		Weight::from_parts(18_468_000, 1887)
68
			.saturating_add(T::DbWeight::get().reads(2_u64))
69
			.saturating_add(T::DbWeight::get().writes(3_u64))
70
	}
71
	/// Storage: `Treasury::Approvals` (r:1 w:1)
72
	/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
73
	fn remove_approval() -> Weight {
74
		// Proof Size summary in bytes:
75
		//  Measured:  `232`
76
		//  Estimated: `1887`
77
		// Minimum execution time: 10_346_000 picoseconds.
78
		Weight::from_parts(10_737_000, 1887)
79
			.saturating_add(T::DbWeight::get().reads(1_u64))
80
			.saturating_add(T::DbWeight::get().writes(1_u64))
81
	}
82
	/// Storage: `System::Account` (r:1 w:0)
83
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
84
	/// Storage: `Treasury::Deactivated` (r:1 w:1)
85
	/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
86
	/// Storage: `Balances::InactiveIssuance` (r:1 w:1)
87
	/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
88
	/// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
89
	/// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
90
	/// The range of component `p` is `[0, 99]`.
91
12
	fn on_initialize_proposals(p: u32, ) -> Weight {
92
		// Proof Size summary in bytes:
93
		//  Measured:  `405`
94
		//  Estimated: `3593`
95
		// Minimum execution time: 20_149_000 picoseconds.
96
12
		Weight::from_parts(23_652_952, 3593)
97
			// Standard Error: 1_274
98
12
			.saturating_add(Weight::from_parts(59_645, 0).saturating_mul(p.into()))
99
12
			.saturating_add(T::DbWeight::get().reads(4_u64))
100
12
			.saturating_add(T::DbWeight::get().writes(3_u64))
101
12
	}
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(69), added: 2544, mode: `MaxEncodedLen`)
106
	fn spend() -> Weight {
107
		// Proof Size summary in bytes:
108
		//  Measured:  `147`
109
		//  Estimated: `1489`
110
		// Minimum execution time: 16_183_000 picoseconds.
111
		Weight::from_parts(16_794_000, 1489)
112
			.saturating_add(T::DbWeight::get().reads(1_u64))
113
			.saturating_add(T::DbWeight::get().writes(2_u64))
114
	}
115
	/// Storage: `Treasury::Spends` (r:1 w:1)
116
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
117
	/// Storage: `System::Account` (r:2 w:2)
118
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
119
	fn payout() -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `545`
122
		//  Estimated: `6196`
123
		// Minimum execution time: 69_251_000 picoseconds.
124
		Weight::from_parts(70_011_000, 6196)
125
			.saturating_add(T::DbWeight::get().reads(3_u64))
126
			.saturating_add(T::DbWeight::get().writes(3_u64))
127
	}
128
	/// Storage: `Treasury::Spends` (r:1 w:1)
129
	/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
130
	fn check_status() -> Weight {
131
		// Proof Size summary in bytes:
132
		//  Measured:  `265`
133
		//  Estimated: `3534`
134
		// Minimum execution time: 18_440_000 picoseconds.
135
		Weight::from_parts(18_722_000, 3534)
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(69), added: 2544, mode: `MaxEncodedLen`)
141
	fn void_spend() -> Weight {
142
		// Proof Size summary in bytes:
143
		//  Measured:  `265`
144
		//  Estimated: `3534`
145
		// Minimum execution time: 17_255_000 picoseconds.
146
		Weight::from_parts(17_748_000, 3534)
147
			.saturating_add(T::DbWeight::get().reads(1_u64))
148
			.saturating_add(T::DbWeight::get().writes(1_u64))
149
	}
150
}