pallet_rewards/weights.rs
1
2//! Autogenerated weights for pallet_rewards
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
5//! DATE: 2024-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `Ubuntu-2404-noble-amd64-base`, CPU: `Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz`
8//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
9
10// Executed Command:
11// ./target/release/subspace-node
12// benchmark
13// pallet
14// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm
15// --genesis-builder=runtime
16// --steps=50
17// --repeat=20
18// --pallet=pallet_rewards
19// --extrinsic=*
20// --wasm-execution=compiled
21// --heap-pages=4096
22// --output=./weights/pallet-rewards.rs
23// --template=./frame-weight-template.hbs
24
25#![cfg_attr(rustfmt, rustfmt_skip)]
26#![allow(unused_parens)]
27#![allow(unused_imports)]
28
29use frame_support::{traits::Get, weights::{Weight, constants::ParityDbWeight}};
30use core::marker::PhantomData;
31
32/// Weight functions needed for pallet_rewards.
33pub trait WeightInfo {
34 fn update_issuance_params(p: u32, v: u32, ) -> Weight;
35}
36
37/// Weights for pallet_rewards using the Substrate node and recommended hardware.
38pub struct SubstrateWeight<T>(PhantomData<T>);
39impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
40 /// Storage: `Rewards::ProposerSubsidyPoints` (r:0 w:1)
41 /// Proof: `Rewards::ProposerSubsidyPoints` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`)
42 /// Storage: `Rewards::VoterSubsidyPoints` (r:0 w:1)
43 /// Proof: `Rewards::VoterSubsidyPoints` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`)
44 /// The range of component `p` is `[0, 20]`.
45 /// The range of component `v` is `[0, 20]`.
46 fn update_issuance_params(p: u32, v: u32, ) -> Weight {
47 // Proof Size summary in bytes:
48 // Measured: `0`
49 // Estimated: `0`
50 // Minimum execution time: 4_580_000 picoseconds.
51 Weight::from_parts(4_871_200, 0)
52 // Standard Error: 581
53 .saturating_add(Weight::from_parts(6_370, 0).saturating_mul(p.into()))
54 // Standard Error: 581
55 .saturating_add(Weight::from_parts(9_390, 0).saturating_mul(v.into()))
56 .saturating_add(T::DbWeight::get().writes(2_u64))
57 }
58}
59
60// For backwards compatibility and tests
61impl WeightInfo for () {
62 /// Storage: `Rewards::ProposerSubsidyPoints` (r:0 w:1)
63 /// Proof: `Rewards::ProposerSubsidyPoints` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`)
64 /// Storage: `Rewards::VoterSubsidyPoints` (r:0 w:1)
65 /// Proof: `Rewards::VoterSubsidyPoints` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`)
66 /// The range of component `p` is `[0, 20]`.
67 /// The range of component `v` is `[0, 20]`.
68 fn update_issuance_params(p: u32, v: u32, ) -> Weight {
69 // Proof Size summary in bytes:
70 // Measured: `0`
71 // Estimated: `0`
72 // Minimum execution time: 4_580_000 picoseconds.
73 Weight::from_parts(4_871_200, 0)
74 // Standard Error: 581
75 .saturating_add(Weight::from_parts(6_370, 0).saturating_mul(p.into()))
76 // Standard Error: 581
77 .saturating_add(Weight::from_parts(9_390, 0).saturating_mul(v.into()))
78 .saturating_add(ParityDbWeight::get().writes(2_u64))
79 }
80}