mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +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
@@ -308,8 +308,8 @@ fn as_derivative_works() {
|
||||
#[test]
|
||||
fn as_derivative_handles_weight_refund() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let start_weight = Weight::from_ref_time(100);
|
||||
let end_weight = Weight::from_ref_time(75);
|
||||
let start_weight = Weight::from_parts(100, 0);
|
||||
let end_weight = Weight::from_parts(75, 0);
|
||||
let diff = start_weight - end_weight;
|
||||
|
||||
// Full weight when ok
|
||||
@@ -495,8 +495,8 @@ fn batch_weight_calculation_doesnt_overflow() {
|
||||
#[test]
|
||||
fn batch_handles_weight_refund() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let start_weight = Weight::from_ref_time(100);
|
||||
let end_weight = Weight::from_ref_time(75);
|
||||
let start_weight = Weight::from_parts(100, 0);
|
||||
let end_weight = Weight::from_parts(75, 0);
|
||||
let diff = start_weight - end_weight;
|
||||
let batch_len = 4;
|
||||
|
||||
@@ -611,8 +611,8 @@ fn batch_all_revert() {
|
||||
#[test]
|
||||
fn batch_all_handles_weight_refund() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let start_weight = Weight::from_ref_time(100);
|
||||
let end_weight = Weight::from_ref_time(75);
|
||||
let start_weight = Weight::from_parts(100, 0);
|
||||
let end_weight = Weight::from_parts(75, 0);
|
||||
let diff = start_weight - end_weight;
|
||||
let batch_len = 4;
|
||||
|
||||
@@ -739,7 +739,7 @@ fn force_batch_works() {
|
||||
RuntimeOrigin::signed(1),
|
||||
vec![
|
||||
call_transfer(2, 5),
|
||||
call_foobar(true, Weight::from_ref_time(75), None),
|
||||
call_foobar(true, Weight::from_parts(75, 0), None),
|
||||
call_transfer(2, 10),
|
||||
call_transfer(2, 5),
|
||||
]
|
||||
|
||||
@@ -64,16 +64,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_742 nanoseconds.
|
||||
Weight::from_ref_time(16_087_635)
|
||||
Weight::from_parts(16_087_635, 0)
|
||||
// Standard Error: 2_411
|
||||
.saturating_add(Weight::from_ref_time(3_665_506).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(3_665_506, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_802 nanoseconds.
|
||||
Weight::from_ref_time(5_269_000)
|
||||
Weight::from_parts(5_269_000, 0)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
@@ -81,16 +81,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_100 nanoseconds.
|
||||
Weight::from_ref_time(14_090_381)
|
||||
Weight::from_parts(14_090_381, 0)
|
||||
// Standard Error: 1_917
|
||||
.saturating_add(Weight::from_ref_time(3_744_891).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(3_744_891, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_840 nanoseconds.
|
||||
Weight::from_ref_time(9_280_000)
|
||||
Weight::from_parts(9_280_000, 0)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn force_batch(c: u32, ) -> Weight {
|
||||
@@ -98,9 +98,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_245 nanoseconds.
|
||||
Weight::from_ref_time(14_292_923)
|
||||
Weight::from_parts(14_292_923, 0)
|
||||
// Standard Error: 1_803
|
||||
.saturating_add(Weight::from_ref_time(3_645_950).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(3_645_950, 0).saturating_mul(c.into()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,16 +112,16 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_742 nanoseconds.
|
||||
Weight::from_ref_time(16_087_635)
|
||||
Weight::from_parts(16_087_635, 0)
|
||||
// Standard Error: 2_411
|
||||
.saturating_add(Weight::from_ref_time(3_665_506).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(3_665_506, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_802 nanoseconds.
|
||||
Weight::from_ref_time(5_269_000)
|
||||
Weight::from_parts(5_269_000, 0)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
@@ -129,16 +129,16 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_100 nanoseconds.
|
||||
Weight::from_ref_time(14_090_381)
|
||||
Weight::from_parts(14_090_381, 0)
|
||||
// Standard Error: 1_917
|
||||
.saturating_add(Weight::from_ref_time(3_744_891).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(3_744_891, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_840 nanoseconds.
|
||||
Weight::from_ref_time(9_280_000)
|
||||
Weight::from_parts(9_280_000, 0)
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn force_batch(c: u32, ) -> Weight {
|
||||
@@ -146,8 +146,8 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_245 nanoseconds.
|
||||
Weight::from_ref_time(14_292_923)
|
||||
Weight::from_parts(14_292_923, 0)
|
||||
// Standard Error: 1_803
|
||||
.saturating_add(Weight::from_ref_time(3_645_950).saturating_mul(c.into()))
|
||||
.saturating_add(Weight::from_parts(3_645_950, 0).saturating_mul(c.into()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user