1234567891011121314151617181920212223242526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;333435pub trait WeightInfo {36 fn enable() -> Weight;37 fn disable() -> Weight;38 fn execute_preimage() -> Weight;39}404142pub struct SubstrateWeight<T>(PhantomData<T>);43impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {44 45 fn enable() -> Weight {46 Weight::from_ref_time(7_367_000)47 .saturating_add(T::DbWeight::get().writes(1))48 }49 50 fn disable() -> Weight {51 Weight::from_ref_time(7_273_000)52 .saturating_add(T::DbWeight::get().writes(1))53 }54 55 fn execute_preimage() -> Weight {56 Weight::from_ref_time(7_273_000)57 .saturating_add(T::DbWeight::get().reads(2))58 .saturating_add(T::DbWeight::get().writes(1))59 }60}616263impl WeightInfo for () {64 65 fn enable() -> Weight {66 Weight::from_ref_time(7_367_000)67 .saturating_add(RocksDbWeight::get().writes(1))68 }69 70 fn disable() -> Weight {71 Weight::from_ref_time(7_273_000)72 .saturating_add(RocksDbWeight::get().writes(1))73 }74 75 fn execute_preimage() -> Weight {76 Weight::from_ref_time(7_273_000)77 .saturating_add(RocksDbWeight::get().reads(2))78 .saturating_add(RocksDbWeight::get().writes(1))79 }80}