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_ranked_collective
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
21
//! DATE: 2024-09-25, 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("starlight-dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_ranked_collective
34
// --extrinsic
35
// *
36
// --chain=starlight-dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-runtime-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// tmp/starlight_weights/pallet_ranked_collective.rs
46

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

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

            
54
/// Weights for pallet_ranked_collective using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `FellowshipCollective::Members` (r:1 w:1)
58
	/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
59
	/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
60
	/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
61
	/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
62
	/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
63
	/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:1)
64
	/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
65
	fn add_member() -> Weight {
66
		// Proof Size summary in bytes:
67
		//  Measured:  `76`
68
		//  Estimated: `3507`
69
		// Minimum execution time: 19_134_000 picoseconds.
70
		Weight::from_parts(19_599_000, 3507)
71
			.saturating_add(T::DbWeight::get().reads(2_u64))
72
			.saturating_add(T::DbWeight::get().writes(4_u64))
73
	}
74
	/// Storage: `FellowshipCollective::Members` (r:1 w:1)
75
	/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
76
	/// Storage: `FellowshipCollective::MemberCount` (r:11 w:11)
77
	/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
78
	/// Storage: `FellowshipCollective::IdToIndex` (r:11 w:22)
79
	/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
80
	/// Storage: `FellowshipCollective::IndexToId` (r:11 w:22)
81
	/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
82
	/// The range of component `r` is `[0, 10]`.
83
	fn remove_member(r: u32, ) -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `550 + r * (281 ±0)`
86
		//  Estimated: `3519 + r * (2529 ±0)`
87
		// Minimum execution time: 38_243_000 picoseconds.
88
		Weight::from_parts(40_389_216, 3519)
89
			// Standard Error: 18_987
90
			.saturating_add(Weight::from_parts(18_693_673, 0).saturating_mul(r.into()))
91
			.saturating_add(T::DbWeight::get().reads(4_u64))
92
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
93
			.saturating_add(T::DbWeight::get().writes(6_u64))
94
			.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into())))
95
			.saturating_add(Weight::from_parts(0, 2529).saturating_mul(r.into()))
96
	}
97
	/// Storage: `FellowshipCollective::Members` (r:1 w:1)
98
	/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
99
	/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
100
	/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
101
	/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
102
	/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
103
	/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:1)
104
	/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
105
	/// The range of component `r` is `[0, 10]`.
106
	fn promote_member(r: u32, ) -> Weight {
107
		// Proof Size summary in bytes:
108
		//  Measured:  `248 + r * (17 ±0)`
109
		//  Estimated: `3507`
110
		// Minimum execution time: 22_212_000 picoseconds.
111
		Weight::from_parts(23_195_098, 3507)
112
			// Standard Error: 4_190
113
			.saturating_add(Weight::from_parts(322_475, 0).saturating_mul(r.into()))
114
			.saturating_add(T::DbWeight::get().reads(2_u64))
115
			.saturating_add(T::DbWeight::get().writes(4_u64))
116
	}
117
	/// Storage: `FellowshipCollective::Members` (r:1 w:1)
118
	/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
119
	/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
120
	/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
121
	/// Storage: `FellowshipCollective::IdToIndex` (r:1 w:2)
122
	/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
123
	/// Storage: `FellowshipCollective::IndexToId` (r:1 w:2)
124
	/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
125
	/// The range of component `r` is `[0, 10]`.
126
	fn demote_member(r: u32, ) -> Weight {
127
		// Proof Size summary in bytes:
128
		//  Measured:  `566 + r * (72 ±0)`
129
		//  Estimated: `3519`
130
		// Minimum execution time: 38_282_000 picoseconds.
131
		Weight::from_parts(40_706_504, 3519)
132
			// Standard Error: 15_687
133
			.saturating_add(Weight::from_parts(661_773, 0).saturating_mul(r.into()))
134
			.saturating_add(T::DbWeight::get().reads(4_u64))
135
			.saturating_add(T::DbWeight::get().writes(6_u64))
136
	}
137
	/// Storage: `FellowshipCollective::Members` (r:1 w:0)
138
	/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
139
	/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
140
	/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
141
	/// Storage: `FellowshipCollective::Voting` (r:1 w:1)
142
	/// Proof: `FellowshipCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
143
	/// Storage: `Scheduler::Agenda` (r:2 w:2)
144
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
145
	/// Storage: `Scheduler::Retries` (r:0 w:1)
146
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
147
	fn vote() -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `564`
150
		//  Estimated: `83866`
151
		// Minimum execution time: 53_262_000 picoseconds.
152
		Weight::from_parts(54_397_000, 83866)
153
			.saturating_add(T::DbWeight::get().reads(5_u64))
154
			.saturating_add(T::DbWeight::get().writes(5_u64))
155
	}
156
	/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0)
157
	/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
158
	/// Storage: `FellowshipCollective::VotingCleanup` (r:1 w:0)
159
	/// Proof: `FellowshipCollective::VotingCleanup` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
160
	/// Storage: `FellowshipCollective::Voting` (r:100 w:100)
161
	/// Proof: `FellowshipCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
162
	/// The range of component `n` is `[0, 100]`.
163
	fn cleanup_poll(n: u32, ) -> Weight {
164
		// Proof Size summary in bytes:
165
		//  Measured:  `398 + n * (50 ±0)`
166
		//  Estimated: `4365 + n * (2540 ±0)`
167
		// Minimum execution time: 17_722_000 picoseconds.
168
		Weight::from_parts(21_050_902, 4365)
169
			// Standard Error: 2_236
170
			.saturating_add(Weight::from_parts(1_213_159, 0).saturating_mul(n.into()))
171
			.saturating_add(T::DbWeight::get().reads(2_u64))
172
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
173
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
174
			.saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into()))
175
	}
176
	/// Storage: `FellowshipCollective::Members` (r:2 w:2)
177
	/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
178
	/// Storage: `FellowshipCollective::MemberCount` (r:2 w:2)
179
	/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
180
	/// Storage: `FellowshipCollective::IdToIndex` (r:2 w:4)
181
	/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
182
	/// Storage: `FellowshipCollective::IndexToId` (r:0 w:2)
183
	/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
184
	fn exchange_member() -> Weight {
185
		// Proof Size summary in bytes:
186
		//  Measured:  `371`
187
		//  Estimated: `6048`
188
		// Minimum execution time: 57_838_000 picoseconds.
189
		Weight::from_parts(59_233_000, 6048)
190
			.saturating_add(T::DbWeight::get().reads(6_u64))
191
			.saturating_add(T::DbWeight::get().writes(10_u64))
192
	}
193
}