westend_runtime/weights/pallet_treasury.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot 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// Polkadot 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 Polkadot. 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 32.0.0
20//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --extrinsic=*
31// --runtime=target/production/wbuild/westend-runtime/westend_runtime.wasm
32// --pallet=pallet_treasury
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/westend/src/weights
35// --wasm-execution=compiled
36// --steps=50
37// --repeat=20
38// --heap-pages=4096
39// --no-storage-info
40// --no-min-squares
41// --no-median-slopes
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46#![allow(missing_docs)]
47
48use frame_support::{traits::Get, weights::Weight};
49use core::marker::PhantomData;
50
51/// Weight functions for `pallet_treasury`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
54 /// Storage: `Treasury::ProposalCount` (r:1 w:1)
55 /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56 /// Storage: `Treasury::Approvals` (r:1 w:1)
57 /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
58 /// Storage: `Treasury::Proposals` (r:0 w:1)
59 /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
60 fn spend_local() -> Weight {
61 // Proof Size summary in bytes:
62 // Measured: `142`
63 // Estimated: `1887`
64 // Minimum execution time: 13_064_000 picoseconds.
65 Weight::from_parts(13_610_000, 0)
66 .saturating_add(Weight::from_parts(0, 1887))
67 .saturating_add(T::DbWeight::get().reads(2))
68 .saturating_add(T::DbWeight::get().writes(3))
69 }
70 /// Storage: `Treasury::Approvals` (r:1 w:1)
71 /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
72 fn remove_approval() -> Weight {
73 // Proof Size summary in bytes:
74 // Measured: `227`
75 // Estimated: `1887`
76 // Minimum execution time: 7_097_000 picoseconds.
77 Weight::from_parts(7_538_000, 0)
78 .saturating_add(Weight::from_parts(0, 1887))
79 .saturating_add(T::DbWeight::get().reads(1))
80 .saturating_add(T::DbWeight::get().writes(1))
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: `Treasury::LastSpendPeriod` (r:1 w:1)
87 /// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
88 /// The range of component `p` is `[0, 99]`.
89 fn on_initialize_proposals(p: u32, ) -> Weight {
90 // Proof Size summary in bytes:
91 // Measured: `350 + p * (1 ±0)`
92 // Estimated: `3593`
93 // Minimum execution time: 17_293_000 picoseconds.
94 Weight::from_parts(20_649_783, 0)
95 .saturating_add(Weight::from_parts(0, 3593))
96 // Standard Error: 1_076
97 .saturating_add(Weight::from_parts(61_157, 0).saturating_mul(p.into()))
98 .saturating_add(T::DbWeight::get().reads(3))
99 .saturating_add(T::DbWeight::get().writes(2))
100 }
101 /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0)
102 /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
103 /// Storage: `Treasury::SpendCount` (r:1 w:1)
104 /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
105 /// Storage: `Treasury::Spends` (r:0 w:1)
106 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
107 fn spend() -> Weight {
108 // Proof Size summary in bytes:
109 // Measured: `214`
110 // Estimated: `4703`
111 // Minimum execution time: 23_796_000 picoseconds.
112 Weight::from_parts(24_793_000, 0)
113 .saturating_add(Weight::from_parts(0, 4703))
114 .saturating_add(T::DbWeight::get().reads(2))
115 .saturating_add(T::DbWeight::get().writes(2))
116 }
117 /// Storage: `Treasury::Spends` (r:1 w:1)
118 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
119 /// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
120 /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
121 /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
122 /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
123 /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
124 /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
125 /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
126 /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
127 /// Storage: `Paras::Heads` (r:1 w:0)
128 /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
129 /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
130 /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
131 /// Storage: `XcmPallet::Queries` (r:0 w:1)
132 /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
133 fn payout() -> Weight {
134 // Proof Size summary in bytes:
135 // Measured: `489`
136 // Estimated: `5318`
137 // Minimum execution time: 60_562_000 picoseconds.
138 Weight::from_parts(62_867_000, 0)
139 .saturating_add(Weight::from_parts(0, 5318))
140 .saturating_add(T::DbWeight::get().reads(7))
141 .saturating_add(T::DbWeight::get().writes(5))
142 }
143 /// Storage: `Treasury::Spends` (r:1 w:1)
144 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
145 /// Storage: `XcmPallet::Queries` (r:1 w:1)
146 /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
147 fn check_status() -> Weight {
148 // Proof Size summary in bytes:
149 // Measured: `305`
150 // Estimated: `5318`
151 // Minimum execution time: 28_594_000 picoseconds.
152 Weight::from_parts(29_512_000, 0)
153 .saturating_add(Weight::from_parts(0, 5318))
154 .saturating_add(T::DbWeight::get().reads(2))
155 .saturating_add(T::DbWeight::get().writes(2))
156 }
157 /// Storage: `Treasury::Spends` (r:1 w:1)
158 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
159 fn void_spend() -> Weight {
160 // Proof Size summary in bytes:
161 // Measured: `277`
162 // Estimated: `5318`
163 // Minimum execution time: 18_432_000 picoseconds.
164 Weight::from_parts(19_026_000, 0)
165 .saturating_add(Weight::from_parts(0, 5318))
166 .saturating_add(T::DbWeight::get().reads(1))
167 .saturating_add(T::DbWeight::get().writes(1))
168 }
169}