1234567891011121314151617181920212223242526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(missing_docs)]30#![allow(clippy::unnecessary_cast)]3132use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};33use sp_std::marker::PhantomData;343536pub trait WeightInfo {37 fn enable() -> Weight;38 fn disable() -> Weight;39 fn execute_preimage() -> Weight;40}414243pub struct SubstrateWeight<T>(PhantomData<T>);44impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {45 46 fn enable() -> Weight {47 Weight::from_ref_time(10_860_000 as u64)48 .saturating_add(T::DbWeight::get().writes(1 as u64))49 }50 51 fn disable() -> Weight {52 Weight::from_ref_time(10_871_000 as u64)53 .saturating_add(T::DbWeight::get().writes(1 as u64))54 }55 56 57 fn execute_preimage() -> Weight {58 Weight::from_ref_time(10_068_000 as u64)59 .saturating_add(T::DbWeight::get().reads(2 as u64))60 }61}626364impl WeightInfo for () {65 66 fn enable() -> Weight {67 Weight::from_ref_time(10_860_000 as u64)68 .saturating_add(RocksDbWeight::get().writes(1 as u64))69 }70 71 fn disable() -> Weight {72 Weight::from_ref_time(10_871_000 as u64)73 .saturating_add(RocksDbWeight::get().writes(1 as u64))74 }75 76 77 fn execute_preimage() -> Weight {78 Weight::from_ref_time(10_068_000 as u64)79 .saturating_add(RocksDbWeight::get().reads(2 as u64))80 }81}