rococo_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-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `d3a9aad6f7a3`, 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/rococo-runtime/rococo_runtime.wasm
32// --pallet=pallet_treasury
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/rococo/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: 12_748_000 picoseconds.
65 Weight::from_parts(13_519_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_025_000 picoseconds.
77 Weight::from_parts(7_385_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: `Treasury::Deactivated` (r:1 w:1)
83 /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
84 /// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
85 /// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
86 /// The range of component `p` is `[0, 99]`.
87 fn on_initialize_proposals(p: u32, ) -> Weight {
88 // Proof Size summary in bytes:
89 // Measured: `236`
90 // Estimated: `1501`
91 // Minimum execution time: 11_611_000 picoseconds.
92 Weight::from_parts(14_424_000, 0)
93 .saturating_add(Weight::from_parts(0, 1501))
94 // Standard Error: 750
95 .saturating_add(Weight::from_parts(37_523, 0).saturating_mul(p.into()))
96 .saturating_add(T::DbWeight::get().reads(2))
97 .saturating_add(T::DbWeight::get().writes(2))
98 }
99 /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0)
100 /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
101 /// Storage: `Treasury::SpendCount` (r:1 w:1)
102 /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
103 /// Storage: `Treasury::Spends` (r:0 w:1)
104 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
105 fn spend() -> Weight {
106 // Proof Size summary in bytes:
107 // Measured: `214`
108 // Estimated: `4703`
109 // Minimum execution time: 20_171_000 picoseconds.
110 Weight::from_parts(21_114_000, 0)
111 .saturating_add(Weight::from_parts(0, 4703))
112 .saturating_add(T::DbWeight::get().reads(2))
113 .saturating_add(T::DbWeight::get().writes(2))
114 }
115 /// Storage: `Treasury::Spends` (r:1 w:1)
116 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
117 /// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
118 /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
119 /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
120 /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
121 /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
122 /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
123 /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
124 /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
125 /// Storage: `Paras::Heads` (r:1 w:0)
126 /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
127 /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
128 /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
129 /// Storage: `XcmPallet::Queries` (r:0 w:1)
130 /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
131 fn payout() -> Weight {
132 // Proof Size summary in bytes:
133 // Measured: `522`
134 // Estimated: `5318`
135 // Minimum execution time: 58_081_000 picoseconds.
136 Weight::from_parts(64_709_000, 0)
137 .saturating_add(Weight::from_parts(0, 5318))
138 .saturating_add(T::DbWeight::get().reads(7))
139 .saturating_add(T::DbWeight::get().writes(5))
140 }
141 /// Storage: `Treasury::Spends` (r:1 w:1)
142 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
143 /// Storage: `XcmPallet::Queries` (r:1 w:1)
144 /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
145 fn check_status() -> Weight {
146 // Proof Size summary in bytes:
147 // Measured: `305`
148 // Estimated: `5318`
149 // Minimum execution time: 25_238_000 picoseconds.
150 Weight::from_parts(25_654_000, 0)
151 .saturating_add(Weight::from_parts(0, 5318))
152 .saturating_add(T::DbWeight::get().reads(2))
153 .saturating_add(T::DbWeight::get().writes(2))
154 }
155 /// Storage: `Treasury::Spends` (r:1 w:1)
156 /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
157 fn void_spend() -> Weight {
158 // Proof Size summary in bytes:
159 // Measured: `277`
160 // Estimated: `5318`
161 // Minimum execution time: 14_929_000 picoseconds.
162 Weight::from_parts(15_441_000, 0)
163 .saturating_add(Weight::from_parts(0, 5318))
164 .saturating_add(T::DbWeight::get().reads(1))
165 .saturating_add(T::DbWeight::get().writes(1))
166 }
167}