mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 14:47:55 +00:00
Remove RefTimeWeight (#12157)
* update api * update * remove unused * remove `one` api * fix unused * fmt * add saturating accrue * remove `Weight::new()` * use some macros * div makes no sense * Update weight_v2.rs * missed some * more patch * fixes * more fixes * more fix * more fix * remove RefTimeWeight * Update frame/contracts/src/storage.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * not needed * Fixes Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight, constants::RocksDbWeight}};
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for pallet_utility.
|
||||
@@ -58,27 +58,27 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch(c: u32, ) -> Weight {
|
||||
Weight::from_ref_time(23_113_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(23_113_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(2_701_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(2_701_000 as u64).saturating_mul(c as u64))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
Weight::from_ref_time(4_182_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(4_182_000 as u64)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
Weight::from_ref_time(18_682_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(18_682_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(2_794_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(2_794_000 as u64).saturating_mul(c as u64))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
Weight::from_ref_time(12_049_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(12_049_000 as u64)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn force_batch(c: u32, ) -> Weight {
|
||||
Weight::from_ref_time(19_136_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(19_136_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(2_697_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(2_697_000 as u64).saturating_mul(c as u64))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,26 +86,26 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
impl WeightInfo for () {
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch(c: u32, ) -> Weight {
|
||||
Weight::from_ref_time(23_113_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(23_113_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(2_701_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(2_701_000 as u64).saturating_mul(c as u64))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
Weight::from_ref_time(4_182_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(4_182_000 as u64)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
Weight::from_ref_time(18_682_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(18_682_000 as u64)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add(Weight::from_ref_time(2_794_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(2_794_000 as u64).saturating_mul(c as u64))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
Weight::from_ref_time(12_049_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(12_049_000 as u64)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn force_batch(c: u32, ) -> Weight {
|
||||
Weight::from_ref_time(19_136_000 as RefTimeWeight)
|
||||
Weight::from_ref_time(19_136_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(2_697_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
|
||||
.saturating_add(Weight::from_ref_time(2_697_000 as u64).saturating_mul(c as u64))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user