mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
Deprecate Weight::from_{ref_time, proof_size} (#13475)
* Deprecate Weight::from_{ref_time, proof_size}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update templates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Dont revert comment 🤦
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
* Update weight files
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Adapt to Master changes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
7981d4aa59
commit
9e56e1acdd
@@ -329,7 +329,7 @@ impl<T: pallet_balances::Config> WeighData<(&BalanceOf<T>,)> for WeightForSetDum
|
||||
let multiplier = self.0;
|
||||
// *target.0 is the amount passed into the extrinsic
|
||||
let cents = *target.0 / <BalanceOf<T>>::from(MILLICENTS);
|
||||
Weight::from_ref_time((cents * multiplier).saturated_into::<u64>())
|
||||
Weight::from_parts((cents * multiplier).saturated_into::<u64>(), 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,20 +56,20 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: BasicExample Dummy (r:0 w:1)
|
||||
fn set_dummy_benchmark() -> Weight {
|
||||
Weight::from_ref_time(19_000_000 as u64)
|
||||
Weight::from_parts(19_000_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: BasicExample Dummy (r:1 w:1)
|
||||
fn accumulate_dummy() -> Weight {
|
||||
Weight::from_ref_time(18_000_000 as u64)
|
||||
Weight::from_parts(18_000_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
/// The range of component `x` is `[0, 10000]`.
|
||||
fn sort_vector(x: u32, ) -> Weight {
|
||||
Weight::from_ref_time(0 as u64)
|
||||
Weight::from_parts(0 as u64, 0)
|
||||
// Standard Error: 2
|
||||
.saturating_add(Weight::from_ref_time(520 as u64).saturating_mul(x as u64))
|
||||
.saturating_add(Weight::from_parts(520 as u64, 0).saturating_mul(x as u64))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,19 +77,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
impl WeightInfo for () {
|
||||
// Storage: BasicExample Dummy (r:0 w:1)
|
||||
fn set_dummy_benchmark() -> Weight {
|
||||
Weight::from_ref_time(19_000_000 as u64)
|
||||
Weight::from_parts(19_000_000 as u64, 0)
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: BasicExample Dummy (r:1 w:1)
|
||||
fn accumulate_dummy() -> Weight {
|
||||
Weight::from_ref_time(18_000_000 as u64)
|
||||
Weight::from_parts(18_000_000 as u64, 0)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as u64))
|
||||
}
|
||||
/// The range of component `x` is `[0, 10000]`.
|
||||
fn sort_vector(x: u32, ) -> Weight {
|
||||
Weight::from_ref_time(0 as u64)
|
||||
Weight::from_parts(0 as u64, 0)
|
||||
// Standard Error: 2
|
||||
.saturating_add(Weight::from_ref_time(520 as u64).saturating_mul(x as u64))
|
||||
.saturating_add(Weight::from_parts(520 as u64, 0).saturating_mul(x as u64))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user