diff --git a/pallets/pool-fees/src/weights.rs b/pallets/pool-fees/src/weights.rs new file mode 100644 index 0000000000..a13618f548 --- /dev/null +++ b/pallets/pool-fees/src/weights.rs @@ -0,0 +1,144 @@ +//! Autogenerated weights for pallet_pool_fees +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION +//! 4.0.0-dev DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH +//! RANGE: `[]` WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: +//! Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=development +// --steps=50 +// --repeat=20 +// --pallet=pallet-pool-fees +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --template=./scripts/frame-weight-template.hbs +// --output=./pallets/pool-fees/src/weights.rs + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{ + traits::Get, + weights::{constants::RocksDbWeight, Weight}, +}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_pool_fees. +pub trait WeightInfo { + fn propose_new_fee() -> Weight; + fn apply_new_fee(n: u32) -> Weight; + fn remove_fee(n: u32) -> Weight; + fn charge_fee(n: u32) -> Weight; + fn uncharge_fee(n: u32) -> Weight; + fn update_portfolio_valuation(n: u32) -> Weight; +} + +/// Weights for pallet_pool_fees using the Substrate node and recommended +/// hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + fn propose_new_fee() -> Weight { + Weight::from_parts(43_301_000, 0) + .saturating_add(Weight::from_parts(0, 4278)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + + fn apply_new_fee(n: u32) -> Weight { + Weight::from_parts(55_397_177, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(289_076, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + + fn remove_fee(n: u32) -> Weight { + Weight::from_parts(38_370_638, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(411_219, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + + fn charge_fee(n: u32) -> Weight { + Weight::from_parts(27_231_143, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(259_721, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn uncharge_fee(n: u32) -> Weight { + Weight::from_parts(26_250_765, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(260_625, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn update_portfolio_valuation(n: u32) -> Weight { + Weight::from_parts(42_962_181, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(5_880_090, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + fn propose_new_fee() -> Weight { + Weight::from_parts(43_301_000, 0) + .saturating_add(Weight::from_parts(0, 4278)) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + + fn apply_new_fee(n: u32) -> Weight { + Weight::from_parts(55_397_177, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(289_076, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(4)) + } + + fn remove_fee(n: u32) -> Weight { + Weight::from_parts(38_370_638, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(411_219, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + + fn charge_fee(n: u32) -> Weight { + Weight::from_parts(27_231_143, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(259_721, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + + fn uncharge_fee(n: u32) -> Weight { + Weight::from_parts(26_250_765, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(260_625, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + + fn update_portfolio_valuation(n: u32) -> Weight { + Weight::from_parts(42_962_181, 0) + .saturating_add(Weight::from_parts(0, 17508)) + .saturating_add(Weight::from_parts(5_880_090, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(2)) + } +}