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:
Oliver Tale-Yazdi
2023-03-02 22:28:17 +01:00
committed by GitHub
parent 7981d4aa59
commit 9e56e1acdd
101 changed files with 2695 additions and 2857 deletions
+8 -10
View File
@@ -52,12 +52,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
Weight::from_ref_time({{underscore benchmark.base_weight}})
.saturating_add(Weight::from_proof_size({{benchmark.base_calculated_proof_size}}))
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
@@ -72,7 +71,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into()))
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
@@ -95,12 +94,11 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
Weight::from_ref_time({{underscore benchmark.base_weight}})
.saturating_add(Weight::from_proof_size({{benchmark.base_calculated_proof_size}}))
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
@@ -115,7 +113,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into()))
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
+2 -2
View File
@@ -682,7 +682,7 @@ fn deploying_wasm_contract_should_work() {
Runtime,
> {
value: 0,
gas_limit: Weight::from_ref_time(500_000_000),
gas_limit: Weight::from_parts(500_000_000, 0),
storage_deposit_limit: None,
code: transfer_code,
data: Vec::new(),
@@ -694,7 +694,7 @@ fn deploying_wasm_contract_should_work() {
function: RuntimeCall::Contracts(pallet_contracts::Call::call::<Runtime> {
dest: sp_runtime::MultiAddress::Id(addr.clone()),
value: 10,
gas_limit: Weight::from_ref_time(500_000_000),
gas_limit: Weight::from_parts(500_000_000, 0),
storage_deposit_limit: None,
data: vec![0x00, 0x01, 0x02, 0x03],
}),
+10 -10
View File
@@ -199,8 +199,8 @@ mod multiplier_tests {
let fm = Multiplier::saturating_from_rational(1, 2);
let test_set = vec![
(Weight::zero(), fm),
(Weight::from_ref_time(100), fm),
(Weight::from_ref_time(1000), fm),
(Weight::from_parts(100, 0), fm),
(Weight::from_parts(1000, 0), fm),
(target(), fm),
(max_normal() / 2, fm),
(max_normal(), fm),
@@ -285,7 +285,7 @@ mod multiplier_tests {
// almost full. The entire quota of normal transactions is taken.
let block_weight = BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap() -
Weight::from_ref_time(100);
Weight::from_parts(100, 0);
// Default substrate weight.
let tx_weight = frame_support::weights::constants::ExtrinsicBaseWeight::get();
@@ -409,23 +409,23 @@ mod multiplier_tests {
#[test]
fn weight_to_fee_should_not_overflow_on_large_weights() {
let kb = Weight::from_ref_time(1024);
let kb = Weight::from_parts(1024, 0);
let mb = 1024u64 * kb;
let max_fm = Multiplier::saturating_from_integer(i128::MAX);
// check that for all values it can compute, correctly.
vec![
Weight::zero(),
Weight::from_ref_time(1),
Weight::from_ref_time(10),
Weight::from_ref_time(1000),
Weight::from_parts(1, 0),
Weight::from_parts(10, 0),
Weight::from_parts(1000, 0),
kb,
10u64 * kb,
100u64 * kb,
mb,
10u64 * mb,
Weight::from_ref_time(2147483647),
Weight::from_ref_time(4294967295),
Weight::from_parts(2147483647, 0),
Weight::from_parts(4294967295, 0),
BlockWeights::get().max_block / 2,
BlockWeights::get().max_block,
Weight::MAX / 2,
@@ -442,7 +442,7 @@ mod multiplier_tests {
// Some values that are all above the target and will cause an increase.
let t = target();
vec![t + Weight::from_ref_time(100), t * 2, t * 4].into_iter().for_each(|i| {
vec![t + Weight::from_parts(100, 0), t * 2, t * 4].into_iter().for_each(|i| {
run_with_system_weight(i, || {
let fm = runtime_multiplier_update(max_fm);
// won't grow. The convert saturates everything.
+76 -76
View File
@@ -93,15 +93,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_849 nanoseconds.
Weight::from_parts(29_823_933, 11659)
// Standard Error: 74
.saturating_add(Weight::from_ref_time(830).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(830, 0).saturating_mul(b.into()))
// Standard Error: 775
.saturating_add(Weight::from_ref_time(22_980).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(22_980, 0).saturating_mul(m.into()))
// Standard Error: 765
.saturating_add(Weight::from_ref_time(90_520).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(90_520, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(Weight::from_proof_size(132).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 132).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -115,10 +115,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 23_570 nanoseconds.
Weight::from_parts(25_473_196, 9337)
// Standard Error: 824
.saturating_add(Weight::from_ref_time(54_603).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(54_603, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(64).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -139,13 +139,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 35_373 nanoseconds.
Weight::from_parts(32_763_656, 11979)
// Standard Error: 2_041
.saturating_add(Weight::from_ref_time(52_915).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(52_915, 0).saturating_mul(m.into()))
// Standard Error: 1_991
.saturating_add(Weight::from_ref_time(78_594).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(78_594, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(388).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(148).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 388).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 148).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -167,15 +167,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 44_590 nanoseconds.
Weight::from_parts(43_367_913, 15730)
// Standard Error: 71
.saturating_add(Weight::from_ref_time(819).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(819, 0).saturating_mul(b.into()))
// Standard Error: 751
.saturating_add(Weight::from_ref_time(39_124).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(39_124, 0).saturating_mul(m.into()))
// Standard Error: 732
.saturating_add(Weight::from_ref_time(90_469).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(90_469, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(388).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(164).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 388).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 164).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -198,13 +198,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 36_796 nanoseconds.
Weight::from_parts(34_578_765, 13201)
// Standard Error: 1_037
.saturating_add(Weight::from_ref_time(43_508).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(43_508, 0).saturating_mul(m.into()))
// Standard Error: 1_024
.saturating_add(Weight::from_ref_time(77_084).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(77_084, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(485).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(185).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 485).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 185).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -228,15 +228,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 36_897 nanoseconds.
Weight::from_parts(34_169_666, 13146)
// Standard Error: 47
.saturating_add(Weight::from_ref_time(972).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(972, 0).saturating_mul(b.into()))
// Standard Error: 510
.saturating_add(Weight::from_ref_time(38_084).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(38_084, 0).saturating_mul(m.into()))
// Standard Error: 492
.saturating_add(Weight::from_ref_time(78_576).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(78_576, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(480).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(185).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 480).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 185).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:2 w:2)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -251,9 +251,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 29_313 nanoseconds.
Weight::from_parts(20_502_244, 12084)
// Standard Error: 304
.saturating_add(Weight::from_ref_time(107_994).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(107_994, 0).saturating_mul(m.into()))
// Standard Error: 300
.saturating_add(Weight::from_ref_time(92_645).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(92_645, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -279,20 +279,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 232_895 nanoseconds.
Weight::from_parts(233_860_000, 32201)
// Standard Error: 19_092
.saturating_add(Weight::from_ref_time(445_664).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(445_664, 0).saturating_mul(x.into()))
// Standard Error: 19_000
.saturating_add(Weight::from_ref_time(432_571).saturating_mul(y.into()))
.saturating_add(Weight::from_parts(432_571, 0).saturating_mul(y.into()))
// Standard Error: 37_965
.saturating_add(Weight::from_ref_time(9_386_151).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(9_386_151, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(z.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(z.into())))
.saturating_add(Weight::from_proof_size(2587).saturating_mul(x.into()))
.saturating_add(Weight::from_proof_size(2590).saturating_mul(y.into()))
.saturating_add(Weight::from_proof_size(3209).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(0, 2587).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(0, 2590).saturating_mul(y.into()))
.saturating_add(Weight::from_parts(0, 3209).saturating_mul(z.into()))
}
/// Storage: Alliance Rule (r:0 w:1)
/// Proof: Alliance Rule (max_values: Some(1), max_size: Some(87), added: 582, mode: MaxEncodedLen)
@@ -301,7 +301,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_156 nanoseconds.
Weight::from_ref_time(9_376_000)
Weight::from_parts(9_376_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Alliance Announcements (r:1 w:1)
@@ -443,9 +443,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 7_709 nanoseconds.
Weight::from_parts(7_773_000, 29894)
// Standard Error: 2_645
.saturating_add(Weight::from_ref_time(1_266_755).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_266_755, 0).saturating_mul(n.into()))
// Standard Error: 1_036
.saturating_add(Weight::from_ref_time(67_359).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(67_359, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -462,9 +462,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 7_438 nanoseconds.
Weight::from_parts(7_570_000, 29894)
// Standard Error: 165_072
.saturating_add(Weight::from_ref_time(13_026_975).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(13_026_975, 0).saturating_mul(n.into()))
// Standard Error: 64_649
.saturating_add(Weight::from_ref_time(485_565).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(485_565, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -509,15 +509,15 @@ impl WeightInfo for () {
// Minimum execution time: 28_849 nanoseconds.
Weight::from_parts(29_823_933, 11659)
// Standard Error: 74
.saturating_add(Weight::from_ref_time(830).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(830, 0).saturating_mul(b.into()))
// Standard Error: 775
.saturating_add(Weight::from_ref_time(22_980).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(22_980, 0).saturating_mul(m.into()))
// Standard Error: 765
.saturating_add(Weight::from_ref_time(90_520).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(90_520, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(Weight::from_proof_size(132).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 132).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -531,10 +531,10 @@ impl WeightInfo for () {
// Minimum execution time: 23_570 nanoseconds.
Weight::from_parts(25_473_196, 9337)
// Standard Error: 824
.saturating_add(Weight::from_ref_time(54_603).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(54_603, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(64).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -555,13 +555,13 @@ impl WeightInfo for () {
// Minimum execution time: 35_373 nanoseconds.
Weight::from_parts(32_763_656, 11979)
// Standard Error: 2_041
.saturating_add(Weight::from_ref_time(52_915).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(52_915, 0).saturating_mul(m.into()))
// Standard Error: 1_991
.saturating_add(Weight::from_ref_time(78_594).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(78_594, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(388).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(148).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 388).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 148).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -583,15 +583,15 @@ impl WeightInfo for () {
// Minimum execution time: 44_590 nanoseconds.
Weight::from_parts(43_367_913, 15730)
// Standard Error: 71
.saturating_add(Weight::from_ref_time(819).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(819, 0).saturating_mul(b.into()))
// Standard Error: 751
.saturating_add(Weight::from_ref_time(39_124).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(39_124, 0).saturating_mul(m.into()))
// Standard Error: 732
.saturating_add(Weight::from_ref_time(90_469).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(90_469, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(388).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(164).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 388).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 164).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -614,13 +614,13 @@ impl WeightInfo for () {
// Minimum execution time: 36_796 nanoseconds.
Weight::from_parts(34_578_765, 13201)
// Standard Error: 1_037
.saturating_add(Weight::from_ref_time(43_508).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(43_508, 0).saturating_mul(m.into()))
// Standard Error: 1_024
.saturating_add(Weight::from_ref_time(77_084).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(77_084, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(485).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(185).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 485).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 185).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:1 w:0)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -644,15 +644,15 @@ impl WeightInfo for () {
// Minimum execution time: 36_897 nanoseconds.
Weight::from_parts(34_169_666, 13146)
// Standard Error: 47
.saturating_add(Weight::from_ref_time(972).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(972, 0).saturating_mul(b.into()))
// Standard Error: 510
.saturating_add(Weight::from_ref_time(38_084).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(38_084, 0).saturating_mul(m.into()))
// Standard Error: 492
.saturating_add(Weight::from_ref_time(78_576).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(78_576, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(480).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(185).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 480).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 185).saturating_mul(p.into()))
}
/// Storage: Alliance Members (r:2 w:2)
/// Proof: Alliance Members (max_values: None, max_size: Some(3211), added: 5686, mode: MaxEncodedLen)
@@ -667,9 +667,9 @@ impl WeightInfo for () {
// Minimum execution time: 29_313 nanoseconds.
Weight::from_parts(20_502_244, 12084)
// Standard Error: 304
.saturating_add(Weight::from_ref_time(107_994).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(107_994, 0).saturating_mul(m.into()))
// Standard Error: 300
.saturating_add(Weight::from_ref_time(92_645).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(92_645, 0).saturating_mul(z.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -695,20 +695,20 @@ impl WeightInfo for () {
// Minimum execution time: 232_895 nanoseconds.
Weight::from_parts(233_860_000, 32201)
// Standard Error: 19_092
.saturating_add(Weight::from_ref_time(445_664).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(445_664, 0).saturating_mul(x.into()))
// Standard Error: 19_000
.saturating_add(Weight::from_ref_time(432_571).saturating_mul(y.into()))
.saturating_add(Weight::from_parts(432_571, 0).saturating_mul(y.into()))
// Standard Error: 37_965
.saturating_add(Weight::from_ref_time(9_386_151).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(9_386_151, 0).saturating_mul(z.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(y.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(z.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(z.into())))
.saturating_add(Weight::from_proof_size(2587).saturating_mul(x.into()))
.saturating_add(Weight::from_proof_size(2590).saturating_mul(y.into()))
.saturating_add(Weight::from_proof_size(3209).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(0, 2587).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(0, 2590).saturating_mul(y.into()))
.saturating_add(Weight::from_parts(0, 3209).saturating_mul(z.into()))
}
/// Storage: Alliance Rule (r:0 w:1)
/// Proof: Alliance Rule (max_values: Some(1), max_size: Some(87), added: 582, mode: MaxEncodedLen)
@@ -717,7 +717,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_156 nanoseconds.
Weight::from_ref_time(9_376_000)
Weight::from_parts(9_376_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Alliance Announcements (r:1 w:1)
@@ -859,9 +859,9 @@ impl WeightInfo for () {
// Minimum execution time: 7_709 nanoseconds.
Weight::from_parts(7_773_000, 29894)
// Standard Error: 2_645
.saturating_add(Weight::from_ref_time(1_266_755).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_266_755, 0).saturating_mul(n.into()))
// Standard Error: 1_036
.saturating_add(Weight::from_ref_time(67_359).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(67_359, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -878,9 +878,9 @@ impl WeightInfo for () {
// Minimum execution time: 7_438 nanoseconds.
Weight::from_parts(7_570_000, 29894)
// Standard Error: 165_072
.saturating_add(Weight::from_ref_time(13_026_975).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(13_026_975, 0).saturating_mul(n.into()))
// Standard Error: 64_649
.saturating_add(Weight::from_ref_time(485_565).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(485_565, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
+118 -118
View File
@@ -90,8 +90,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `325`
// Estimated: `7268`
// Minimum execution time: 27_887 nanoseconds.
Weight::from_ref_time(28_190_000)
.saturating_add(Weight::from_proof_size(7268))
Weight::from_parts(28_190_000, 0)
.saturating_add(Weight::from_parts(0, 7268))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -102,8 +102,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `153`
// Estimated: `3675`
// Minimum execution time: 15_059 nanoseconds.
Weight::from_ref_time(15_600_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_600_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -114,8 +114,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `417`
// Estimated: `3675`
// Minimum execution time: 15_581 nanoseconds.
Weight::from_ref_time(15_868_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_868_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -131,15 +131,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `25 + c * (240 ±0)`
// Estimated: `8232 + c * (5180 ±0)`
// Minimum execution time: 20_167 nanoseconds.
Weight::from_ref_time(20_436_000)
.saturating_add(Weight::from_proof_size(8232))
Weight::from_parts(20_436_000, 0)
.saturating_add(Weight::from_parts(0, 8232))
// Standard Error: 12_761
.saturating_add(Weight::from_ref_time(15_535_268).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(15_535_268, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(5180).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into()))
}
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen)
@@ -151,15 +151,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `554 + a * (86 ±0)`
// Estimated: `7288 + a * (2623 ±0)`
// Minimum execution time: 20_349 nanoseconds.
Weight::from_ref_time(20_482_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(20_482_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
// Standard Error: 9_831
.saturating_add(Weight::from_ref_time(15_771_918).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(15_771_918, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_proof_size(2623).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into()))
}
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen)
@@ -170,8 +170,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `7280`
// Minimum execution time: 15_647 nanoseconds.
Weight::from_ref_time(15_975_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(15_975_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -184,8 +184,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `7242`
// Minimum execution time: 28_383 nanoseconds.
Weight::from_ref_time(29_055_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(29_055_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -198,8 +198,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `491`
// Estimated: `7242`
// Minimum execution time: 34_950 nanoseconds.
Weight::from_ref_time(35_296_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(35_296_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -214,8 +214,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `530`
// Estimated: `13412`
// Minimum execution time: 50_129 nanoseconds.
Weight::from_ref_time(50_820_000)
.saturating_add(Weight::from_proof_size(13412))
Weight::from_parts(50_820_000, 0)
.saturating_add(Weight::from_parts(0, 13412))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -230,8 +230,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `530`
// Estimated: `13412`
// Minimum execution time: 43_424 nanoseconds.
Weight::from_ref_time(44_080_000)
.saturating_add(Weight::from_proof_size(13412))
Weight::from_parts(44_080_000, 0)
.saturating_add(Weight::from_parts(0, 13412))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -246,8 +246,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `530`
// Estimated: `13412`
// Minimum execution time: 48_919 nanoseconds.
Weight::from_ref_time(50_720_000)
.saturating_add(Weight::from_proof_size(13412))
Weight::from_parts(50_720_000, 0)
.saturating_add(Weight::from_parts(0, 13412))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -260,8 +260,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `491`
// Estimated: `7242`
// Minimum execution time: 19_750 nanoseconds.
Weight::from_ref_time(20_053_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(20_053_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -274,8 +274,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `491`
// Estimated: `7242`
// Minimum execution time: 19_672 nanoseconds.
Weight::from_ref_time(19_928_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(19_928_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -286,8 +286,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `417`
// Estimated: `3675`
// Minimum execution time: 15_367 nanoseconds.
Weight::from_ref_time(15_726_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_726_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -298,8 +298,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `417`
// Estimated: `3675`
// Minimum execution time: 14_814 nanoseconds.
Weight::from_ref_time(15_301_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_301_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -312,8 +312,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `7280`
// Minimum execution time: 17_426 nanoseconds.
Weight::from_ref_time(17_804_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(17_804_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -324,8 +324,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `3675`
// Minimum execution time: 15_935 nanoseconds.
Weight::from_ref_time(16_165_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(16_165_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -340,10 +340,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `7280`
// Minimum execution time: 26_890 nanoseconds.
Weight::from_ref_time(28_766_510)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(28_766_510, 0)
.saturating_add(Weight::from_parts(0, 7280))
// Standard Error: 7_444
.saturating_add(Weight::from_ref_time(3_619).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(3_619, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -356,8 +356,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `579`
// Estimated: `7280`
// Minimum execution time: 27_146 nanoseconds.
Weight::from_ref_time(27_692_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(27_692_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -372,8 +372,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `190`
// Estimated: `7280`
// Minimum execution time: 16_181 nanoseconds.
Weight::from_ref_time(18_317_178)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(18_317_178, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -386,8 +386,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `579`
// Estimated: `7280`
// Minimum execution time: 26_962 nanoseconds.
Weight::from_ref_time(27_896_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(27_896_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -398,8 +398,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `3675`
// Minimum execution time: 14_394 nanoseconds.
Weight::from_ref_time(14_917_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(14_917_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -412,8 +412,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `417`
// Estimated: `7288`
// Minimum execution time: 30_861 nanoseconds.
Weight::from_ref_time(31_356_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(31_356_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -430,8 +430,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `700`
// Estimated: `17025`
// Minimum execution time: 64_510 nanoseconds.
Weight::from_ref_time(65_676_000)
.saturating_add(Weight::from_proof_size(17025))
Weight::from_parts(65_676_000, 0)
.saturating_add(Weight::from_parts(0, 17025))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -444,8 +444,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `587`
// Estimated: `7288`
// Minimum execution time: 32_620 nanoseconds.
Weight::from_ref_time(33_183_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(33_183_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -458,8 +458,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `587`
// Estimated: `7288`
// Minimum execution time: 33_277 nanoseconds.
Weight::from_ref_time(34_438_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(34_438_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -470,8 +470,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `383`
// Estimated: `3675`
// Minimum execution time: 16_213 nanoseconds.
Weight::from_ref_time(16_575_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(16_575_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -488,8 +488,8 @@ impl WeightInfo for () {
// Measured: `325`
// Estimated: `7268`
// Minimum execution time: 27_887 nanoseconds.
Weight::from_ref_time(28_190_000)
.saturating_add(Weight::from_proof_size(7268))
Weight::from_parts(28_190_000, 0)
.saturating_add(Weight::from_parts(0, 7268))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -500,8 +500,8 @@ impl WeightInfo for () {
// Measured: `153`
// Estimated: `3675`
// Minimum execution time: 15_059 nanoseconds.
Weight::from_ref_time(15_600_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_600_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -512,8 +512,8 @@ impl WeightInfo for () {
// Measured: `417`
// Estimated: `3675`
// Minimum execution time: 15_581 nanoseconds.
Weight::from_ref_time(15_868_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_868_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -529,15 +529,15 @@ impl WeightInfo for () {
// Measured: `25 + c * (240 ±0)`
// Estimated: `8232 + c * (5180 ±0)`
// Minimum execution time: 20_167 nanoseconds.
Weight::from_ref_time(20_436_000)
.saturating_add(Weight::from_proof_size(8232))
Weight::from_parts(20_436_000, 0)
.saturating_add(Weight::from_parts(0, 8232))
// Standard Error: 12_761
.saturating_add(Weight::from_ref_time(15_535_268).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(15_535_268, 0).saturating_mul(c.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(5180).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 5180).saturating_mul(c.into()))
}
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen)
@@ -549,15 +549,15 @@ impl WeightInfo for () {
// Measured: `554 + a * (86 ±0)`
// Estimated: `7288 + a * (2623 ±0)`
// Minimum execution time: 20_349 nanoseconds.
Weight::from_ref_time(20_482_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(20_482_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
// Standard Error: 9_831
.saturating_add(Weight::from_ref_time(15_771_918).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(15_771_918, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_proof_size(2623).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into()))
}
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen)
@@ -568,8 +568,8 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `7280`
// Minimum execution time: 15_647 nanoseconds.
Weight::from_ref_time(15_975_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(15_975_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -582,8 +582,8 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `7242`
// Minimum execution time: 28_383 nanoseconds.
Weight::from_ref_time(29_055_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(29_055_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -596,8 +596,8 @@ impl WeightInfo for () {
// Measured: `491`
// Estimated: `7242`
// Minimum execution time: 34_950 nanoseconds.
Weight::from_ref_time(35_296_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(35_296_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -612,8 +612,8 @@ impl WeightInfo for () {
// Measured: `530`
// Estimated: `13412`
// Minimum execution time: 50_129 nanoseconds.
Weight::from_ref_time(50_820_000)
.saturating_add(Weight::from_proof_size(13412))
Weight::from_parts(50_820_000, 0)
.saturating_add(Weight::from_parts(0, 13412))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -628,8 +628,8 @@ impl WeightInfo for () {
// Measured: `530`
// Estimated: `13412`
// Minimum execution time: 43_424 nanoseconds.
Weight::from_ref_time(44_080_000)
.saturating_add(Weight::from_proof_size(13412))
Weight::from_parts(44_080_000, 0)
.saturating_add(Weight::from_parts(0, 13412))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -644,8 +644,8 @@ impl WeightInfo for () {
// Measured: `530`
// Estimated: `13412`
// Minimum execution time: 48_919 nanoseconds.
Weight::from_ref_time(50_720_000)
.saturating_add(Weight::from_proof_size(13412))
Weight::from_parts(50_720_000, 0)
.saturating_add(Weight::from_parts(0, 13412))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -658,8 +658,8 @@ impl WeightInfo for () {
// Measured: `491`
// Estimated: `7242`
// Minimum execution time: 19_750 nanoseconds.
Weight::from_ref_time(20_053_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(20_053_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -672,8 +672,8 @@ impl WeightInfo for () {
// Measured: `491`
// Estimated: `7242`
// Minimum execution time: 19_672 nanoseconds.
Weight::from_ref_time(19_928_000)
.saturating_add(Weight::from_proof_size(7242))
Weight::from_parts(19_928_000, 0)
.saturating_add(Weight::from_parts(0, 7242))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -684,8 +684,8 @@ impl WeightInfo for () {
// Measured: `417`
// Estimated: `3675`
// Minimum execution time: 15_367 nanoseconds.
Weight::from_ref_time(15_726_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_726_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -696,8 +696,8 @@ impl WeightInfo for () {
// Measured: `417`
// Estimated: `3675`
// Minimum execution time: 14_814 nanoseconds.
Weight::from_ref_time(15_301_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(15_301_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -710,8 +710,8 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `7280`
// Minimum execution time: 17_426 nanoseconds.
Weight::from_ref_time(17_804_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(17_804_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -722,8 +722,8 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `3675`
// Minimum execution time: 15_935 nanoseconds.
Weight::from_ref_time(16_165_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(16_165_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -738,10 +738,10 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `7280`
// Minimum execution time: 26_890 nanoseconds.
Weight::from_ref_time(28_766_510)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(28_766_510, 0)
.saturating_add(Weight::from_parts(0, 7280))
// Standard Error: 7_444
.saturating_add(Weight::from_ref_time(3_619).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(3_619, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -754,8 +754,8 @@ impl WeightInfo for () {
// Measured: `579`
// Estimated: `7280`
// Minimum execution time: 27_146 nanoseconds.
Weight::from_ref_time(27_692_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(27_692_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -770,8 +770,8 @@ impl WeightInfo for () {
// Measured: `190`
// Estimated: `7280`
// Minimum execution time: 16_181 nanoseconds.
Weight::from_ref_time(18_317_178)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(18_317_178, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -784,8 +784,8 @@ impl WeightInfo for () {
// Measured: `579`
// Estimated: `7280`
// Minimum execution time: 26_962 nanoseconds.
Weight::from_ref_time(27_896_000)
.saturating_add(Weight::from_proof_size(7280))
Weight::from_parts(27_896_000, 0)
.saturating_add(Weight::from_parts(0, 7280))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -796,8 +796,8 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `3675`
// Minimum execution time: 14_394 nanoseconds.
Weight::from_ref_time(14_917_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(14_917_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -810,8 +810,8 @@ impl WeightInfo for () {
// Measured: `417`
// Estimated: `7288`
// Minimum execution time: 30_861 nanoseconds.
Weight::from_ref_time(31_356_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(31_356_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -828,8 +828,8 @@ impl WeightInfo for () {
// Measured: `700`
// Estimated: `17025`
// Minimum execution time: 64_510 nanoseconds.
Weight::from_ref_time(65_676_000)
.saturating_add(Weight::from_proof_size(17025))
Weight::from_parts(65_676_000, 0)
.saturating_add(Weight::from_parts(0, 17025))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -842,8 +842,8 @@ impl WeightInfo for () {
// Measured: `587`
// Estimated: `7288`
// Minimum execution time: 32_620 nanoseconds.
Weight::from_ref_time(33_183_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(33_183_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -856,8 +856,8 @@ impl WeightInfo for () {
// Measured: `587`
// Estimated: `7288`
// Minimum execution time: 33_277 nanoseconds.
Weight::from_ref_time(34_438_000)
.saturating_add(Weight::from_proof_size(7288))
Weight::from_parts(34_438_000, 0)
.saturating_add(Weight::from_parts(0, 7288))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -868,8 +868,8 @@ impl WeightInfo for () {
// Measured: `383`
// Estimated: `3675`
// Minimum execution time: 16_213 nanoseconds.
Weight::from_ref_time(16_575_000)
.saturating_add(Weight::from_proof_size(3675))
Weight::from_parts(16_575_000, 0)
.saturating_add(Weight::from_parts(0, 3675))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
+6 -5
View File
@@ -38,18 +38,19 @@ impl crate::WeightInfo for () {
const MAX_NOMINATORS: u64 = 200;
// checking membership proof
Weight::from_ref_time(35u64 * WEIGHT_REF_TIME_PER_MICROS)
Weight::from_parts(35u64 * WEIGHT_REF_TIME_PER_MICROS, 0)
.saturating_add(
Weight::from_ref_time(175u64 * WEIGHT_REF_TIME_PER_NANOS)
Weight::from_parts(175u64 * WEIGHT_REF_TIME_PER_NANOS, 0)
.saturating_mul(validator_count),
)
.saturating_add(DbWeight::get().reads(5))
// check equivocation proof
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
.saturating_add(Weight::from_parts(110u64 * WEIGHT_REF_TIME_PER_MICROS, 0))
// report offence
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
.saturating_add(Weight::from_ref_time(
.saturating_add(Weight::from_parts(110u64 * WEIGHT_REF_TIME_PER_MICROS, 0))
.saturating_add(Weight::from_parts(
25u64 * WEIGHT_REF_TIME_PER_MICROS * MAX_NOMINATORS,
0,
))
.saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS))
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS))
+4 -4
View File
@@ -188,14 +188,14 @@ macro_rules! decl_tests {
ChargeTransactionPayment::from(1),
&1,
CALL,
&info_from_weight(Weight::from_ref_time(1)),
&info_from_weight(Weight::from_parts(1, 0)),
1,
).is_err());
assert_ok!(<ChargeTransactionPayment<$test> as SignedExtension>::pre_dispatch(
ChargeTransactionPayment::from(0),
&1,
CALL,
&info_from_weight(Weight::from_ref_time(1)),
&info_from_weight(Weight::from_parts(1, 0)),
1,
));
@@ -206,14 +206,14 @@ macro_rules! decl_tests {
ChargeTransactionPayment::from(1),
&1,
CALL,
&info_from_weight(Weight::from_ref_time(1)),
&info_from_weight(Weight::from_parts(1, 0)),
1,
).is_err());
assert!(<ChargeTransactionPayment<$test> as SignedExtension>::pre_dispatch(
ChargeTransactionPayment::from(0),
&1,
CALL,
&info_from_weight(Weight::from_ref_time(1)),
&info_from_weight(Weight::from_parts(1, 0)),
1,
).is_err());
});
@@ -48,7 +48,7 @@ frame_support::construct_runtime!(
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(
frame_support::weights::Weight::from_ref_time(1024).set_proof_size(u64::MAX),
frame_support::weights::Weight::from_parts(1024, u64::MAX),
);
pub static ExistentialDeposit: u64 = 0;
}
+1 -1
View File
@@ -49,7 +49,7 @@ frame_support::construct_runtime!(
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(
frame_support::weights::Weight::from_ref_time(1024).set_proof_size(u64::MAX),
frame_support::weights::Weight::from_parts(1024, u64::MAX),
);
pub static ExistentialDeposit: u64 = 0;
}
@@ -52,7 +52,7 @@ frame_support::construct_runtime!(
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(
frame_support::weights::Weight::from_ref_time(1024).set_proof_size(u64::MAX),
frame_support::weights::Weight::from_parts(1024, u64::MAX),
);
pub static ExistentialDeposit: u64 = 0;
}
+28 -28
View File
@@ -68,8 +68,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 37_815 nanoseconds.
Weight::from_ref_time(38_109_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(38_109_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -80,8 +80,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 28_184 nanoseconds.
Weight::from_ref_time(49_250_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(49_250_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -92,8 +92,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 17_474 nanoseconds.
Weight::from_ref_time(17_777_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(17_777_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -104,8 +104,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 20_962 nanoseconds.
Weight::from_ref_time(21_419_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(21_419_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -116,8 +116,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `135`
// Estimated: `6196`
// Minimum execution time: 39_713 nanoseconds.
Weight::from_ref_time(40_360_000)
.saturating_add(Weight::from_proof_size(6196))
Weight::from_parts(40_360_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -128,8 +128,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 34_878 nanoseconds.
Weight::from_ref_time(35_121_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(35_121_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -140,8 +140,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 16_790 nanoseconds.
Weight::from_ref_time(17_029_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(17_029_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -156,8 +156,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 37_815 nanoseconds.
Weight::from_ref_time(38_109_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(38_109_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -168,8 +168,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 28_184 nanoseconds.
Weight::from_ref_time(49_250_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(49_250_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -180,8 +180,8 @@ impl WeightInfo for () {
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 17_474 nanoseconds.
Weight::from_ref_time(17_777_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(17_777_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -192,8 +192,8 @@ impl WeightInfo for () {
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 20_962 nanoseconds.
Weight::from_ref_time(21_419_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(21_419_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -204,8 +204,8 @@ impl WeightInfo for () {
// Measured: `135`
// Estimated: `6196`
// Minimum execution time: 39_713 nanoseconds.
Weight::from_ref_time(40_360_000)
.saturating_add(Weight::from_proof_size(6196))
Weight::from_parts(40_360_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -216,8 +216,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 34_878 nanoseconds.
Weight::from_ref_time(35_121_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(35_121_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -228,8 +228,8 @@ impl WeightInfo for () {
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 16_790 nanoseconds.
Weight::from_ref_time(17_029_000)
.saturating_add(Weight::from_proof_size(3593))
Weight::from_parts(17_029_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
+6 -5
View File
@@ -33,18 +33,19 @@ impl crate::WeightInfo for () {
const MAX_NOMINATORS: u64 = 200;
// checking membership proof
Weight::from_ref_time(35u64 * WEIGHT_REF_TIME_PER_MICROS)
Weight::from_parts(35u64 * WEIGHT_REF_TIME_PER_MICROS, 0)
.saturating_add(
Weight::from_ref_time(175u64 * WEIGHT_REF_TIME_PER_NANOS)
Weight::from_parts(175u64 * WEIGHT_REF_TIME_PER_NANOS, 0)
.saturating_mul(validator_count),
)
.saturating_add(DbWeight::get().reads(5))
// check equivocation proof
.saturating_add(Weight::from_ref_time(95u64 * WEIGHT_REF_TIME_PER_MICROS))
.saturating_add(Weight::from_parts(95u64 * WEIGHT_REF_TIME_PER_MICROS, 0))
// report offence
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
.saturating_add(Weight::from_ref_time(
.saturating_add(Weight::from_parts(110u64 * WEIGHT_REF_TIME_PER_MICROS, 0))
.saturating_add(Weight::from_parts(
25u64 * WEIGHT_REF_TIME_PER_MICROS * MAX_NOMINATORS,
0,
))
.saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS))
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS))
+174 -174
View File
@@ -73,8 +73,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `136`
// Estimated: `1489`
// Minimum execution time: 1_968 nanoseconds.
Weight::from_ref_time(2_060_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(2_060_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Value (r:1 w:0)
@@ -84,8 +84,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `136`
// Estimated: `0`
// Minimum execution time: 1_934 nanoseconds.
Weight::from_ref_time(2_092_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(2_092_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Value (r:1 w:0)
@@ -97,8 +97,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `160`
// Estimated: `1649`
// Minimum execution time: 2_605 nanoseconds.
Weight::from_ref_time(2_786_000)
.saturating_add(Weight::from_proof_size(1649))
Weight::from_parts(2_786_000, 0)
.saturating_add(Weight::from_parts(0, 1649))
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: Pov Value (r:1 w:0)
@@ -108,8 +108,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `136`
// Estimated: `1489`
// Minimum execution time: 2_019 nanoseconds.
Weight::from_ref_time(2_214_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(2_214_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Value (r:0 w:1)
@@ -119,8 +119,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 279 nanoseconds.
Weight::from_ref_time(357_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(357_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Pov Value (r:0 w:1)
@@ -130,8 +130,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 291 nanoseconds.
Weight::from_ref_time(378_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(378_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Pov Map1M (r:1 w:0)
@@ -141,8 +141,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1275`
// Estimated: `4740`
// Minimum execution time: 5_077 nanoseconds.
Weight::from_ref_time(5_400_000)
.saturating_add(Weight::from_proof_size(4740))
Weight::from_parts(5_400_000, 0)
.saturating_add(Weight::from_parts(0, 4740))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:1 w:0)
@@ -152,8 +152,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1544`
// Estimated: `5009`
// Minimum execution time: 5_878 nanoseconds.
Weight::from_ref_time(6_239_000)
.saturating_add(Weight::from_proof_size(5009))
Weight::from_parts(6_239_000, 0)
.saturating_add(Weight::from_parts(0, 5009))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:1 w:0)
@@ -163,8 +163,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `2044`
// Estimated: `5509`
// Minimum execution time: 7_282 nanoseconds.
Weight::from_ref_time(8_022_000)
.saturating_add(Weight::from_proof_size(5509))
Weight::from_parts(8_022_000, 0)
.saturating_add(Weight::from_parts(0, 5509))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:100 w:0)
@@ -178,16 +178,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `515 + n * (188 ±0) + m * (188 ±0)`
// Estimated: `1980 + n * (3006 ±0) + m * (2511 ±0)`
// Minimum execution time: 195_406 nanoseconds.
Weight::from_ref_time(129_093_464)
.saturating_add(Weight::from_proof_size(1980))
Weight::from_parts(129_093_464, 0)
.saturating_add(Weight::from_parts(0, 1980))
// Standard Error: 12_134
.saturating_add(Weight::from_ref_time(855_330).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(855_330, 0).saturating_mul(n.into()))
// Standard Error: 12_134
.saturating_add(Weight::from_ref_time(870_523).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(870_523, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_proof_size(3006).saturating_mul(n.into()))
.saturating_add(Weight::from_proof_size(2511).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3006).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2511).saturating_mul(m.into()))
}
/// Storage: Pov Map1M (r:100 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: Ignored)
@@ -200,16 +200,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `515 + n * (188 ±0) + m * (188 ±0)`
// Estimated: `1685 + n * (3195 ±0) + m * (189 ±0)`
// Minimum execution time: 195_053 nanoseconds.
Weight::from_ref_time(131_322_479)
.saturating_add(Weight::from_proof_size(1685))
Weight::from_parts(131_322_479, 0)
.saturating_add(Weight::from_parts(0, 1685))
// Standard Error: 12_161
.saturating_add(Weight::from_ref_time(843_047).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(843_047, 0).saturating_mul(n.into()))
// Standard Error: 12_161
.saturating_add(Weight::from_ref_time(858_668).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(858_668, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_proof_size(3195).saturating_mul(n.into()))
.saturating_add(Weight::from_proof_size(189).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3195).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 189).saturating_mul(m.into()))
}
/// Storage: Pov Map1M (r:1 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: MaxEncodedLen)
@@ -219,10 +219,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `170`
// Estimated: `3501`
// Minimum execution time: 22 nanoseconds.
Weight::from_ref_time(2_334_945)
.saturating_add(Weight::from_proof_size(3501))
Weight::from_parts(2_334_945, 0)
.saturating_add(Weight::from_parts(0, 3501))
// Standard Error: 624
.saturating_add(Weight::from_ref_time(282_046).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(282_046, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:100 w:0)
@@ -233,12 +233,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `147 + n * (40 ±0)`
// Estimated: `990 + n * (2511 ±0)`
// Minimum execution time: 20 nanoseconds.
Weight::from_ref_time(525_027)
.saturating_add(Weight::from_proof_size(990))
Weight::from_parts(525_027, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 2_767
.saturating_add(Weight::from_ref_time(3_887_350).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(3_887_350, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2511).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2511).saturating_mul(n.into()))
}
/// Storage: Pov DoubleMap1M (r:1024 w:0)
/// Proof: Pov DoubleMap1M (max_values: Some(1000000), max_size: Some(68), added: 2543, mode: MaxEncodedLen)
@@ -248,12 +248,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `21938 + n * (57 ±0)`
// Estimated: `990 + n * (2543 ±0)`
// Minimum execution time: 34 nanoseconds.
Weight::from_ref_time(18_341_393)
.saturating_add(Weight::from_proof_size(990))
Weight::from_parts(18_341_393, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 1_312
.saturating_add(Weight::from_ref_time(2_053_135).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(2_053_135, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2543).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2543).saturating_mul(n.into()))
}
/// Storage: Pov BoundedValue (r:1 w:0)
/// Proof: Pov BoundedValue (max_values: Some(1), max_size: Some(33), added: 528, mode: MaxEncodedLen)
@@ -262,8 +262,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `109`
// Estimated: `1518`
// Minimum execution time: 1_163 nanoseconds.
Weight::from_ref_time(1_274_000)
.saturating_add(Weight::from_proof_size(1518))
Weight::from_parts(1_274_000, 0)
.saturating_add(Weight::from_parts(0, 1518))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov UnboundedValue (r:1 w:0)
@@ -273,8 +273,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `109`
// Estimated: `1594`
// Minimum execution time: 1_167 nanoseconds.
Weight::from_ref_time(1_367_000)
.saturating_add(Weight::from_proof_size(1594))
Weight::from_parts(1_367_000, 0)
.saturating_add(Weight::from_parts(0, 1594))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov UnboundedValue (r:1 w:0)
@@ -284,8 +284,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `109`
// Estimated: `0`
// Minimum execution time: 1_155 nanoseconds.
Weight::from_ref_time(1_248_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(1_248_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov UnboundedValue (r:1 w:0)
@@ -297,8 +297,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `109`
// Estimated: `3112`
// Minimum execution time: 1_424 nanoseconds.
Weight::from_ref_time(1_601_000)
.saturating_add(Weight::from_proof_size(3112))
Weight::from_parts(1_601_000, 0)
.saturating_add(Weight::from_parts(0, 3112))
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: Pov LargeValue (r:1 w:0)
@@ -309,12 +309,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `174 + l * (1 ±0)`
// Estimated: `1656 + l * (1 ±0)`
// Minimum execution time: 1_744 nanoseconds.
Weight::from_ref_time(1_800_000)
.saturating_add(Weight::from_proof_size(1656))
Weight::from_parts(1_800_000, 0)
.saturating_add(Weight::from_parts(0, 1656))
// Standard Error: 4
.saturating_add(Weight::from_ref_time(443).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(443, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(l.into()))
}
/// Storage: Pov LargeValue (r:1 w:0)
/// Proof: Pov LargeValue (max_values: Some(1), max_size: Some(4194308), added: 4194803, mode: MaxEncodedLen)
@@ -324,10 +324,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `174 + l * (1 ±0)`
// Estimated: `4195793`
// Minimum execution time: 1_770 nanoseconds.
Weight::from_ref_time(1_813_000)
.saturating_add(Weight::from_proof_size(4195793))
Weight::from_parts(1_813_000, 0)
.saturating_add(Weight::from_parts(0, 4195793))
// Standard Error: 6
.saturating_add(Weight::from_ref_time(495).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(495, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Pov LargeValue (r:1 w:0)
@@ -340,12 +340,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `235 + l * (2 ±0)`
// Estimated: `3428 + l * (4 ±0)`
// Minimum execution time: 2_349 nanoseconds.
Weight::from_ref_time(2_423_000)
.saturating_add(Weight::from_proof_size(3428))
Weight::from_parts(2_423_000, 0)
.saturating_add(Weight::from_parts(0, 3428))
// Standard Error: 11
.saturating_add(Weight::from_ref_time(950).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(950, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(l.into()))
}
/// Storage: Pov LargeValue (r:1 w:0)
/// Proof: Pov LargeValue (max_values: Some(1), max_size: Some(4194308), added: 4194803, mode: MaxEncodedLen)
@@ -357,10 +357,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `235 + l * (2 ±0)`
// Estimated: `8391586`
// Minimum execution time: 2_315 nanoseconds.
Weight::from_ref_time(2_409_000)
.saturating_add(Weight::from_proof_size(8391586))
Weight::from_parts(2_409_000, 0)
.saturating_add(Weight::from_parts(0, 8391586))
// Standard Error: 12
.saturating_add(Weight::from_ref_time(984).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(984, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: Pov LargeValue (r:1 w:0)
@@ -373,12 +373,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `235 + l * (2 ±0)`
// Estimated: `4197507 + l * (2 ±0)`
// Minimum execution time: 2_370 nanoseconds.
Weight::from_ref_time(2_474_000)
.saturating_add(Weight::from_proof_size(4197507))
Weight::from_parts(2_474_000, 0)
.saturating_add(Weight::from_parts(0, 4197507))
// Standard Error: 11
.saturating_add(Weight::from_ref_time(956).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(956, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(2).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 2).saturating_mul(l.into()))
}
/// Storage: Pov LargeValue (r:1 w:0)
/// Proof: Pov LargeValue (max_values: Some(1), max_size: Some(4194308), added: 4194803, mode: Measured)
@@ -390,12 +390,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `235 + l * (2 ±0)`
// Estimated: `4197507 + l * (2 ±0)`
// Minimum execution time: 2_375 nanoseconds.
Weight::from_ref_time(2_420_000)
.saturating_add(Weight::from_proof_size(4197507))
Weight::from_parts(2_420_000, 0)
.saturating_add(Weight::from_parts(0, 4197507))
// Standard Error: 9
.saturating_add(Weight::from_ref_time(914).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(914, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(2).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 2).saturating_mul(l.into()))
}
/// Storage: Pov UnboundedMap (r:1 w:0)
/// Proof Skipped: Pov UnboundedMap (max_values: None, max_size: None, mode: Measured)
@@ -407,12 +407,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `293 + i * (8 ±0)`
// Estimated: `7504 + i * (16 ±0)`
// Minimum execution time: 3_305 nanoseconds.
Weight::from_ref_time(3_689_335)
.saturating_add(Weight::from_proof_size(7504))
Weight::from_parts(3_689_335, 0)
.saturating_add(Weight::from_parts(0, 7504))
// Standard Error: 29
.saturating_add(Weight::from_ref_time(638).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(638, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(16).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 16).saturating_mul(i.into()))
}
/// Storage: Pov Map1M (r:1 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: MaxEncodedLen)
@@ -424,12 +424,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `260 + i * (4 ±0)`
// Estimated: `7223 + i * (4 ±0)`
// Minimum execution time: 3_469 nanoseconds.
Weight::from_ref_time(3_878_896)
.saturating_add(Weight::from_proof_size(7223))
Weight::from_parts(3_878_896, 0)
.saturating_add(Weight::from_parts(0, 7223))
// Standard Error: 33
.saturating_add(Weight::from_ref_time(356).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(356, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(i.into()))
}
/// Storage: Pov Map1M (r:1 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: MaxEncodedLen)
@@ -441,28 +441,28 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `260 + i * (4 ±0)`
// Estimated: `3758 + i * (4 ±0)`
// Minimum execution time: 3_442 nanoseconds.
Weight::from_ref_time(3_881_051)
.saturating_add(Weight::from_proof_size(3758))
Weight::from_parts(3_881_051, 0)
.saturating_add(Weight::from_parts(0, 3758))
// Standard Error: 35
.saturating_add(Weight::from_ref_time(384).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(384, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(i.into()))
}
fn emit_event() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_619 nanoseconds.
Weight::from_ref_time(1_728_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(1_728_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn noop() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 546 nanoseconds.
Weight::from_ref_time(640_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(640_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -475,8 +475,8 @@ impl WeightInfo for () {
// Measured: `136`
// Estimated: `1489`
// Minimum execution time: 1_968 nanoseconds.
Weight::from_ref_time(2_060_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(2_060_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Value (r:1 w:0)
@@ -486,8 +486,8 @@ impl WeightInfo for () {
// Measured: `136`
// Estimated: `0`
// Minimum execution time: 1_934 nanoseconds.
Weight::from_ref_time(2_092_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(2_092_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Value (r:1 w:0)
@@ -499,8 +499,8 @@ impl WeightInfo for () {
// Measured: `160`
// Estimated: `1649`
// Minimum execution time: 2_605 nanoseconds.
Weight::from_ref_time(2_786_000)
.saturating_add(Weight::from_proof_size(1649))
Weight::from_parts(2_786_000, 0)
.saturating_add(Weight::from_parts(0, 1649))
.saturating_add(RocksDbWeight::get().reads(2_u64))
}
/// Storage: Pov Value (r:1 w:0)
@@ -510,8 +510,8 @@ impl WeightInfo for () {
// Measured: `136`
// Estimated: `1489`
// Minimum execution time: 2_019 nanoseconds.
Weight::from_ref_time(2_214_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(2_214_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Value (r:0 w:1)
@@ -521,8 +521,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 279 nanoseconds.
Weight::from_ref_time(357_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(357_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Pov Value (r:0 w:1)
@@ -532,8 +532,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 291 nanoseconds.
Weight::from_ref_time(378_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(378_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Pov Map1M (r:1 w:0)
@@ -543,8 +543,8 @@ impl WeightInfo for () {
// Measured: `1275`
// Estimated: `4740`
// Minimum execution time: 5_077 nanoseconds.
Weight::from_ref_time(5_400_000)
.saturating_add(Weight::from_proof_size(4740))
Weight::from_parts(5_400_000, 0)
.saturating_add(Weight::from_parts(0, 4740))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:1 w:0)
@@ -554,8 +554,8 @@ impl WeightInfo for () {
// Measured: `1544`
// Estimated: `5009`
// Minimum execution time: 5_878 nanoseconds.
Weight::from_ref_time(6_239_000)
.saturating_add(Weight::from_proof_size(5009))
Weight::from_parts(6_239_000, 0)
.saturating_add(Weight::from_parts(0, 5009))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:1 w:0)
@@ -565,8 +565,8 @@ impl WeightInfo for () {
// Measured: `2044`
// Estimated: `5509`
// Minimum execution time: 7_282 nanoseconds.
Weight::from_ref_time(8_022_000)
.saturating_add(Weight::from_proof_size(5509))
Weight::from_parts(8_022_000, 0)
.saturating_add(Weight::from_parts(0, 5509))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:100 w:0)
@@ -580,16 +580,16 @@ impl WeightInfo for () {
// Measured: `515 + n * (188 ±0) + m * (188 ±0)`
// Estimated: `1980 + n * (3006 ±0) + m * (2511 ±0)`
// Minimum execution time: 195_406 nanoseconds.
Weight::from_ref_time(129_093_464)
.saturating_add(Weight::from_proof_size(1980))
Weight::from_parts(129_093_464, 0)
.saturating_add(Weight::from_parts(0, 1980))
// Standard Error: 12_134
.saturating_add(Weight::from_ref_time(855_330).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(855_330, 0).saturating_mul(n.into()))
// Standard Error: 12_134
.saturating_add(Weight::from_ref_time(870_523).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(870_523, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_proof_size(3006).saturating_mul(n.into()))
.saturating_add(Weight::from_proof_size(2511).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3006).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2511).saturating_mul(m.into()))
}
/// Storage: Pov Map1M (r:100 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: Ignored)
@@ -602,16 +602,16 @@ impl WeightInfo for () {
// Measured: `515 + n * (188 ±0) + m * (188 ±0)`
// Estimated: `1685 + n * (3195 ±0) + m * (189 ±0)`
// Minimum execution time: 195_053 nanoseconds.
Weight::from_ref_time(131_322_479)
.saturating_add(Weight::from_proof_size(1685))
Weight::from_parts(131_322_479, 0)
.saturating_add(Weight::from_parts(0, 1685))
// Standard Error: 12_161
.saturating_add(Weight::from_ref_time(843_047).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(843_047, 0).saturating_mul(n.into()))
// Standard Error: 12_161
.saturating_add(Weight::from_ref_time(858_668).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(858_668, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_proof_size(3195).saturating_mul(n.into()))
.saturating_add(Weight::from_proof_size(189).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3195).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 189).saturating_mul(m.into()))
}
/// Storage: Pov Map1M (r:1 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: MaxEncodedLen)
@@ -621,10 +621,10 @@ impl WeightInfo for () {
// Measured: `170`
// Estimated: `3501`
// Minimum execution time: 22 nanoseconds.
Weight::from_ref_time(2_334_945)
.saturating_add(Weight::from_proof_size(3501))
Weight::from_parts(2_334_945, 0)
.saturating_add(Weight::from_parts(0, 3501))
// Standard Error: 624
.saturating_add(Weight::from_ref_time(282_046).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(282_046, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov Map1M (r:100 w:0)
@@ -635,12 +635,12 @@ impl WeightInfo for () {
// Measured: `147 + n * (40 ±0)`
// Estimated: `990 + n * (2511 ±0)`
// Minimum execution time: 20 nanoseconds.
Weight::from_ref_time(525_027)
.saturating_add(Weight::from_proof_size(990))
Weight::from_parts(525_027, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 2_767
.saturating_add(Weight::from_ref_time(3_887_350).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(3_887_350, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2511).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2511).saturating_mul(n.into()))
}
/// Storage: Pov DoubleMap1M (r:1024 w:0)
/// Proof: Pov DoubleMap1M (max_values: Some(1000000), max_size: Some(68), added: 2543, mode: MaxEncodedLen)
@@ -650,12 +650,12 @@ impl WeightInfo for () {
// Measured: `21938 + n * (57 ±0)`
// Estimated: `990 + n * (2543 ±0)`
// Minimum execution time: 34 nanoseconds.
Weight::from_ref_time(18_341_393)
.saturating_add(Weight::from_proof_size(990))
Weight::from_parts(18_341_393, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 1_312
.saturating_add(Weight::from_ref_time(2_053_135).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(2_053_135, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2543).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2543).saturating_mul(n.into()))
}
/// Storage: Pov BoundedValue (r:1 w:0)
/// Proof: Pov BoundedValue (max_values: Some(1), max_size: Some(33), added: 528, mode: MaxEncodedLen)
@@ -664,8 +664,8 @@ impl WeightInfo for () {
// Measured: `109`
// Estimated: `1518`
// Minimum execution time: 1_163 nanoseconds.
Weight::from_ref_time(1_274_000)
.saturating_add(Weight::from_proof_size(1518))
Weight::from_parts(1_274_000, 0)
.saturating_add(Weight::from_parts(0, 1518))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov UnboundedValue (r:1 w:0)
@@ -675,8 +675,8 @@ impl WeightInfo for () {
// Measured: `109`
// Estimated: `1594`
// Minimum execution time: 1_167 nanoseconds.
Weight::from_ref_time(1_367_000)
.saturating_add(Weight::from_proof_size(1594))
Weight::from_parts(1_367_000, 0)
.saturating_add(Weight::from_parts(0, 1594))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov UnboundedValue (r:1 w:0)
@@ -686,8 +686,8 @@ impl WeightInfo for () {
// Measured: `109`
// Estimated: `0`
// Minimum execution time: 1_155 nanoseconds.
Weight::from_ref_time(1_248_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(1_248_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov UnboundedValue (r:1 w:0)
@@ -699,8 +699,8 @@ impl WeightInfo for () {
// Measured: `109`
// Estimated: `3112`
// Minimum execution time: 1_424 nanoseconds.
Weight::from_ref_time(1_601_000)
.saturating_add(Weight::from_proof_size(3112))
Weight::from_parts(1_601_000, 0)
.saturating_add(Weight::from_parts(0, 3112))
.saturating_add(RocksDbWeight::get().reads(2_u64))
}
/// Storage: Pov LargeValue (r:1 w:0)
@@ -711,12 +711,12 @@ impl WeightInfo for () {
// Measured: `174 + l * (1 ±0)`
// Estimated: `1656 + l * (1 ±0)`
// Minimum execution time: 1_744 nanoseconds.
Weight::from_ref_time(1_800_000)
.saturating_add(Weight::from_proof_size(1656))
Weight::from_parts(1_800_000, 0)
.saturating_add(Weight::from_parts(0, 1656))
// Standard Error: 4
.saturating_add(Weight::from_ref_time(443).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(443, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(l.into()))
}
/// Storage: Pov LargeValue (r:1 w:0)
/// Proof: Pov LargeValue (max_values: Some(1), max_size: Some(4194308), added: 4194803, mode: MaxEncodedLen)
@@ -726,10 +726,10 @@ impl WeightInfo for () {
// Measured: `174 + l * (1 ±0)`
// Estimated: `4195793`
// Minimum execution time: 1_770 nanoseconds.
Weight::from_ref_time(1_813_000)
.saturating_add(Weight::from_proof_size(4195793))
Weight::from_parts(1_813_000, 0)
.saturating_add(Weight::from_parts(0, 4195793))
// Standard Error: 6
.saturating_add(Weight::from_ref_time(495).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(495, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Pov LargeValue (r:1 w:0)
@@ -742,12 +742,12 @@ impl WeightInfo for () {
// Measured: `235 + l * (2 ±0)`
// Estimated: `3428 + l * (4 ±0)`
// Minimum execution time: 2_349 nanoseconds.
Weight::from_ref_time(2_423_000)
.saturating_add(Weight::from_proof_size(3428))
Weight::from_parts(2_423_000, 0)
.saturating_add(Weight::from_parts(0, 3428))
// Standard Error: 11
.saturating_add(Weight::from_ref_time(950).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(950, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(l.into()))
}
/// Storage: Pov LargeValue (r:1 w:0)
/// Proof: Pov LargeValue (max_values: Some(1), max_size: Some(4194308), added: 4194803, mode: MaxEncodedLen)
@@ -759,10 +759,10 @@ impl WeightInfo for () {
// Measured: `235 + l * (2 ±0)`
// Estimated: `8391586`
// Minimum execution time: 2_315 nanoseconds.
Weight::from_ref_time(2_409_000)
.saturating_add(Weight::from_proof_size(8391586))
Weight::from_parts(2_409_000, 0)
.saturating_add(Weight::from_parts(0, 8391586))
// Standard Error: 12
.saturating_add(Weight::from_ref_time(984).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(984, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
}
/// Storage: Pov LargeValue (r:1 w:0)
@@ -775,12 +775,12 @@ impl WeightInfo for () {
// Measured: `235 + l * (2 ±0)`
// Estimated: `4197507 + l * (2 ±0)`
// Minimum execution time: 2_370 nanoseconds.
Weight::from_ref_time(2_474_000)
.saturating_add(Weight::from_proof_size(4197507))
Weight::from_parts(2_474_000, 0)
.saturating_add(Weight::from_parts(0, 4197507))
// Standard Error: 11
.saturating_add(Weight::from_ref_time(956).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(956, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(2).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 2).saturating_mul(l.into()))
}
/// Storage: Pov LargeValue (r:1 w:0)
/// Proof: Pov LargeValue (max_values: Some(1), max_size: Some(4194308), added: 4194803, mode: Measured)
@@ -792,12 +792,12 @@ impl WeightInfo for () {
// Measured: `235 + l * (2 ±0)`
// Estimated: `4197507 + l * (2 ±0)`
// Minimum execution time: 2_375 nanoseconds.
Weight::from_ref_time(2_420_000)
.saturating_add(Weight::from_proof_size(4197507))
Weight::from_parts(2_420_000, 0)
.saturating_add(Weight::from_parts(0, 4197507))
// Standard Error: 9
.saturating_add(Weight::from_ref_time(914).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(914, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(2).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(0, 2).saturating_mul(l.into()))
}
/// Storage: Pov UnboundedMap (r:1 w:0)
/// Proof Skipped: Pov UnboundedMap (max_values: None, max_size: None, mode: Measured)
@@ -809,12 +809,12 @@ impl WeightInfo for () {
// Measured: `293 + i * (8 ±0)`
// Estimated: `7504 + i * (16 ±0)`
// Minimum execution time: 3_305 nanoseconds.
Weight::from_ref_time(3_689_335)
.saturating_add(Weight::from_proof_size(7504))
Weight::from_parts(3_689_335, 0)
.saturating_add(Weight::from_parts(0, 7504))
// Standard Error: 29
.saturating_add(Weight::from_ref_time(638).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(638, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(16).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 16).saturating_mul(i.into()))
}
/// Storage: Pov Map1M (r:1 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: MaxEncodedLen)
@@ -826,12 +826,12 @@ impl WeightInfo for () {
// Measured: `260 + i * (4 ±0)`
// Estimated: `7223 + i * (4 ±0)`
// Minimum execution time: 3_469 nanoseconds.
Weight::from_ref_time(3_878_896)
.saturating_add(Weight::from_proof_size(7223))
Weight::from_parts(3_878_896, 0)
.saturating_add(Weight::from_parts(0, 7223))
// Standard Error: 33
.saturating_add(Weight::from_ref_time(356).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(356, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(i.into()))
}
/// Storage: Pov Map1M (r:1 w:0)
/// Proof: Pov Map1M (max_values: Some(1000000), max_size: Some(36), added: 2511, mode: MaxEncodedLen)
@@ -843,27 +843,27 @@ impl WeightInfo for () {
// Measured: `260 + i * (4 ±0)`
// Estimated: `3758 + i * (4 ±0)`
// Minimum execution time: 3_442 nanoseconds.
Weight::from_ref_time(3_881_051)
.saturating_add(Weight::from_proof_size(3758))
Weight::from_parts(3_881_051, 0)
.saturating_add(Weight::from_parts(0, 3758))
// Standard Error: 35
.saturating_add(Weight::from_ref_time(384).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(384, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(i.into()))
}
fn emit_event() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_619 nanoseconds.
Weight::from_ref_time(1_728_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(1_728_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn noop() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 546 nanoseconds.
Weight::from_ref_time(640_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(640_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
+14 -14
View File
@@ -65,7 +65,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 138 nanoseconds.
Weight::from_ref_time(199_805)
Weight::from_parts(199_805, 0)
}
/// The range of component `i` is `[0, 1000000]`.
fn subtraction(_i: u32, ) -> Weight {
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 142 nanoseconds.
Weight::from_ref_time(201_435)
Weight::from_parts(201_435, 0)
}
/// The range of component `i` is `[0, 1000000]`.
fn multiplication(_i: u32, ) -> Weight {
@@ -81,7 +81,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 138 nanoseconds.
Weight::from_ref_time(207_037)
Weight::from_parts(207_037, 0)
}
/// The range of component `i` is `[0, 1000000]`.
fn division(_i: u32, ) -> Weight {
@@ -89,14 +89,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 151 nanoseconds.
Weight::from_ref_time(205_150)
Weight::from_parts(205_150, 0)
}
fn hashing() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 21_950_884 nanoseconds.
Weight::from_ref_time(21_994_001_000)
Weight::from_parts(21_994_001_000, 0)
}
/// The range of component `i` is `[0, 100]`.
fn sr25519_verification(i: u32, ) -> Weight {
@@ -104,9 +104,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 168 nanoseconds.
Weight::from_ref_time(1_680_898)
Weight::from_parts(1_680_898, 0)
// Standard Error: 10_291
.saturating_add(Weight::from_ref_time(46_867_301).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(46_867_301, 0).saturating_mul(i.into()))
}
}
@@ -118,7 +118,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 138 nanoseconds.
Weight::from_ref_time(199_805)
Weight::from_parts(199_805, 0)
}
/// The range of component `i` is `[0, 1000000]`.
fn subtraction(_i: u32, ) -> Weight {
@@ -126,7 +126,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 142 nanoseconds.
Weight::from_ref_time(201_435)
Weight::from_parts(201_435, 0)
}
/// The range of component `i` is `[0, 1000000]`.
fn multiplication(_i: u32, ) -> Weight {
@@ -134,7 +134,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 138 nanoseconds.
Weight::from_ref_time(207_037)
Weight::from_parts(207_037, 0)
}
/// The range of component `i` is `[0, 1000000]`.
fn division(_i: u32, ) -> Weight {
@@ -142,14 +142,14 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 151 nanoseconds.
Weight::from_ref_time(205_150)
Weight::from_parts(205_150, 0)
}
fn hashing() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 21_950_884 nanoseconds.
Weight::from_ref_time(21_994_001_000)
Weight::from_parts(21_994_001_000, 0)
}
/// The range of component `i` is `[0, 100]`.
fn sr25519_verification(i: u32, ) -> Weight {
@@ -157,8 +157,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 168 nanoseconds.
Weight::from_ref_time(1_680_898)
Weight::from_parts(1_680_898, 0)
// Standard Error: 10_291
.saturating_add(Weight::from_ref_time(46_867_301).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(46_867_301, 0).saturating_mul(i.into()))
}
}
+6 -6
View File
@@ -80,7 +80,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 22_787 nanoseconds.
Weight::from_parts(23_898_632, 3102)
// Standard Error: 141
.saturating_add(Weight::from_ref_time(568).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(568, 0).saturating_mul(d.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -223,12 +223,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 4_685 nanoseconds.
Weight::from_parts(9_932_840, 897)
// Standard Error: 14_301
.saturating_add(Weight::from_ref_time(27_178_347).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(27_178_347, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_proof_size(7858).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 7858).saturating_mul(b.into()))
}
}
@@ -250,7 +250,7 @@ impl WeightInfo for () {
// Minimum execution time: 22_787 nanoseconds.
Weight::from_parts(23_898_632, 3102)
// Standard Error: 141
.saturating_add(Weight::from_ref_time(568).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(568, 0).saturating_mul(d.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -393,11 +393,11 @@ impl WeightInfo for () {
// Minimum execution time: 4_685 nanoseconds.
Weight::from_parts(9_932_840, 897)
// Standard Error: 14_301
.saturating_add(Weight::from_ref_time(27_178_347).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(27_178_347, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(b.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_proof_size(7858).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 7858).saturating_mul(b.into()))
}
}
+1 -1
View File
@@ -59,7 +59,7 @@ frame_support::construct_runtime!(
);
parameter_types! {
pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024);
pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0);
pub const MaximumBlockLength: u32 = 2 * 1024;
pub const AvailableBlockRatio: Perbill = Perbill::one();
}
@@ -81,7 +81,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 46_743 nanoseconds.
Weight::from_parts(47_762_924, 10848)
// Standard Error: 135
.saturating_add(Weight::from_ref_time(599).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(599, 0).saturating_mul(d.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -226,7 +226,7 @@ impl WeightInfo for () {
// Minimum execution time: 46_743 nanoseconds.
Weight::from_parts(47_762_924, 10848)
// Standard Error: 135
.saturating_add(Weight::from_ref_time(599).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(599, 0).saturating_mul(d.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
+3 -3
View File
@@ -288,7 +288,7 @@ fn proposal_weight_limit_works_on_approve() {
RuntimeOrigin::signed(4),
hash,
0,
proposal_weight - Weight::from_ref_time(100),
proposal_weight - Weight::from_parts(100, 0),
proposal_len
),
Error::<Test, Instance1>::WrongProposalWeight
@@ -327,7 +327,7 @@ fn proposal_weight_limit_ignored_on_disapprove() {
RuntimeOrigin::signed(4),
hash,
0,
proposal_weight - Weight::from_ref_time(100),
proposal_weight - Weight::from_parts(100, 0),
proposal_len
));
})
@@ -750,7 +750,7 @@ fn correct_validate_and_get_proposal() {
Collective::validate_and_get_proposal(
&hash,
length,
weight - Weight::from_ref_time(10)
weight - Weight::from_parts(10, 0)
),
Error::<Test, Instance1>::WrongProposalWeight
);
+78 -78
View File
@@ -81,15 +81,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_093 nanoseconds.
Weight::from_parts(17_284_000, 16586)
// Standard Error: 64_700
.saturating_add(Weight::from_ref_time(5_143_145).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(5_143_145, 0).saturating_mul(m.into()))
// Standard Error: 64_700
.saturating_add(Weight::from_ref_time(7_480_941).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(7_480_941, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(7809).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(10238).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 7809).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 10238).saturating_mul(p.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -102,11 +102,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_972 nanoseconds.
Weight::from_parts(14_971_445, 730)
// Standard Error: 32
.saturating_add(Weight::from_ref_time(1_775).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_775, 0).saturating_mul(b.into()))
// Standard Error: 334
.saturating_add(Weight::from_ref_time(17_052).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(17_052, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(Weight::from_proof_size(32).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -121,11 +121,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_950 nanoseconds.
Weight::from_parts(17_019_558, 3440)
// Standard Error: 41
.saturating_add(Weight::from_ref_time(1_807).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_807, 0).saturating_mul(b.into()))
// Standard Error: 432
.saturating_add(Weight::from_ref_time(27_986).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(27_986, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(64).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -147,15 +147,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 24_817 nanoseconds.
Weight::from_parts(24_778_955, 6355)
// Standard Error: 73
.saturating_add(Weight::from_ref_time(2_355).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_355, 0).saturating_mul(b.into()))
// Standard Error: 765
.saturating_add(Weight::from_ref_time(20_518).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(20_518, 0).saturating_mul(m.into()))
// Standard Error: 755
.saturating_add(Weight::from_ref_time(85_670).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(85_670, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(Weight::from_proof_size(165).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(180).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -169,10 +169,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 19_790 nanoseconds.
Weight::from_parts(20_528_275, 4980)
// Standard Error: 651
.saturating_add(Weight::from_ref_time(48_856).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(48_856, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(128).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -191,13 +191,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 25_564 nanoseconds.
Weight::from_parts(25_535_497, 5893)
// Standard Error: 610
.saturating_add(Weight::from_ref_time(27_956).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(27_956, 0).saturating_mul(m.into()))
// Standard Error: 595
.saturating_add(Weight::from_ref_time(84_835).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(84_835, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(260).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -217,16 +217,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 36_515 nanoseconds.
Weight::from_parts(36_626_648, 9164)
// Standard Error: 98
.saturating_add(Weight::from_ref_time(2_295).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_295, 0).saturating_mul(b.into()))
// Standard Error: 1_036
.saturating_add(Weight::from_ref_time(22_182).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(22_182, 0).saturating_mul(m.into()))
// Standard Error: 1_010
.saturating_add(Weight::from_ref_time(100_034).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(100_034, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(b.into()))
.saturating_add(Weight::from_proof_size(264).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(160).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -247,13 +247,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_858 nanoseconds.
Weight::from_parts(28_050_047, 7095)
// Standard Error: 614
.saturating_add(Weight::from_ref_time(34_031).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(34_031, 0).saturating_mul(m.into()))
// Standard Error: 599
.saturating_add(Weight::from_ref_time(85_744).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(85_744, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(325).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(180).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -275,16 +275,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 38_608 nanoseconds.
Weight::from_parts(39_948_329, 10565)
// Standard Error: 84
.saturating_add(Weight::from_ref_time(2_045).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_045, 0).saturating_mul(b.into()))
// Standard Error: 895
.saturating_add(Weight::from_ref_time(22_669).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(22_669, 0).saturating_mul(m.into()))
// Standard Error: 872
.saturating_add(Weight::from_ref_time(95_525).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(95_525, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(5).saturating_mul(b.into()))
.saturating_add(Weight::from_proof_size(330).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(200).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into()))
}
/// Storage: Council Proposals (r:1 w:1)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
@@ -300,10 +300,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 14_785 nanoseconds.
Weight::from_parts(16_393_818, 1668)
// Standard Error: 612
.saturating_add(Weight::from_ref_time(76_786).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(76_786, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(96).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into()))
}
}
@@ -327,15 +327,15 @@ impl WeightInfo for () {
// Minimum execution time: 17_093 nanoseconds.
Weight::from_parts(17_284_000, 16586)
// Standard Error: 64_700
.saturating_add(Weight::from_ref_time(5_143_145).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(5_143_145, 0).saturating_mul(m.into()))
// Standard Error: 64_700
.saturating_add(Weight::from_ref_time(7_480_941).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(7_480_941, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(7809).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(10238).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 7809).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 10238).saturating_mul(p.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -348,11 +348,11 @@ impl WeightInfo for () {
// Minimum execution time: 15_972 nanoseconds.
Weight::from_parts(14_971_445, 730)
// Standard Error: 32
.saturating_add(Weight::from_ref_time(1_775).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_775, 0).saturating_mul(b.into()))
// Standard Error: 334
.saturating_add(Weight::from_ref_time(17_052).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(17_052, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(Weight::from_proof_size(32).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -367,11 +367,11 @@ impl WeightInfo for () {
// Minimum execution time: 17_950 nanoseconds.
Weight::from_parts(17_019_558, 3440)
// Standard Error: 41
.saturating_add(Weight::from_ref_time(1_807).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_807, 0).saturating_mul(b.into()))
// Standard Error: 432
.saturating_add(Weight::from_ref_time(27_986).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(27_986, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(Weight::from_proof_size(64).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -393,15 +393,15 @@ impl WeightInfo for () {
// Minimum execution time: 24_817 nanoseconds.
Weight::from_parts(24_778_955, 6355)
// Standard Error: 73
.saturating_add(Weight::from_ref_time(2_355).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_355, 0).saturating_mul(b.into()))
// Standard Error: 765
.saturating_add(Weight::from_ref_time(20_518).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(20_518, 0).saturating_mul(m.into()))
// Standard Error: 755
.saturating_add(Weight::from_ref_time(85_670).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(85_670, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(Weight::from_proof_size(165).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(180).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 165).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
}
/// Storage: Council Members (r:1 w:0)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -415,10 +415,10 @@ impl WeightInfo for () {
// Minimum execution time: 19_790 nanoseconds.
Weight::from_parts(20_528_275, 4980)
// Standard Error: 651
.saturating_add(Weight::from_ref_time(48_856).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(48_856, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(128).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 128).saturating_mul(m.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -437,13 +437,13 @@ impl WeightInfo for () {
// Minimum execution time: 25_564 nanoseconds.
Weight::from_parts(25_535_497, 5893)
// Standard Error: 610
.saturating_add(Weight::from_ref_time(27_956).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(27_956, 0).saturating_mul(m.into()))
// Standard Error: 595
.saturating_add(Weight::from_ref_time(84_835).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(84_835, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(260).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 260).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -463,16 +463,16 @@ impl WeightInfo for () {
// Minimum execution time: 36_515 nanoseconds.
Weight::from_parts(36_626_648, 9164)
// Standard Error: 98
.saturating_add(Weight::from_ref_time(2_295).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_295, 0).saturating_mul(b.into()))
// Standard Error: 1_036
.saturating_add(Weight::from_ref_time(22_182).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(22_182, 0).saturating_mul(m.into()))
// Standard Error: 1_010
.saturating_add(Weight::from_ref_time(100_034).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(100_034, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(4).saturating_mul(b.into()))
.saturating_add(Weight::from_proof_size(264).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(160).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 264).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 160).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -493,13 +493,13 @@ impl WeightInfo for () {
// Minimum execution time: 28_858 nanoseconds.
Weight::from_parts(28_050_047, 7095)
// Standard Error: 614
.saturating_add(Weight::from_ref_time(34_031).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(34_031, 0).saturating_mul(m.into()))
// Standard Error: 599
.saturating_add(Weight::from_ref_time(85_744).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(85_744, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(325).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(180).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 325).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 180).saturating_mul(p.into()))
}
/// Storage: Council Voting (r:1 w:1)
/// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured)
@@ -521,16 +521,16 @@ impl WeightInfo for () {
// Minimum execution time: 38_608 nanoseconds.
Weight::from_parts(39_948_329, 10565)
// Standard Error: 84
.saturating_add(Weight::from_ref_time(2_045).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_045, 0).saturating_mul(b.into()))
// Standard Error: 895
.saturating_add(Weight::from_ref_time(22_669).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(22_669, 0).saturating_mul(m.into()))
// Standard Error: 872
.saturating_add(Weight::from_ref_time(95_525).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(95_525, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(5).saturating_mul(b.into()))
.saturating_add(Weight::from_proof_size(330).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(200).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 5).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 330).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 200).saturating_mul(p.into()))
}
/// Storage: Council Proposals (r:1 w:1)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
@@ -546,9 +546,9 @@ impl WeightInfo for () {
// Minimum execution time: 14_785 nanoseconds.
Weight::from_parts(16_393_818, 1668)
// Standard Error: 612
.saturating_add(Weight::from_ref_time(76_786).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(76_786, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(96).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 96).saturating_mul(p.into()))
}
}
+6 -6
View File
@@ -275,19 +275,19 @@ mod tests {
struct SimpleToken(u64);
impl Token<Test> for SimpleToken {
fn weight(&self) -> Weight {
Weight::from_ref_time(self.0)
Weight::from_parts(self.0, 0)
}
}
#[test]
fn it_works() {
let gas_meter = GasMeter::<Test>::new(Weight::from_ref_time(50000));
assert_eq!(gas_meter.gas_left(), Weight::from_ref_time(50000));
let gas_meter = GasMeter::<Test>::new(Weight::from_parts(50000, 0));
assert_eq!(gas_meter.gas_left(), Weight::from_parts(50000, 0));
}
#[test]
fn tracing() {
let mut gas_meter = GasMeter::<Test>::new(Weight::from_ref_time(50000));
let mut gas_meter = GasMeter::<Test>::new(Weight::from_parts(50000, 0));
assert!(!gas_meter.charge(SimpleToken(1)).is_err());
let mut tokens = gas_meter.tokens().iter();
@@ -304,7 +304,7 @@ mod tests {
// Make sure that the gas meter does not charge in case of overcharger
#[test]
fn overcharge_does_not_charge() {
let mut gas_meter = GasMeter::<Test>::new(Weight::from_ref_time(200));
let mut gas_meter = GasMeter::<Test>::new(Weight::from_parts(200, 0));
// The first charge is should lead to OOG.
assert!(gas_meter.charge(SimpleToken(300)).is_err());
@@ -317,7 +317,7 @@ mod tests {
// possible.
#[test]
fn charge_exact_amount() {
let mut gas_meter = GasMeter::<Test>::new(Weight::from_ref_time(25));
let mut gas_meter = GasMeter::<Test>::new(Weight::from_parts(25, 0));
assert!(!gas_meter.charge(SimpleToken(25)).is_err());
}
}
+3 -3
View File
@@ -190,7 +190,7 @@ impl ChainExtension<Test> for TestExtension {
},
2 => {
let mut env = env.buf_in_buf_out();
let weight = Weight::from_ref_time(env.read(5)?[4].into());
let weight = Weight::from_parts(env.read(5)?[4].into(), 0);
env.charge_weight(weight)?;
Ok(RetVal::Converging(id))
},
@@ -705,7 +705,7 @@ fn run_out_of_gas() {
RuntimeOrigin::signed(ALICE),
addr, // newly created account
0,
Weight::from_ref_time(1_000_000_000_000).set_proof_size(u64::MAX),
Weight::from_parts(1_000_000_000_000, u64::MAX),
None,
vec![],
),
@@ -2115,7 +2115,7 @@ fn lazy_removal_partial_remove_works() {
// We create a contract with some extra keys above the weight limit
let extra_keys = 7u32;
let weight_limit = Weight::from_ref_time(5_000_000_000);
let weight_limit = Weight::from_parts(5_000_000_000, 0);
let (_, max_keys) = ContractInfo::<Test>::deletion_budget(1, weight_limit);
let vals: Vec<_> = (0..max_keys + extra_keys)
.map(|i| (blake2_256(&i.encode()), (i as u32), (i as u32).encode()))
@@ -282,7 +282,7 @@ impl RuntimeCosts {
fn token<T: Config>(&self, s: &HostFnWeights<T>) -> RuntimeToken {
use self::RuntimeCosts::*;
let weight = match *self {
MeteringBlock(amount) => s.gas.saturating_add(Weight::from_ref_time(amount)),
MeteringBlock(amount) => s.gas.saturating_add(Weight::from_parts(amount, 0)),
CopyFromContract(len) => s.return_per_byte.saturating_mul(len.into()),
CopyToContract(len) => s.input_per_byte.saturating_mul(len.into()),
Caller => s.caller,
@@ -903,7 +903,7 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> {
self.charge_gas(RuntimeCosts::CallSurchargeTransfer)?;
}
self.ext.call(
Weight::from_ref_time(gas),
Weight::from_parts(gas, 0),
callee,
value,
input_data,
@@ -958,7 +958,7 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> {
salt_ptr: u32,
salt_len: u32,
) -> Result<ReturnCode, TrapReason> {
let gas = Weight::from_ref_time(gas);
let gas = Weight::from_parts(gas, 0);
self.charge_gas(RuntimeCosts::InstantiateBase { input_data_len, salt_len })?;
let value: BalanceOf<<E as Ext>::T> = self.read_sandbox_memory_as(memory, value_ptr)?;
if value > 0u32.into() {
@@ -1802,7 +1802,7 @@ pub mod env {
out_ptr: u32,
out_len_ptr: u32,
) -> Result<(), TrapReason> {
let gas = Weight::from_ref_time(gas);
let gas = Weight::from_parts(gas, 0);
ctx.charge_gas(RuntimeCosts::WeightToFee)?;
Ok(ctx.write_sandbox_output(
memory,
File diff suppressed because it is too large Load Diff
@@ -144,12 +144,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 33_246 nanoseconds.
Weight::from_parts(34_560_391, 176657)
// Standard Error: 63_925
.saturating_add(Weight::from_ref_time(34_500_408).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(34_500_408, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(110917).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 110917).saturating_mul(r.into()))
}
/// Storage: ConvictionVoting VotingFor (r:2 w:2)
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
@@ -165,12 +165,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 20_508 nanoseconds.
Weight::from_parts(21_240_024, 170349)
// Standard Error: 37_314
.saturating_add(Weight::from_ref_time(30_890_875).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(30_890_875, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(110917).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 110917).saturating_mul(r.into()))
}
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
@@ -275,12 +275,12 @@ impl WeightInfo for () {
// Minimum execution time: 33_246 nanoseconds.
Weight::from_parts(34_560_391, 176657)
// Standard Error: 63_925
.saturating_add(Weight::from_ref_time(34_500_408).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(34_500_408, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(110917).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 110917).saturating_mul(r.into()))
}
/// Storage: ConvictionVoting VotingFor (r:2 w:2)
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
@@ -296,12 +296,12 @@ impl WeightInfo for () {
// Minimum execution time: 20_508 nanoseconds.
Weight::from_parts(21_240_024, 170349)
// Standard Error: 37_314
.saturating_add(Weight::from_ref_time(30_890_875).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(30_890_875, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(110917).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 110917).saturating_mul(r.into()))
}
/// Storage: ConvictionVoting VotingFor (r:1 w:1)
/// Proof: ConvictionVoting VotingFor (max_values: None, max_size: Some(27241), added: 29716, mode: MaxEncodedLen)
+30 -30
View File
@@ -198,7 +198,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_961 nanoseconds.
Weight::from_ref_time(3_139_000)
Weight::from_parts(3_139_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Democracy NextExternal (r:0 w:1)
@@ -208,7 +208,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_040 nanoseconds.
Weight::from_ref_time(3_261_000)
Weight::from_parts(3_261_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Democracy NextExternal (r:1 w:1)
@@ -287,11 +287,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 7_093 nanoseconds.
Weight::from_parts(8_792_955, 998)
// Standard Error: 6_630
.saturating_add(Weight::from_ref_time(3_091_565).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(3_091_565, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy LowestUnbaked (r:1 w:1)
/// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -313,11 +313,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 10_372 nanoseconds.
Weight::from_parts(10_961_165, 19318)
// Standard Error: 7_284
.saturating_add(Weight::from_ref_time(3_112_573).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(3_112_573, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:3 w:3)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
@@ -333,12 +333,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 36_618 nanoseconds.
Weight::from_parts(42_803_184, 22584)
// Standard Error: 7_268
.saturating_add(Weight::from_ref_time(4_537_902).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(4_537_902, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:2 w:2)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
@@ -352,12 +352,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 19_758 nanoseconds.
Weight::from_parts(21_641_793, 12540)
// Standard Error: 6_889
.saturating_add(Weight::from_ref_time(4_478_884).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(4_478_884, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy PublicProps (r:0 w:1)
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
@@ -366,7 +366,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_844 nanoseconds.
Weight::from_ref_time(3_017_000)
Weight::from_parts(3_017_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Democracy VotingOf (r:1 w:1)
@@ -383,7 +383,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 20_380 nanoseconds.
Weight::from_parts(28_295_875, 12647)
// Standard Error: 2_331
.saturating_add(Weight::from_ref_time(67_348).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(67_348, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -401,7 +401,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 24_475 nanoseconds.
Weight::from_parts(27_102_576, 12647)
// Standard Error: 1_464
.saturating_add(Weight::from_ref_time(128_921).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(128_921, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -417,7 +417,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_039 nanoseconds.
Weight::from_parts(19_252_498, 8946)
// Standard Error: 1_798
.saturating_add(Weight::from_ref_time(131_855).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(131_855, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -433,7 +433,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 14_837 nanoseconds.
Weight::from_parts(19_144_929, 8946)
// Standard Error: 1_875
.saturating_add(Weight::from_ref_time(136_819).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(136_819, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -639,7 +639,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_961 nanoseconds.
Weight::from_ref_time(3_139_000)
Weight::from_parts(3_139_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Democracy NextExternal (r:0 w:1)
@@ -649,7 +649,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_040 nanoseconds.
Weight::from_ref_time(3_261_000)
Weight::from_parts(3_261_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Democracy NextExternal (r:1 w:1)
@@ -728,11 +728,11 @@ impl WeightInfo for () {
// Minimum execution time: 7_093 nanoseconds.
Weight::from_parts(8_792_955, 998)
// Standard Error: 6_630
.saturating_add(Weight::from_ref_time(3_091_565).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(3_091_565, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy LowestUnbaked (r:1 w:1)
/// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -754,11 +754,11 @@ impl WeightInfo for () {
// Minimum execution time: 10_372 nanoseconds.
Weight::from_parts(10_961_165, 19318)
// Standard Error: 7_284
.saturating_add(Weight::from_ref_time(3_112_573).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(3_112_573, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:3 w:3)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
@@ -774,12 +774,12 @@ impl WeightInfo for () {
// Minimum execution time: 36_618 nanoseconds.
Weight::from_parts(42_803_184, 22584)
// Standard Error: 7_268
.saturating_add(Weight::from_ref_time(4_537_902).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(4_537_902, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:2 w:2)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
@@ -793,12 +793,12 @@ impl WeightInfo for () {
// Minimum execution time: 19_758 nanoseconds.
Weight::from_parts(21_641_793, 12540)
// Standard Error: 6_889
.saturating_add(Weight::from_ref_time(4_478_884).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(4_478_884, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy PublicProps (r:0 w:1)
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
@@ -807,7 +807,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_844 nanoseconds.
Weight::from_ref_time(3_017_000)
Weight::from_parts(3_017_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Democracy VotingOf (r:1 w:1)
@@ -824,7 +824,7 @@ impl WeightInfo for () {
// Minimum execution time: 20_380 nanoseconds.
Weight::from_parts(28_295_875, 12647)
// Standard Error: 2_331
.saturating_add(Weight::from_ref_time(67_348).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(67_348, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -842,7 +842,7 @@ impl WeightInfo for () {
// Minimum execution time: 24_475 nanoseconds.
Weight::from_parts(27_102_576, 12647)
// Standard Error: 1_464
.saturating_add(Weight::from_ref_time(128_921).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(128_921, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -858,7 +858,7 @@ impl WeightInfo for () {
// Minimum execution time: 15_039 nanoseconds.
Weight::from_parts(19_252_498, 8946)
// Standard Error: 1_798
.saturating_add(Weight::from_ref_time(131_855).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(131_855, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -874,7 +874,7 @@ impl WeightInfo for () {
// Minimum execution time: 14_837 nanoseconds.
Weight::from_parts(19_144_929, 8946)
// Standard Error: 1_875
.saturating_add(Weight::from_ref_time(136_819).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(136_819, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -363,11 +363,12 @@ impl MinerConfig for Runtime {
fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight {
match MockWeightInfo::get() {
MockedWeightInfo::Basic => Weight::from_ref_time(
MockedWeightInfo::Basic => Weight::from_parts(
(10 as u64).saturating_add((5 as u64).saturating_mul(a as u64)),
0,
),
MockedWeightInfo::Complex =>
Weight::from_ref_time((0 * v + 0 * t + 1000 * a + 0 * d) as u64),
Weight::from_parts((0 * v + 0 * t + 1000 * a + 0 * d) as u64, 0),
MockedWeightInfo::Real =>
<() as multi_phase::weights::WeightInfo>::feasibility_check(v, t, a, d),
}
@@ -1254,7 +1254,7 @@ mod tests {
#[test]
fn cannot_consume_too_much_future_weight() {
ExtBuilder::default()
.signed_weight(Weight::from_ref_time(40).set_proof_size(u64::MAX))
.signed_weight(Weight::from_parts(40, u64::MAX))
.mock_weight_info(MockedWeightInfo::Basic)
.build_and_execute(|| {
roll_to_signed();
@@ -1268,16 +1268,16 @@ mod tests {
raw.solution.unique_targets().len() as u32,
);
// default solution will have 5 edges (5 * 5 + 10)
assert_eq!(solution_weight, Weight::from_ref_time(35));
assert_eq!(solution_weight, Weight::from_parts(35, 0));
assert_eq!(raw.solution.voter_count(), 5);
assert_eq!(
<Runtime as Config>::SignedMaxWeight::get(),
Weight::from_ref_time(40).set_proof_size(u64::MAX)
Weight::from_parts(40, u64::MAX)
);
assert_ok!(MultiPhase::submit(RuntimeOrigin::signed(99), Box::new(raw.clone())));
<SignedMaxWeight>::set(Weight::from_ref_time(30).set_proof_size(u64::MAX));
<SignedMaxWeight>::set(Weight::from_parts(30, u64::MAX));
// note: resubmitting the same solution is technically okay as long as the queue has
// space.
@@ -701,345 +701,177 @@ mod max_weight {
let w = SolutionOrSnapshotSize { voters: 10, targets: 0 };
MockWeightInfo::set(crate::mock::MockedWeightInfo::Complex);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::zero().set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(0, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(999, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1000, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1001).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1001, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1990).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1990, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1999, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2000, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2001).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2001, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2010).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2010, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2990).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2990, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2999, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(3000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(3000, u64::MAX)),
3
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(3333).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(3333, u64::MAX)),
3
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(5500).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(5500, u64::MAX)),
5
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(7777).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(7777, u64::MAX)),
7
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(9999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(9999, u64::MAX)),
9
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(10_000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(10_000, u64::MAX)),
10
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(10_999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(10_999, u64::MAX)),
10
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(11_000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(11_000, u64::MAX)),
10
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(22_000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(22_000, u64::MAX)),
10
);
let w = SolutionOrSnapshotSize { voters: 1, targets: 0 };
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(0).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(0, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(999, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1000, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1001).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1001, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1990).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1990, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1999, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2000, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2001).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2001, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2010).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2010, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(3333).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(3333, u64::MAX)),
1
);
let w = SolutionOrSnapshotSize { voters: 2, targets: 0 };
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(0).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(0, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(999, u64::MAX)),
0
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1000, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1001).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1001, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(1999).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(1999, u64::MAX)),
1
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2000).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2000, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2001).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2001, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(2010).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(2010, u64::MAX)),
2
);
assert_eq!(
Miner::<Runtime>::maximum_voter_for_weight(
0,
w,
Weight::from_ref_time(3333).set_proof_size(u64::MAX)
),
Miner::<Runtime>::maximum_voter_for_weight(0, w, Weight::from_parts(3333, u64::MAX)),
2
);
}
@@ -1340,7 +1172,7 @@ mod tests {
#[test]
fn miner_trims_weight() {
ExtBuilder::default()
.miner_weight(Weight::from_ref_time(100).set_proof_size(u64::MAX))
.miner_weight(Weight::from_parts(100, u64::MAX))
.mock_weight_info(crate::mock::MockedWeightInfo::Basic)
.build_and_execute(|| {
roll_to_unsigned();
@@ -1354,11 +1186,11 @@ mod tests {
raw.solution.unique_targets().len() as u32,
);
// default solution will have 5 edges (5 * 5 + 10)
assert_eq!(solution_weight, Weight::from_ref_time(35));
assert_eq!(solution_weight, Weight::from_parts(35, 0));
assert_eq!(raw.solution.voter_count(), 5);
// now reduce the max weight
<MinerMaxWeight>::set(Weight::from_ref_time(25).set_proof_size(u64::MAX));
<MinerMaxWeight>::set(Weight::from_parts(25, u64::MAX));
let (raw, witness) = MultiPhase::mine_solution().unwrap();
let solution_weight = <Runtime as MinerConfig>::solution_weight(
@@ -1368,7 +1200,7 @@ mod tests {
raw.solution.unique_targets().len() as u32,
);
// default solution will have 5 edges (5 * 5 + 10)
assert_eq!(solution_weight, Weight::from_ref_time(25));
assert_eq!(solution_weight, Weight::from_parts(25, 0));
assert_eq!(raw.solution.voter_count(), 3);
})
}
@@ -150,9 +150,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 215_168 nanoseconds.
Weight::from_ref_time(219_887_000)
Weight::from_parts(219_887_000, 0)
// Standard Error: 1_444
.saturating_add(Weight::from_ref_time(146_388).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(146_388, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
@@ -182,13 +182,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 268_021 nanoseconds.
Weight::from_parts(72_491_937, 9540)
// Standard Error: 2_910
.saturating_add(Weight::from_ref_time(303_955).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(303_955, 0).saturating_mul(a.into()))
// Standard Error: 4_363
.saturating_add(Weight::from_ref_time(167_369).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(167_369, 0).saturating_mul(d.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
.saturating_add(Weight::from_proof_size(6912).saturating_mul(a.into()))
.saturating_add(Weight::from_proof_size(441).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(0, 6912).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 441).saturating_mul(d.into()))
}
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
@@ -236,13 +236,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 4_425_457 nanoseconds.
Weight::from_parts(4_445_889_000, 5222)
// Standard Error: 13_250
.saturating_add(Weight::from_ref_time(48_844).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(48_844, 0).saturating_mul(v.into()))
// Standard Error: 39_266
.saturating_add(Weight::from_ref_time(4_144_034).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(4_144_034, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(3871).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(224).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 3871).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into()))
}
/// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
@@ -263,12 +263,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 3_812_071 nanoseconds.
Weight::from_parts(3_826_375_000, 2884)
// Standard Error: 11_601
.saturating_add(Weight::from_ref_time(145_309).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(145_309, 0).saturating_mul(v.into()))
// Standard Error: 34_378
.saturating_add(Weight::from_ref_time(3_223_977).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(3_223_977, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(Weight::from_proof_size(2212).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(128).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 2212).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 128).saturating_mul(t.into()))
}
}
@@ -361,9 +361,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 215_168 nanoseconds.
Weight::from_ref_time(219_887_000)
Weight::from_parts(219_887_000, 0)
// Standard Error: 1_444
.saturating_add(Weight::from_ref_time(146_388).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(146_388, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
/// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
@@ -393,13 +393,13 @@ impl WeightInfo for () {
// Minimum execution time: 268_021 nanoseconds.
Weight::from_parts(72_491_937, 9540)
// Standard Error: 2_910
.saturating_add(Weight::from_ref_time(303_955).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(303_955, 0).saturating_mul(a.into()))
// Standard Error: 4_363
.saturating_add(Weight::from_ref_time(167_369).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(167_369, 0).saturating_mul(d.into()))
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(8_u64))
.saturating_add(Weight::from_proof_size(6912).saturating_mul(a.into()))
.saturating_add(Weight::from_proof_size(441).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(0, 6912).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 441).saturating_mul(d.into()))
}
/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
@@ -447,13 +447,13 @@ impl WeightInfo for () {
// Minimum execution time: 4_425_457 nanoseconds.
Weight::from_parts(4_445_889_000, 5222)
// Standard Error: 13_250
.saturating_add(Weight::from_ref_time(48_844).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(48_844, 0).saturating_mul(v.into()))
// Standard Error: 39_266
.saturating_add(Weight::from_ref_time(4_144_034).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(4_144_034, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(3871).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(224).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 3871).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into()))
}
/// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
/// Proof Skipped: ElectionProviderMultiPhase Round (max_values: Some(1), max_size: None, mode: Measured)
@@ -474,11 +474,11 @@ impl WeightInfo for () {
// Minimum execution time: 3_812_071 nanoseconds.
Weight::from_parts(3_826_375_000, 2884)
// Standard Error: 11_601
.saturating_add(Weight::from_ref_time(145_309).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(145_309, 0).saturating_mul(v.into()))
// Standard Error: 34_378
.saturating_add(Weight::from_ref_time(3_223_977).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(3_223_977, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(Weight::from_proof_size(2212).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(128).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 2212).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 128).saturating_mul(t.into()))
}
}
@@ -53,43 +53,43 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn phragmen(v: u32, t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
Weight::from_parts(0 as u64, 0)
// Standard Error: 667_000
.saturating_add(Weight::from_ref_time(32_973_000 as u64).saturating_mul(v as u64))
.saturating_add(Weight::from_parts(32_973_000 as u64, 0).saturating_mul(v as u64))
// Standard Error: 1_334_000
.saturating_add(Weight::from_ref_time(1_334_000 as u64).saturating_mul(t as u64))
.saturating_add(Weight::from_parts(1_334_000 as u64, 0).saturating_mul(t as u64))
// Standard Error: 60_644_000
.saturating_add(Weight::from_ref_time(2_636_364_000 as u64).saturating_mul(d as u64))
.saturating_add(Weight::from_parts(2_636_364_000 as u64, 0).saturating_mul(d as u64))
}
fn phragmms(v: u32, t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
Weight::from_parts(0 as u64, 0)
// Standard Error: 73_000
.saturating_add(Weight::from_ref_time(21_073_000 as u64).saturating_mul(v as u64))
.saturating_add(Weight::from_parts(21_073_000 as u64, 0).saturating_mul(v as u64))
// Standard Error: 146_000
.saturating_add(Weight::from_ref_time(65_000 as u64).saturating_mul(t as u64))
.saturating_add(Weight::from_parts(65_000 as u64, 0).saturating_mul(t as u64))
// Standard Error: 6_649_000
.saturating_add(Weight::from_ref_time(1_711_424_000 as u64).saturating_mul(d as u64))
.saturating_add(Weight::from_parts(1_711_424_000 as u64, 0).saturating_mul(d as u64))
}
}
// For backwards compatibility and tests
impl WeightInfo for () {
fn phragmen(v: u32, t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
Weight::from_parts(0 as u64, 0)
// Standard Error: 667_000
.saturating_add(Weight::from_ref_time(32_973_000 as u64).saturating_mul(v as u64))
.saturating_add(Weight::from_parts(32_973_000 as u64, 0).saturating_mul(v as u64))
// Standard Error: 1_334_000
.saturating_add(Weight::from_ref_time(1_334_000 as u64).saturating_mul(t as u64))
.saturating_add(Weight::from_parts(1_334_000 as u64, 0).saturating_mul(t as u64))
// Standard Error: 60_644_000
.saturating_add(Weight::from_ref_time(2_636_364_000 as u64).saturating_mul(d as u64))
.saturating_add(Weight::from_parts(2_636_364_000 as u64, 0).saturating_mul(d as u64))
}
fn phragmms(v: u32, t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
Weight::from_parts(0 as u64, 0)
// Standard Error: 73_000
.saturating_add(Weight::from_ref_time(21_073_000 as u64).saturating_mul(v as u64))
.saturating_add(Weight::from_parts(21_073_000 as u64, 0).saturating_mul(v as u64))
// Standard Error: 146_000
.saturating_add(Weight::from_ref_time(65_000 as u64).saturating_mul(t as u64))
.saturating_add(Weight::from_parts(65_000 as u64, 0).saturating_mul(t as u64))
// Standard Error: 6_649_000
.saturating_add(Weight::from_ref_time(1_711_424_000 as u64).saturating_mul(d as u64))
.saturating_add(Weight::from_parts(1_711_424_000 as u64, 0).saturating_mul(d as u64))
}
}
@@ -84,10 +84,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_362 nanoseconds.
Weight::from_parts(28_497_963, 9726)
// Standard Error: 3_968
.saturating_add(Weight::from_ref_time(176_840).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(176_840, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -107,10 +107,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 37_120 nanoseconds.
Weight::from_parts(38_455_302, 9598)
// Standard Error: 5_478
.saturating_add(Weight::from_ref_time(219_678).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(219_678, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -130,10 +130,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 36_928 nanoseconds.
Weight::from_parts(38_334_669, 9726)
// Standard Error: 5_271
.saturating_add(Weight::from_ref_time(232_355).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(232_355, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
}
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
@@ -162,10 +162,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 31_864 nanoseconds.
Weight::from_parts(33_490_161, 6576)
// Standard Error: 2_643
.saturating_add(Weight::from_ref_time(158_386).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(158_386, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(144).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into()))
}
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -177,10 +177,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_292 nanoseconds.
Weight::from_parts(28_364_955, 844)
// Standard Error: 1_335
.saturating_add(Weight::from_ref_time(78_086).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(78_086, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(48).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
}
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -219,7 +219,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_000_000_000 nanoseconds.
Weight::from_ref_time(2_000_000_000_000)
Weight::from_parts(2_000_000_000_000, 0)
}
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -263,11 +263,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 14_934_185 nanoseconds.
Weight::from_parts(15_014_057_000, 8448)
// Standard Error: 245_588
.saturating_add(Weight::from_ref_time(35_586_946).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(35_586_946, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(12352).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 12352).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -297,17 +297,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 1_273_671 nanoseconds.
Weight::from_parts(1_279_716_000, 330033)
// Standard Error: 543_277
.saturating_add(Weight::from_ref_time(20_613_753).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(20_613_753, 0).saturating_mul(v.into()))
// Standard Error: 34_857
.saturating_add(Weight::from_ref_time(688_354).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(688_354, 0).saturating_mul(e.into()))
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(5229).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(89).saturating_mul(e.into()))
.saturating_add(Weight::from_proof_size(2135).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 5229).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 89).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(0, 2135).saturating_mul(c.into()))
}
}
@@ -331,10 +331,10 @@ impl WeightInfo for () {
// Minimum execution time: 27_362 nanoseconds.
Weight::from_parts(28_497_963, 9726)
// Standard Error: 3_968
.saturating_add(Weight::from_ref_time(176_840).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(176_840, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -354,10 +354,10 @@ impl WeightInfo for () {
// Minimum execution time: 37_120 nanoseconds.
Weight::from_parts(38_455_302, 9598)
// Standard Error: 5_478
.saturating_add(Weight::from_ref_time(219_678).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(219_678, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -377,10 +377,10 @@ impl WeightInfo for () {
// Minimum execution time: 36_928 nanoseconds.
Weight::from_parts(38_334_669, 9726)
// Standard Error: 5_271
.saturating_add(Weight::from_ref_time(232_355).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(232_355, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into()))
}
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
@@ -409,10 +409,10 @@ impl WeightInfo for () {
// Minimum execution time: 31_864 nanoseconds.
Weight::from_parts(33_490_161, 6576)
// Standard Error: 2_643
.saturating_add(Weight::from_ref_time(158_386).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(158_386, 0).saturating_mul(c.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(144).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into()))
}
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -424,10 +424,10 @@ impl WeightInfo for () {
// Minimum execution time: 27_292 nanoseconds.
Weight::from_parts(28_364_955, 844)
// Standard Error: 1_335
.saturating_add(Weight::from_ref_time(78_086).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(78_086, 0).saturating_mul(c.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(48).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
}
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -466,7 +466,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_000_000_000 nanoseconds.
Weight::from_ref_time(2_000_000_000_000)
Weight::from_parts(2_000_000_000_000, 0)
}
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -510,11 +510,11 @@ impl WeightInfo for () {
// Minimum execution time: 14_934_185 nanoseconds.
Weight::from_parts(15_014_057_000, 8448)
// Standard Error: 245_588
.saturating_add(Weight::from_ref_time(35_586_946).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(35_586_946, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(12352).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 12352).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -544,16 +544,16 @@ impl WeightInfo for () {
// Minimum execution time: 1_273_671 nanoseconds.
Weight::from_parts(1_279_716_000, 330033)
// Standard Error: 543_277
.saturating_add(Weight::from_ref_time(20_613_753).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(20_613_753, 0).saturating_mul(v.into()))
// Standard Error: 34_857
.saturating_add(Weight::from_ref_time(688_354).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(688_354, 0).saturating_mul(e.into()))
.saturating_add(RocksDbWeight::get().reads(21_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().writes(6_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(5229).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(89).saturating_mul(e.into()))
.saturating_add(Weight::from_proof_size(2135).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 5229).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 89).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(0, 2135).saturating_mul(c.into()))
}
}
+1 -1
View File
@@ -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))
}
}
+12 -12
View File
@@ -718,12 +718,12 @@ mod tests {
// one with block number arg and one without
fn on_initialize(n: T::BlockNumber) -> Weight {
println!("on_initialize({})", n);
Weight::from_ref_time(175)
Weight::from_parts(175, 0)
}
fn on_idle(n: T::BlockNumber, remaining_weight: Weight) -> Weight {
println!("on_idle{}, {})", n, remaining_weight);
Weight::from_ref_time(175)
Weight::from_parts(175, 0)
}
fn on_finalize(n: T::BlockNumber) {
@@ -732,7 +732,7 @@ mod tests {
fn on_runtime_upgrade() -> Weight {
sp_io::storage::set(super::TEST_KEY, "module".as_bytes());
Weight::from_ref_time(200)
Weight::from_parts(200, 0)
}
fn offchain_worker(n: T::BlockNumber) {
@@ -853,9 +853,9 @@ mod tests {
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::builder()
.base_block(Weight::from_ref_time(10))
.for_class(DispatchClass::all(), |weights| weights.base_extrinsic = Weight::from_ref_time(5))
.for_class(DispatchClass::non_mandatory(), |weights| weights.max_total = Weight::from_ref_time(1024).set_proof_size(u64::MAX).into())
.base_block(Weight::from_parts(10, 0))
.for_class(DispatchClass::all(), |weights| weights.base_extrinsic = Weight::from_parts(5, 0))
.for_class(DispatchClass::non_mandatory(), |weights| weights.max_total = Weight::from_parts(1024, u64::MAX).into())
.build_or_panic();
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 10,
@@ -946,7 +946,7 @@ mod tests {
sp_io::storage::set(TEST_KEY, "custom_upgrade".as_bytes());
sp_io::storage::set(CUSTOM_ON_RUNTIME_KEY, &true.encode());
System::deposit_event(frame_system::Event::CodeUpdated);
Weight::from_ref_time(100)
Weight::from_parts(100, 0)
}
}
@@ -1124,7 +1124,7 @@ mod tests {
let encoded_len = encoded.len() as u64;
// on_initialize weight + base block execution weight
let block_weights = <Runtime as frame_system::Config>::BlockWeights::get();
let base_block_weight = Weight::from_ref_time(175) + block_weights.base_block;
let base_block_weight = Weight::from_parts(175, 0) + block_weights.base_block;
let limit = block_weights.get(DispatchClass::Normal).max_total.unwrap() - base_block_weight;
let num_to_exhaust_block = limit.ref_time() / (encoded_len + 5);
t.execute_with(|| {
@@ -1149,7 +1149,7 @@ mod tests {
assert_eq!(
<frame_system::Pallet<Runtime>>::block_weight().total(),
//--------------------- on_initialize + block_execution + extrinsic_base weight
Weight::from_ref_time((encoded_len + 5) * (nonce + 1)) + base_block_weight,
Weight::from_parts((encoded_len + 5) * (nonce + 1), 0) + base_block_weight,
);
assert_eq!(
<frame_system::Pallet<Runtime>>::extrinsic_index(),
@@ -1180,7 +1180,7 @@ mod tests {
let mut t = new_test_ext(1);
t.execute_with(|| {
// Block execution weight + on_initialize weight from custom module
let base_block_weight = Weight::from_ref_time(175) +
let base_block_weight = Weight::from_parts(175, 0) +
<Runtime as frame_system::Config>::BlockWeights::get().base_block;
Executive::initialize_block(&Header::new(
@@ -1199,7 +1199,7 @@ mod tests {
assert!(Executive::apply_extrinsic(x2.clone()).unwrap().is_ok());
// default weight for `TestXt` == encoded length.
let extrinsic_weight = Weight::from_ref_time(len as u64) +
let extrinsic_weight = Weight::from_parts(len as u64, 0) +
<Runtime as frame_system::Config>::BlockWeights::get()
.get(DispatchClass::Normal)
.base_extrinsic;
@@ -1315,7 +1315,7 @@ mod tests {
// the `on_initialize` weight defined in the custom test module.
assert_eq!(
<frame_system::Pallet<Runtime>>::block_weight().total(),
Weight::from_ref_time(175 + 175 + 10)
Weight::from_parts(175 + 175 + 10, 0)
);
})
}
+2 -2
View File
@@ -208,7 +208,7 @@ pub mod pallet {
impl<T: Config> Hooks<T::BlockNumber> for Pallet<T> {
fn on_idle(_: T::BlockNumber, remaining_weight: Weight) -> Weight {
if remaining_weight.any_lt(T::DbWeight::get().reads(2)) {
return Weight::from_ref_time(0)
return Weight::from_parts(0, 0)
}
Self::do_on_idle(remaining_weight)
@@ -356,7 +356,7 @@ pub mod pallet {
/// checked, we don't finish the process.
pub(crate) fn do_on_idle(remaining_weight: Weight) -> Weight {
// any weight that is unaccounted for
let mut unaccounted_weight = Weight::from_ref_time(0);
let mut unaccounted_weight = Weight::from_parts(0, 0);
let eras_to_check_per_block = ErasToCheckPerBlock::<T>::get();
if eras_to_check_per_block.is_zero() {
+5 -3
View File
@@ -228,7 +228,7 @@ mod on_idle {
assert_eq!(Queue::<T>::get(1), Some(Deposit::get()));
// call on_idle with no remaining weight
FastUnstake::on_idle(System::block_number(), Weight::from_ref_time(0));
FastUnstake::on_idle(System::block_number(), Weight::from_parts(0, 0));
// assert nothing changed in Queue and Head
assert_eq!(Head::<T>::get(), None);
@@ -1091,8 +1091,9 @@ mod batched {
#[test]
fn kusama_estimate() {
use crate::WeightInfo;
let block_time = frame_support::weights::Weight::from_ref_time(
let block_time = frame_support::weights::Weight::from_parts(
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2,
0,
)
.ref_time() as f32;
let on_idle = crate::weights::SubstrateWeight::<T>::on_idle_check(1000, 64).ref_time() as f32;
@@ -1102,8 +1103,9 @@ fn kusama_estimate() {
#[test]
fn polkadot_estimate() {
use crate::WeightInfo;
let block_time = frame_support::weights::Weight::from_ref_time(
let block_time = frame_support::weights::Weight::from_parts(
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2,
0,
)
.ref_time() as f32;
let on_idle = crate::weights::SubstrateWeight::<T>::on_idle_check(300, 64).ref_time() as f32;
+16 -16
View File
@@ -75,9 +75,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `b` is `[1, 64]`.
fn on_idle_unstake(b: u32, ) -> Weight {
// Minimum execution time: 92_833 nanoseconds.
Weight::from_ref_time(62_136_346)
Weight::from_parts(62_136_346, 0)
// Standard Error: 25_541
.saturating_add(Weight::from_ref_time(42_904_859).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(42_904_859, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1))
@@ -94,11 +94,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `b` is `[1, 64]`.
fn on_idle_check(v: u32, b: u32, ) -> Weight {
// Minimum execution time: 1_775_293 nanoseconds.
Weight::from_ref_time(1_787_133_000)
Weight::from_parts(1_787_133_000, 0)
// Standard Error: 17_109_142
.saturating_add(Weight::from_ref_time(546_766_552).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(546_766_552, 0).saturating_mul(v.into()))
// Standard Error: 68_455_625
.saturating_add(Weight::from_ref_time(2_135_980_830).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_135_980_830, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes(1))
@@ -119,7 +119,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: FastUnstake CounterForQueue (r:1 w:1)
fn register_fast_unstake() -> Weight {
// Minimum execution time: 124_849 nanoseconds.
Weight::from_ref_time(128_176_000)
Weight::from_parts(128_176_000, 0)
.saturating_add(T::DbWeight::get().reads(14))
.saturating_add(T::DbWeight::get().writes(9))
}
@@ -130,14 +130,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: FastUnstake CounterForQueue (r:1 w:1)
fn deregister() -> Weight {
// Minimum execution time: 48_246 nanoseconds.
Weight::from_ref_time(49_720_000)
Weight::from_parts(49_720_000, 0)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
fn control() -> Weight {
// Minimum execution time: 4_611 nanoseconds.
Weight::from_ref_time(4_844_000)
Weight::from_parts(4_844_000, 0)
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -161,9 +161,9 @@ impl WeightInfo for () {
/// The range of component `b` is `[1, 64]`.
fn on_idle_unstake(b: u32, ) -> Weight {
// Minimum execution time: 92_833 nanoseconds.
Weight::from_ref_time(62_136_346)
Weight::from_parts(62_136_346, 0)
// Standard Error: 25_541
.saturating_add(Weight::from_ref_time(42_904_859).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(42_904_859, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(6))
.saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(b.into())))
.saturating_add(RocksDbWeight::get().writes(1))
@@ -180,11 +180,11 @@ impl WeightInfo for () {
/// The range of component `b` is `[1, 64]`.
fn on_idle_check(v: u32, b: u32, ) -> Weight {
// Minimum execution time: 1_775_293 nanoseconds.
Weight::from_ref_time(1_787_133_000)
Weight::from_parts(1_787_133_000, 0)
// Standard Error: 17_109_142
.saturating_add(Weight::from_ref_time(546_766_552).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(546_766_552, 0).saturating_mul(v.into()))
// Standard Error: 68_455_625
.saturating_add(Weight::from_ref_time(2_135_980_830).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(2_135_980_830, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(7))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().writes(1))
@@ -205,7 +205,7 @@ impl WeightInfo for () {
// Storage: FastUnstake CounterForQueue (r:1 w:1)
fn register_fast_unstake() -> Weight {
// Minimum execution time: 124_849 nanoseconds.
Weight::from_ref_time(128_176_000)
Weight::from_parts(128_176_000, 0)
.saturating_add(RocksDbWeight::get().reads(14))
.saturating_add(RocksDbWeight::get().writes(9))
}
@@ -216,14 +216,14 @@ impl WeightInfo for () {
// Storage: FastUnstake CounterForQueue (r:1 w:1)
fn deregister() -> Weight {
// Minimum execution time: 48_246 nanoseconds.
Weight::from_ref_time(49_720_000)
Weight::from_parts(49_720_000, 0)
.saturating_add(RocksDbWeight::get().reads(5))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
fn control() -> Weight {
// Minimum execution time: 4_611 nanoseconds.
Weight::from_ref_time(4_844_000)
Weight::from_parts(4_844_000, 0)
.saturating_add(RocksDbWeight::get().writes(1))
}
}
+1 -1
View File
@@ -133,7 +133,7 @@ fn on_idle_works() {
assert_ok!(Glutton::set_compute(RuntimeOrigin::root(), Perbill::from_percent(100)));
assert_ok!(Glutton::set_storage(RuntimeOrigin::root(), Perbill::from_percent(100)));
Glutton::on_idle(1, Weight::from_ref_time(20_000_000));
Glutton::on_idle(1, Weight::from_parts(20_000_000, 0));
});
}
+46 -46
View File
@@ -73,10 +73,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `4`
// Estimated: `1489`
// Minimum execution time: 10_218 nanoseconds.
Weight::from_ref_time(10_510_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(10_510_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
// Standard Error: 1_582
.saturating_add(Weight::from_ref_time(1_577_660).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_577_660, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
@@ -91,10 +91,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `65`
// Estimated: `1489`
// Minimum execution time: 10_993 nanoseconds.
Weight::from_ref_time(11_208_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(11_208_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
// Standard Error: 1_386
.saturating_add(Weight::from_ref_time(1_072_330).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_072_330, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
@@ -105,10 +105,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 740 nanoseconds.
Weight::from_ref_time(770_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(770_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 24
.saturating_add(Weight::from_ref_time(96_434).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(96_434, 0).saturating_mul(i.into()))
}
/// Storage: Glutton TrashData (r:5000 w:0)
/// Proof: Glutton TrashData (max_values: Some(65000), max_size: Some(1036), added: 3016, mode: MaxEncodedLen)
@@ -118,12 +118,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `119036 + i * (1053 ±0)`
// Estimated: `990 + i * (3016 ±0)`
// Minimum execution time: 630 nanoseconds.
Weight::from_ref_time(712_000)
.saturating_add(Weight::from_proof_size(990))
Weight::from_parts(712_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 4_326
.saturating_add(Weight::from_ref_time(5_500_880).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(5_500_880, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_proof_size(3016).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 3016).saturating_mul(i.into()))
}
/// Storage: Glutton Storage (r:1 w:0)
/// Proof: Glutton Storage (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -136,8 +136,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1954313`
// Estimated: `5242760`
// Minimum execution time: 56_743_236 nanoseconds.
Weight::from_ref_time(57_088_040_000)
.saturating_add(Weight::from_proof_size(5242760))
Weight::from_parts(57_088_040_000, 0)
.saturating_add(Weight::from_parts(0, 5242760))
.saturating_add(T::DbWeight::get().reads(1739_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -151,8 +151,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `9671`
// Estimated: `19048`
// Minimum execution time: 100_387_042 nanoseconds.
Weight::from_ref_time(100_987_577_000)
.saturating_add(Weight::from_proof_size(19048))
Weight::from_parts(100_987_577_000, 0)
.saturating_add(Weight::from_parts(0, 19048))
.saturating_add(T::DbWeight::get().reads(7_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -164,8 +164,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `4`
// Estimated: `2978`
// Minimum execution time: 4_256 nanoseconds.
Weight::from_ref_time(4_447_000)
.saturating_add(Weight::from_proof_size(2978))
Weight::from_parts(4_447_000, 0)
.saturating_add(Weight::from_parts(0, 2978))
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: Glutton Compute (r:0 w:1)
@@ -175,8 +175,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_663 nanoseconds.
Weight::from_ref_time(8_864_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(8_864_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Glutton Storage (r:0 w:1)
@@ -186,8 +186,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_653 nanoseconds.
Weight::from_ref_time(8_998_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(8_998_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
@@ -204,10 +204,10 @@ impl WeightInfo for () {
// Measured: `4`
// Estimated: `1489`
// Minimum execution time: 10_218 nanoseconds.
Weight::from_ref_time(10_510_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(10_510_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
// Standard Error: 1_582
.saturating_add(Weight::from_ref_time(1_577_660).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_577_660, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
@@ -222,10 +222,10 @@ impl WeightInfo for () {
// Measured: `65`
// Estimated: `1489`
// Minimum execution time: 10_993 nanoseconds.
Weight::from_ref_time(11_208_000)
.saturating_add(Weight::from_proof_size(1489))
Weight::from_parts(11_208_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
// Standard Error: 1_386
.saturating_add(Weight::from_ref_time(1_072_330).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_072_330, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
@@ -236,10 +236,10 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 740 nanoseconds.
Weight::from_ref_time(770_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(770_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 24
.saturating_add(Weight::from_ref_time(96_434).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(96_434, 0).saturating_mul(i.into()))
}
/// Storage: Glutton TrashData (r:5000 w:0)
/// Proof: Glutton TrashData (max_values: Some(65000), max_size: Some(1036), added: 3016, mode: MaxEncodedLen)
@@ -249,12 +249,12 @@ impl WeightInfo for () {
// Measured: `119036 + i * (1053 ±0)`
// Estimated: `990 + i * (3016 ±0)`
// Minimum execution time: 630 nanoseconds.
Weight::from_ref_time(712_000)
.saturating_add(Weight::from_proof_size(990))
Weight::from_parts(712_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 4_326
.saturating_add(Weight::from_ref_time(5_500_880).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(5_500_880, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_proof_size(3016).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 3016).saturating_mul(i.into()))
}
/// Storage: Glutton Storage (r:1 w:0)
/// Proof: Glutton Storage (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -267,8 +267,8 @@ impl WeightInfo for () {
// Measured: `1954313`
// Estimated: `5242760`
// Minimum execution time: 56_743_236 nanoseconds.
Weight::from_ref_time(57_088_040_000)
.saturating_add(Weight::from_proof_size(5242760))
Weight::from_parts(57_088_040_000, 0)
.saturating_add(Weight::from_parts(0, 5242760))
.saturating_add(RocksDbWeight::get().reads(1739_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -282,8 +282,8 @@ impl WeightInfo for () {
// Measured: `9671`
// Estimated: `19048`
// Minimum execution time: 100_387_042 nanoseconds.
Weight::from_ref_time(100_987_577_000)
.saturating_add(Weight::from_proof_size(19048))
Weight::from_parts(100_987_577_000, 0)
.saturating_add(Weight::from_parts(0, 19048))
.saturating_add(RocksDbWeight::get().reads(7_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -295,8 +295,8 @@ impl WeightInfo for () {
// Measured: `4`
// Estimated: `2978`
// Minimum execution time: 4_256 nanoseconds.
Weight::from_ref_time(4_447_000)
.saturating_add(Weight::from_proof_size(2978))
Weight::from_parts(4_447_000, 0)
.saturating_add(Weight::from_parts(0, 2978))
.saturating_add(RocksDbWeight::get().reads(2_u64))
}
/// Storage: Glutton Compute (r:0 w:1)
@@ -306,8 +306,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_663 nanoseconds.
Weight::from_ref_time(8_864_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(8_864_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Glutton Storage (r:0 w:1)
@@ -317,8 +317,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_653 nanoseconds.
Weight::from_ref_time(8_998_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(8_998_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
@@ -34,18 +34,19 @@ impl crate::WeightInfo for () {
const MAX_NOMINATORS: u64 = 200;
// checking membership proof
Weight::from_ref_time(35u64 * WEIGHT_REF_TIME_PER_MICROS)
Weight::from_parts(35u64 * WEIGHT_REF_TIME_PER_MICROS, 0)
.saturating_add(
Weight::from_ref_time(175u64 * WEIGHT_REF_TIME_PER_NANOS)
Weight::from_parts(175u64 * WEIGHT_REF_TIME_PER_NANOS, 0)
.saturating_mul(validator_count),
)
.saturating_add(DbWeight::get().reads(5))
// check equivocation proof
.saturating_add(Weight::from_ref_time(95u64 * WEIGHT_REF_TIME_PER_MICROS))
.saturating_add(Weight::from_parts(95u64 * WEIGHT_REF_TIME_PER_MICROS, 0))
// report offence
.saturating_add(Weight::from_ref_time(110u64 * WEIGHT_REF_TIME_PER_MICROS))
.saturating_add(Weight::from_ref_time(
.saturating_add(Weight::from_parts(110u64 * WEIGHT_REF_TIME_PER_MICROS, 0))
.saturating_add(Weight::from_parts(
25u64 * WEIGHT_REF_TIME_PER_MICROS * MAX_NOMINATORS,
0,
))
.saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS))
.saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS))
@@ -54,7 +55,7 @@ impl crate::WeightInfo for () {
}
fn note_stalled() -> Weight {
Weight::from_ref_time(3u64 * WEIGHT_REF_TIME_PER_MICROS)
Weight::from_parts(3u64 * WEIGHT_REF_TIME_PER_MICROS, 0)
.saturating_add(DbWeight::get().writes(1))
}
}
+50 -50
View File
@@ -79,7 +79,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 10_964 nanoseconds.
Weight::from_parts(11_800_935, 1636)
// Standard Error: 1_334
.saturating_add(Weight::from_ref_time(96_038).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(96_038, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -94,9 +94,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 26_400 nanoseconds.
Weight::from_parts(26_060_549, 10013)
// Standard Error: 1_561
.saturating_add(Weight::from_ref_time(72_083).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(72_083, 0).saturating_mul(r.into()))
// Standard Error: 304
.saturating_add(Weight::from_ref_time(306_994).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(306_994, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -114,12 +114,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 8_492 nanoseconds.
Weight::from_parts(21_645_924, 15746)
// Standard Error: 3_452
.saturating_add(Weight::from_ref_time(2_442_604).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(2_442_604, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(2589).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
}
/// Storage: Identity IdentityOf (r:1 w:0)
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
@@ -135,7 +135,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 8_488 nanoseconds.
Weight::from_parts(20_202_601, 15746)
// Standard Error: 2_834
.saturating_add(Weight::from_ref_time(1_082_941).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(1_082_941, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
@@ -156,11 +156,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 41_319 nanoseconds.
Weight::from_parts(25_850_055, 15746)
// Standard Error: 4_144
.saturating_add(Weight::from_ref_time(59_619).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(59_619, 0).saturating_mul(r.into()))
// Standard Error: 809
.saturating_add(Weight::from_ref_time(1_076_550).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_076_550, 0).saturating_mul(s.into()))
// Standard Error: 809
.saturating_add(Weight::from_ref_time(163_191).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(163_191, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -178,9 +178,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_118 nanoseconds.
Weight::from_parts(27_359_471, 11649)
// Standard Error: 2_707
.saturating_add(Weight::from_ref_time(107_279).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(107_279, 0).saturating_mul(r.into()))
// Standard Error: 528
.saturating_add(Weight::from_ref_time(325_165).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(325_165, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -195,9 +195,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 24_817 nanoseconds.
Weight::from_parts(24_749_808, 10013)
// Standard Error: 1_938
.saturating_add(Weight::from_ref_time(63_396).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(63_396, 0).saturating_mul(r.into()))
// Standard Error: 378
.saturating_add(Weight::from_ref_time(327_083).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(327_083, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -211,7 +211,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 6_664 nanoseconds.
Weight::from_parts(7_286_307, 1636)
// Standard Error: 1_560
.saturating_add(Weight::from_ref_time(96_416).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(96_416, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -225,7 +225,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 7_054 nanoseconds.
Weight::from_parts(7_382_954, 1636)
// Standard Error: 1_621
.saturating_add(Weight::from_ref_time(101_595).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(101_595, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -239,7 +239,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 6_659 nanoseconds.
Weight::from_parts(7_188_883, 1636)
// Standard Error: 1_377
.saturating_add(Weight::from_ref_time(98_965).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(98_965, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -256,9 +256,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 21_567 nanoseconds.
Weight::from_parts(21_015_310, 11649)
// Standard Error: 2_516
.saturating_add(Weight::from_ref_time(123_992).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(123_992, 0).saturating_mul(r.into()))
// Standard Error: 465
.saturating_add(Weight::from_ref_time(552_116).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(552_116, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -280,11 +280,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 52_881 nanoseconds.
Weight::from_parts(38_504_388, 18349)
// Standard Error: 3_909
.saturating_add(Weight::from_ref_time(51_452).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(51_452, 0).saturating_mul(r.into()))
// Standard Error: 763
.saturating_add(Weight::from_ref_time(1_069_924).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_069_924, 0).saturating_mul(s.into()))
// Standard Error: 763
.saturating_add(Weight::from_ref_time(164_906).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(164_906, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -303,7 +303,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 24_556 nanoseconds.
Weight::from_parts(28_641_160, 18335)
// Standard Error: 1_327
.saturating_add(Weight::from_ref_time(66_150).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(66_150, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -319,7 +319,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 11_347 nanoseconds.
Weight::from_parts(13_299_367, 12602)
// Standard Error: 525
.saturating_add(Weight::from_ref_time(16_472).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(16_472, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -337,7 +337,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_810 nanoseconds.
Weight::from_parts(30_347_763, 18335)
// Standard Error: 928
.saturating_add(Weight::from_ref_time(55_342).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(55_342, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -353,7 +353,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_601 nanoseconds.
Weight::from_parts(19_794_971, 8322)
// Standard Error: 934
.saturating_add(Weight::from_ref_time(59_289).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(59_289, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -371,7 +371,7 @@ impl WeightInfo for () {
// Minimum execution time: 10_964 nanoseconds.
Weight::from_parts(11_800_935, 1636)
// Standard Error: 1_334
.saturating_add(Weight::from_ref_time(96_038).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(96_038, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -386,9 +386,9 @@ impl WeightInfo for () {
// Minimum execution time: 26_400 nanoseconds.
Weight::from_parts(26_060_549, 10013)
// Standard Error: 1_561
.saturating_add(Weight::from_ref_time(72_083).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(72_083, 0).saturating_mul(r.into()))
// Standard Error: 304
.saturating_add(Weight::from_ref_time(306_994).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(306_994, 0).saturating_mul(x.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -406,12 +406,12 @@ impl WeightInfo for () {
// Minimum execution time: 8_492 nanoseconds.
Weight::from_parts(21_645_924, 15746)
// Standard Error: 3_452
.saturating_add(Weight::from_ref_time(2_442_604).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(2_442_604, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(s.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(2589).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
}
/// Storage: Identity IdentityOf (r:1 w:0)
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen)
@@ -427,7 +427,7 @@ impl WeightInfo for () {
// Minimum execution time: 8_488 nanoseconds.
Weight::from_parts(20_202_601, 15746)
// Standard Error: 2_834
.saturating_add(Weight::from_ref_time(1_082_941).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(1_082_941, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into())))
@@ -448,11 +448,11 @@ impl WeightInfo for () {
// Minimum execution time: 41_319 nanoseconds.
Weight::from_parts(25_850_055, 15746)
// Standard Error: 4_144
.saturating_add(Weight::from_ref_time(59_619).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(59_619, 0).saturating_mul(r.into()))
// Standard Error: 809
.saturating_add(Weight::from_ref_time(1_076_550).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_076_550, 0).saturating_mul(s.into()))
// Standard Error: 809
.saturating_add(Weight::from_ref_time(163_191).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(163_191, 0).saturating_mul(x.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -470,9 +470,9 @@ impl WeightInfo for () {
// Minimum execution time: 28_118 nanoseconds.
Weight::from_parts(27_359_471, 11649)
// Standard Error: 2_707
.saturating_add(Weight::from_ref_time(107_279).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(107_279, 0).saturating_mul(r.into()))
// Standard Error: 528
.saturating_add(Weight::from_ref_time(325_165).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(325_165, 0).saturating_mul(x.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -487,9 +487,9 @@ impl WeightInfo for () {
// Minimum execution time: 24_817 nanoseconds.
Weight::from_parts(24_749_808, 10013)
// Standard Error: 1_938
.saturating_add(Weight::from_ref_time(63_396).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(63_396, 0).saturating_mul(r.into()))
// Standard Error: 378
.saturating_add(Weight::from_ref_time(327_083).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(327_083, 0).saturating_mul(x.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -503,7 +503,7 @@ impl WeightInfo for () {
// Minimum execution time: 6_664 nanoseconds.
Weight::from_parts(7_286_307, 1636)
// Standard Error: 1_560
.saturating_add(Weight::from_ref_time(96_416).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(96_416, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -517,7 +517,7 @@ impl WeightInfo for () {
// Minimum execution time: 7_054 nanoseconds.
Weight::from_parts(7_382_954, 1636)
// Standard Error: 1_621
.saturating_add(Weight::from_ref_time(101_595).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(101_595, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -531,7 +531,7 @@ impl WeightInfo for () {
// Minimum execution time: 6_659 nanoseconds.
Weight::from_parts(7_188_883, 1636)
// Standard Error: 1_377
.saturating_add(Weight::from_ref_time(98_965).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(98_965, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -548,9 +548,9 @@ impl WeightInfo for () {
// Minimum execution time: 21_567 nanoseconds.
Weight::from_parts(21_015_310, 11649)
// Standard Error: 2_516
.saturating_add(Weight::from_ref_time(123_992).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(123_992, 0).saturating_mul(r.into()))
// Standard Error: 465
.saturating_add(Weight::from_ref_time(552_116).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(552_116, 0).saturating_mul(x.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -572,11 +572,11 @@ impl WeightInfo for () {
// Minimum execution time: 52_881 nanoseconds.
Weight::from_parts(38_504_388, 18349)
// Standard Error: 3_909
.saturating_add(Weight::from_ref_time(51_452).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(51_452, 0).saturating_mul(r.into()))
// Standard Error: 763
.saturating_add(Weight::from_ref_time(1_069_924).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_069_924, 0).saturating_mul(s.into()))
// Standard Error: 763
.saturating_add(Weight::from_ref_time(164_906).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(164_906, 0).saturating_mul(x.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
@@ -595,7 +595,7 @@ impl WeightInfo for () {
// Minimum execution time: 24_556 nanoseconds.
Weight::from_parts(28_641_160, 18335)
// Standard Error: 1_327
.saturating_add(Weight::from_ref_time(66_150).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(66_150, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -611,7 +611,7 @@ impl WeightInfo for () {
// Minimum execution time: 11_347 nanoseconds.
Weight::from_parts(13_299_367, 12602)
// Standard Error: 525
.saturating_add(Weight::from_ref_time(16_472).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(16_472, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -629,7 +629,7 @@ impl WeightInfo for () {
// Minimum execution time: 27_810 nanoseconds.
Weight::from_parts(30_347_763, 18335)
// Standard Error: 928
.saturating_add(Weight::from_ref_time(55_342).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(55_342, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -645,7 +645,7 @@ impl WeightInfo for () {
// Minimum execution time: 17_601 nanoseconds.
Weight::from_parts(19_794_971, 8322)
// Standard Error: 934
.saturating_add(Weight::from_ref_time(59_289).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(59_289, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
+8 -8
View File
@@ -73,13 +73,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 91_116 nanoseconds.
Weight::from_parts(72_526_877, 10345712)
// Standard Error: 95
.saturating_add(Weight::from_ref_time(20_461).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(20_461, 0).saturating_mul(k.into()))
// Standard Error: 967
.saturating_add(Weight::from_ref_time(307_869).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(307_869, 0).saturating_mul(e.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(25).saturating_mul(e.into()))
.saturating_add(Weight::from_proof_size(64).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(0, 25).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(k.into()))
}
}
@@ -104,12 +104,12 @@ impl WeightInfo for () {
// Minimum execution time: 91_116 nanoseconds.
Weight::from_parts(72_526_877, 10345712)
// Standard Error: 95
.saturating_add(Weight::from_ref_time(20_461).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(20_461, 0).saturating_mul(k.into()))
// Standard Error: 967
.saturating_add(Weight::from_ref_time(307_869).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(307_869, 0).saturating_mul(e.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(25).saturating_mul(e.into()))
.saturating_add(Weight::from_proof_size(64).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(0, 25).saturating_mul(e.into()))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(k.into()))
}
}
+4 -4
View File
@@ -90,9 +90,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_650 nanoseconds.
Weight::from_ref_time(8_344_960)
Weight::from_parts(8_344_960, 0)
// Standard Error: 2_629
.saturating_add(Weight::from_ref_time(268_557).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(268_557, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Lottery Lottery (r:1 w:1)
@@ -196,9 +196,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_650 nanoseconds.
Weight::from_ref_time(8_344_960)
Weight::from_parts(8_344_960, 0)
// Standard Error: 2_629
.saturating_add(Weight::from_ref_time(268_557).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(268_557, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Lottery Lottery (r:1 w:1)
+28 -28
View File
@@ -76,10 +76,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_673 nanoseconds.
Weight::from_parts(16_830_288, 4903)
// Standard Error: 570
.saturating_add(Weight::from_ref_time(41_959).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(41_959, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -99,10 +99,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 18_231 nanoseconds.
Weight::from_parts(19_081_297, 5742)
// Standard Error: 571
.saturating_add(Weight::from_ref_time(41_331).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(41_331, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -122,10 +122,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 18_517 nanoseconds.
Weight::from_parts(19_388_310, 5742)
// Standard Error: 625
.saturating_add(Weight::from_ref_time(51_422).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(51_422, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -145,10 +145,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_628 nanoseconds.
Weight::from_parts(19_258_882, 5742)
// Standard Error: 820
.saturating_add(Weight::from_ref_time(153_956).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(153_956, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -168,10 +168,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 19_031 nanoseconds.
Weight::from_parts(20_264_948, 5742)
// Standard Error: 707
.saturating_add(Weight::from_ref_time(51_060).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(51_060, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:0)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -187,10 +187,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 6_897 nanoseconds.
Weight::from_parts(7_455_387, 3761)
// Standard Error: 326
.saturating_add(Weight::from_ref_time(16_653).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(16_653, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(32).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Prime (r:0 w:1)
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
@@ -202,9 +202,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_400 nanoseconds.
Weight::from_ref_time(3_703_421)
Weight::from_parts(3_703_421, 0)
// Standard Error: 119
.saturating_add(Weight::from_ref_time(915).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(915, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
}
@@ -227,10 +227,10 @@ impl WeightInfo for () {
// Minimum execution time: 15_673 nanoseconds.
Weight::from_parts(16_830_288, 4903)
// Standard Error: 570
.saturating_add(Weight::from_ref_time(41_959).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(41_959, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -250,10 +250,10 @@ impl WeightInfo for () {
// Minimum execution time: 18_231 nanoseconds.
Weight::from_parts(19_081_297, 5742)
// Standard Error: 571
.saturating_add(Weight::from_ref_time(41_331).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(41_331, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -273,10 +273,10 @@ impl WeightInfo for () {
// Minimum execution time: 18_517 nanoseconds.
Weight::from_parts(19_388_310, 5742)
// Standard Error: 625
.saturating_add(Weight::from_ref_time(51_422).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(51_422, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -296,10 +296,10 @@ impl WeightInfo for () {
// Minimum execution time: 17_628 nanoseconds.
Weight::from_parts(19_258_882, 5742)
// Standard Error: 820
.saturating_add(Weight::from_ref_time(153_956).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(153_956, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:1)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -319,10 +319,10 @@ impl WeightInfo for () {
// Minimum execution time: 19_031 nanoseconds.
Weight::from_parts(20_264_948, 5742)
// Standard Error: 707
.saturating_add(Weight::from_ref_time(51_060).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(51_060, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Members (r:1 w:0)
/// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
@@ -338,10 +338,10 @@ impl WeightInfo for () {
// Minimum execution time: 6_897 nanoseconds.
Weight::from_parts(7_455_387, 3761)
// Standard Error: 326
.saturating_add(Weight::from_ref_time(16_653).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(16_653, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(32).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: TechnicalMembership Prime (r:0 w:1)
/// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
@@ -353,9 +353,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_400 nanoseconds.
Weight::from_ref_time(3_703_421)
Weight::from_parts(3_703_421, 0)
// Standard Error: 119
.saturating_add(Weight::from_ref_time(915).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(915, 0).saturating_mul(m.into()))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
}
@@ -28,7 +28,7 @@ impl crate::WeightInfo for () {
// Reading the parent hash.
let leaf_weight = DbWeight::get().reads(1);
// Blake2 hash cost.
let hash_weight = Weight::from_ref_time(2u64 * WEIGHT_REF_TIME_PER_NANOS);
let hash_weight = Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_NANOS, 0);
// No-op hook.
let hook_weight = Weight::zero();
+40 -40
View File
@@ -73,8 +73,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 12_538 nanoseconds.
Weight::from_ref_time(12_799_000)
.saturating_add(Weight::from_proof_size(7527))
Weight::from_parts(12_799_000, 0)
.saturating_add(Weight::from_parts(0, 7527))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -87,8 +87,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 11_727 nanoseconds.
Weight::from_ref_time(12_177_000)
.saturating_add(Weight::from_proof_size(7527))
Weight::from_parts(12_177_000, 0)
.saturating_add(Weight::from_parts(0, 7527))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -99,8 +99,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `42`
// Estimated: `3514`
// Minimum execution time: 4_983 nanoseconds.
Weight::from_ref_time(5_174_000)
.saturating_add(Weight::from_proof_size(3514))
Weight::from_parts(5_174_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -111,8 +111,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_299 nanoseconds.
Weight::from_ref_time(6_670_000)
.saturating_add(Weight::from_proof_size(69049))
Weight::from_parts(6_670_000, 0)
.saturating_add(Weight::from_parts(0, 69049))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -123,8 +123,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_762 nanoseconds.
Weight::from_ref_time(7_059_000)
.saturating_add(Weight::from_proof_size(69049))
Weight::from_parts(7_059_000, 0)
.saturating_add(Weight::from_parts(0, 69049))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -133,8 +133,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 72_681 nanoseconds.
Weight::from_ref_time(73_147_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(73_147_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: MessageQueue ServiceHead (r:1 w:1)
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -145,8 +145,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `172`
// Estimated: `5003`
// Minimum execution time: 7_066 nanoseconds.
Weight::from_ref_time(7_214_000)
.saturating_add(Weight::from_proof_size(5003))
Weight::from_parts(7_214_000, 0)
.saturating_add(Weight::from_parts(0, 5003))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -159,8 +159,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 57_778 nanoseconds.
Weight::from_ref_time(58_778_000)
.saturating_add(Weight::from_proof_size(72563))
Weight::from_parts(58_778_000, 0)
.saturating_add(Weight::from_parts(0, 72563))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -173,8 +173,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 72_144 nanoseconds.
Weight::from_ref_time(72_942_000)
.saturating_add(Weight::from_proof_size(72563))
Weight::from_parts(72_942_000, 0)
.saturating_add(Weight::from_parts(0, 72563))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -187,8 +187,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 84_890 nanoseconds.
Weight::from_ref_time(86_073_000)
.saturating_add(Weight::from_proof_size(72563))
Weight::from_parts(86_073_000, 0)
.saturating_add(Weight::from_parts(0, 72563))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -205,8 +205,8 @@ impl WeightInfo for () {
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 12_538 nanoseconds.
Weight::from_ref_time(12_799_000)
.saturating_add(Weight::from_proof_size(7527))
Weight::from_parts(12_799_000, 0)
.saturating_add(Weight::from_parts(0, 7527))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -219,8 +219,8 @@ impl WeightInfo for () {
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 11_727 nanoseconds.
Weight::from_ref_time(12_177_000)
.saturating_add(Weight::from_proof_size(7527))
Weight::from_parts(12_177_000, 0)
.saturating_add(Weight::from_parts(0, 7527))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -231,8 +231,8 @@ impl WeightInfo for () {
// Measured: `42`
// Estimated: `3514`
// Minimum execution time: 4_983 nanoseconds.
Weight::from_ref_time(5_174_000)
.saturating_add(Weight::from_proof_size(3514))
Weight::from_parts(5_174_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -243,8 +243,8 @@ impl WeightInfo for () {
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_299 nanoseconds.
Weight::from_ref_time(6_670_000)
.saturating_add(Weight::from_proof_size(69049))
Weight::from_parts(6_670_000, 0)
.saturating_add(Weight::from_parts(0, 69049))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -255,8 +255,8 @@ impl WeightInfo for () {
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_762 nanoseconds.
Weight::from_ref_time(7_059_000)
.saturating_add(Weight::from_proof_size(69049))
Weight::from_parts(7_059_000, 0)
.saturating_add(Weight::from_parts(0, 69049))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -265,8 +265,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 72_681 nanoseconds.
Weight::from_ref_time(73_147_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(73_147_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: MessageQueue ServiceHead (r:1 w:1)
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -277,8 +277,8 @@ impl WeightInfo for () {
// Measured: `172`
// Estimated: `5003`
// Minimum execution time: 7_066 nanoseconds.
Weight::from_ref_time(7_214_000)
.saturating_add(Weight::from_proof_size(5003))
Weight::from_parts(7_214_000, 0)
.saturating_add(Weight::from_parts(0, 5003))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -291,8 +291,8 @@ impl WeightInfo for () {
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 57_778 nanoseconds.
Weight::from_ref_time(58_778_000)
.saturating_add(Weight::from_proof_size(72563))
Weight::from_parts(58_778_000, 0)
.saturating_add(Weight::from_parts(0, 72563))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -305,8 +305,8 @@ impl WeightInfo for () {
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 72_144 nanoseconds.
Weight::from_ref_time(72_942_000)
.saturating_add(Weight::from_proof_size(72563))
Weight::from_parts(72_942_000, 0)
.saturating_add(Weight::from_parts(0, 72563))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -319,8 +319,8 @@ impl WeightInfo for () {
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 84_890 nanoseconds.
Weight::from_ref_time(86_073_000)
.saturating_add(Weight::from_proof_size(72563))
Weight::from_parts(86_073_000, 0)
.saturating_add(Weight::from_parts(0, 72563))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
+22 -22
View File
@@ -66,9 +66,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 12_086 nanoseconds.
Weight::from_ref_time(12_464_828)
Weight::from_parts(12_464_828, 0)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(494).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(494, 0).saturating_mul(z.into()))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
@@ -81,9 +81,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 35_377 nanoseconds.
Weight::from_parts(29_088_956, 5821)
// Standard Error: 335
.saturating_add(Weight::from_ref_time(67_846).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(67_846, 0).saturating_mul(s.into()))
// Standard Error: 3
.saturating_add(Weight::from_ref_time(1_523).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(1_523, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -98,9 +98,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 26_138 nanoseconds.
Weight::from_parts(20_479_380, 5821)
// Standard Error: 259
.saturating_add(Weight::from_ref_time(64_116).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(64_116, 0).saturating_mul(s.into()))
// Standard Error: 2
.saturating_add(Weight::from_ref_time(1_520).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(1_520, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -117,9 +117,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 40_323 nanoseconds.
Weight::from_parts(32_311_615, 8424)
// Standard Error: 401
.saturating_add(Weight::from_ref_time(85_999).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(85_999, 0).saturating_mul(s.into()))
// Standard Error: 3
.saturating_add(Weight::from_ref_time(1_534).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(1_534, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -133,7 +133,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 26_938 nanoseconds.
Weight::from_parts(27_802_216, 5821)
// Standard Error: 342
.saturating_add(Weight::from_ref_time(69_282).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(69_282, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -147,7 +147,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 18_050 nanoseconds.
Weight::from_parts(19_095_404, 5821)
// Standard Error: 419
.saturating_add(Weight::from_ref_time(66_914).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(66_914, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -161,7 +161,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_508 nanoseconds.
Weight::from_parts(28_702_686, 5821)
// Standard Error: 466
.saturating_add(Weight::from_ref_time(69_419).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(69_419, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -175,9 +175,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 12_086 nanoseconds.
Weight::from_ref_time(12_464_828)
Weight::from_parts(12_464_828, 0)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(494).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(494, 0).saturating_mul(z.into()))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
@@ -190,9 +190,9 @@ impl WeightInfo for () {
// Minimum execution time: 35_377 nanoseconds.
Weight::from_parts(29_088_956, 5821)
// Standard Error: 335
.saturating_add(Weight::from_ref_time(67_846).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(67_846, 0).saturating_mul(s.into()))
// Standard Error: 3
.saturating_add(Weight::from_ref_time(1_523).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(1_523, 0).saturating_mul(z.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -207,9 +207,9 @@ impl WeightInfo for () {
// Minimum execution time: 26_138 nanoseconds.
Weight::from_parts(20_479_380, 5821)
// Standard Error: 259
.saturating_add(Weight::from_ref_time(64_116).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(64_116, 0).saturating_mul(s.into()))
// Standard Error: 2
.saturating_add(Weight::from_ref_time(1_520).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(1_520, 0).saturating_mul(z.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -226,9 +226,9 @@ impl WeightInfo for () {
// Minimum execution time: 40_323 nanoseconds.
Weight::from_parts(32_311_615, 8424)
// Standard Error: 401
.saturating_add(Weight::from_ref_time(85_999).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(85_999, 0).saturating_mul(s.into()))
// Standard Error: 3
.saturating_add(Weight::from_ref_time(1_534).saturating_mul(z.into()))
.saturating_add(Weight::from_parts(1_534, 0).saturating_mul(z.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -242,7 +242,7 @@ impl WeightInfo for () {
// Minimum execution time: 26_938 nanoseconds.
Weight::from_parts(27_802_216, 5821)
// Standard Error: 342
.saturating_add(Weight::from_ref_time(69_282).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(69_282, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -256,7 +256,7 @@ impl WeightInfo for () {
// Minimum execution time: 18_050 nanoseconds.
Weight::from_parts(19_095_404, 5821)
// Standard Error: 419
.saturating_add(Weight::from_ref_time(66_914).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(66_914, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -270,7 +270,7 @@ impl WeightInfo for () {
// Minimum execution time: 27_508 nanoseconds.
Weight::from_parts(28_702_686, 5821)
// Standard Error: 466
.saturating_add(Weight::from_ref_time(69_419).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(69_419, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
+182 -182
View File
@@ -108,8 +108,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `214`
// Estimated: `3054`
// Minimum execution time: 33_769 nanoseconds.
Weight::from_ref_time(36_031_000)
.saturating_add(Weight::from_proof_size(3054))
Weight::from_parts(36_031_000, 0)
.saturating_add(Weight::from_parts(0, 3054))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -128,8 +128,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `42`
// Estimated: `3054`
// Minimum execution time: 21_767 nanoseconds.
Weight::from_ref_time(22_565_000)
.saturating_add(Weight::from_proof_size(3054))
Weight::from_parts(22_565_000, 0)
.saturating_add(Weight::from_parts(0, 3054))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -161,20 +161,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `172781 + m * (127 ±0) + a * (402 ±0)`
// Estimated: `3347427 + m * (2615 ±0) + a * (2921 ±0)`
// Minimum execution time: 26_973_627 nanoseconds.
Weight::from_ref_time(19_692_361_714)
.saturating_add(Weight::from_proof_size(3347427))
Weight::from_parts(19_692_361_714, 0)
.saturating_add(Weight::from_parts(0, 3347427))
// Standard Error: 17_036
.saturating_add(Weight::from_ref_time(7_797_219).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(7_797_219, 0).saturating_mul(m.into()))
// Standard Error: 17_036
.saturating_add(Weight::from_ref_time(9_504_128).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(9_504_128, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(1004_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().writes(3005_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_proof_size(2615).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2615).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(a.into()))
}
/// Storage: Nfts CollectionConfigOf (r:1 w:0)
/// Proof: Nfts CollectionConfigOf (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
@@ -193,8 +193,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `448`
// Estimated: `13506`
// Minimum execution time: 44_837 nanoseconds.
Weight::from_ref_time(46_794_000)
.saturating_add(Weight::from_proof_size(13506))
Weight::from_parts(46_794_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -215,8 +215,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `448`
// Estimated: `13506`
// Minimum execution time: 43_976 nanoseconds.
Weight::from_ref_time(44_831_000)
.saturating_add(Weight::from_proof_size(13506))
Weight::from_parts(44_831_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -243,8 +243,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `647`
// Estimated: `13573`
// Minimum execution time: 48_233 nanoseconds.
Weight::from_ref_time(50_113_000)
.saturating_add(Weight::from_proof_size(13573))
Weight::from_parts(50_113_000, 0)
.saturating_add(Weight::from_parts(0, 13573))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
@@ -271,8 +271,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `882`
// Estimated: `16109`
// Minimum execution time: 55_452 nanoseconds.
Weight::from_ref_time(57_642_000)
.saturating_add(Weight::from_proof_size(16109))
Weight::from_parts(57_642_000, 0)
.saturating_add(Weight::from_parts(0, 16109))
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -288,14 +288,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `756 + i * (140 ±0)`
// Estimated: `5103 + i * (3336 ±0)`
// Minimum execution time: 15_598 nanoseconds.
Weight::from_ref_time(15_926_000)
.saturating_add(Weight::from_proof_size(5103))
Weight::from_parts(15_926_000, 0)
.saturating_add(Weight::from_parts(0, 5103))
// Standard Error: 13_692
.saturating_add(Weight::from_ref_time(14_040_741).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(14_040_741, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_proof_size(3336).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 3336).saturating_mul(i.into()))
}
/// Storage: Nfts CollectionRoleOf (r:1 w:0)
/// Proof: Nfts CollectionRoleOf (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen)
@@ -306,8 +306,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `401`
// Estimated: `5067`
// Minimum execution time: 19_686 nanoseconds.
Weight::from_ref_time(20_404_000)
.saturating_add(Weight::from_proof_size(5067))
Weight::from_parts(20_404_000, 0)
.saturating_add(Weight::from_parts(0, 5067))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -320,8 +320,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `401`
// Estimated: `5067`
// Minimum execution time: 19_172 nanoseconds.
Weight::from_ref_time(20_151_000)
.saturating_add(Weight::from_proof_size(5067))
Weight::from_parts(20_151_000, 0)
.saturating_add(Weight::from_parts(0, 5067))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -334,8 +334,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `289`
// Estimated: `5092`
// Minimum execution time: 17_063 nanoseconds.
Weight::from_ref_time(17_482_000)
.saturating_add(Weight::from_proof_size(5092))
Weight::from_parts(17_482_000, 0)
.saturating_add(Weight::from_parts(0, 5092))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -350,8 +350,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `381`
// Estimated: `5082`
// Minimum execution time: 21_974 nanoseconds.
Weight::from_ref_time(22_770_000)
.saturating_add(Weight::from_proof_size(5082))
Weight::from_parts(22_770_000, 0)
.saturating_add(Weight::from_parts(0, 5082))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -364,8 +364,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `362`
// Estimated: `2555`
// Minimum execution time: 24_341 nanoseconds.
Weight::from_ref_time(25_059_000)
.saturating_add(Weight::from_proof_size(2555))
Weight::from_parts(25_059_000, 0)
.saturating_add(Weight::from_parts(0, 2555))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -378,8 +378,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `304`
// Estimated: `2555`
// Minimum execution time: 16_897 nanoseconds.
Weight::from_ref_time(17_560_000)
.saturating_add(Weight::from_proof_size(2555))
Weight::from_parts(17_560_000, 0)
.saturating_add(Weight::from_parts(0, 2555))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -392,8 +392,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `242`
// Estimated: `2555`
// Minimum execution time: 13_239 nanoseconds.
Weight::from_ref_time(13_963_000)
.saturating_add(Weight::from_proof_size(2555))
Weight::from_parts(13_963_000, 0)
.saturating_add(Weight::from_parts(0, 2555))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -406,8 +406,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `445`
// Estimated: `5078`
// Minimum execution time: 17_187 nanoseconds.
Weight::from_ref_time(17_942_000)
.saturating_add(Weight::from_proof_size(5078))
Weight::from_parts(17_942_000, 0)
.saturating_add(Weight::from_parts(0, 5078))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -424,8 +424,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `474`
// Estimated: `10547`
// Minimum execution time: 40_925 nanoseconds.
Weight::from_ref_time(42_733_000)
.saturating_add(Weight::from_proof_size(10547))
Weight::from_parts(42_733_000, 0)
.saturating_add(Weight::from_parts(0, 10547))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -438,8 +438,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `337`
// Estimated: `5476`
// Minimum execution time: 24_486 nanoseconds.
Weight::from_ref_time(25_409_000)
.saturating_add(Weight::from_proof_size(5476))
Weight::from_parts(25_409_000, 0)
.saturating_add(Weight::from_parts(0, 5476))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -454,8 +454,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `916`
// Estimated: `7999`
// Minimum execution time: 36_643 nanoseconds.
Weight::from_ref_time(37_805_000)
.saturating_add(Weight::from_proof_size(7999))
Weight::from_parts(37_805_000, 0)
.saturating_add(Weight::from_parts(0, 7999))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -468,8 +468,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `379`
// Estimated: `6492`
// Minimum execution time: 16_798 nanoseconds.
Weight::from_ref_time(17_326_000)
.saturating_add(Weight::from_proof_size(6492))
Weight::from_parts(17_326_000, 0)
.saturating_add(Weight::from_parts(0, 6492))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -487,15 +487,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `899 + n * (396 ±0)`
// Estimated: `12016 + n * (2921 ±0)`
// Minimum execution time: 25_524 nanoseconds.
Weight::from_ref_time(26_107_000)
.saturating_add(Weight::from_proof_size(12016))
Weight::from_parts(26_107_000, 0)
.saturating_add(Weight::from_parts(0, 12016))
// Standard Error: 5_460
.saturating_add(Weight::from_ref_time(9_030_830).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(9_030_830, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into()))
}
/// Storage: Nfts Collection (r:1 w:1)
/// Proof: Nfts Collection (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
@@ -510,8 +510,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `474`
// Estimated: `10241`
// Minimum execution time: 34_400 nanoseconds.
Weight::from_ref_time(35_469_000)
.saturating_add(Weight::from_proof_size(10241))
Weight::from_parts(35_469_000, 0)
.saturating_add(Weight::from_parts(0, 10241))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -526,8 +526,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `609`
// Estimated: `7693`
// Minimum execution time: 31_560 nanoseconds.
Weight::from_ref_time(33_081_000)
.saturating_add(Weight::from_proof_size(7693))
Weight::from_parts(33_081_000, 0)
.saturating_add(Weight::from_parts(0, 7693))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -542,8 +542,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `333`
// Estimated: `7665`
// Minimum execution time: 28_821 nanoseconds.
Weight::from_ref_time(30_010_000)
.saturating_add(Weight::from_proof_size(7665))
Weight::from_parts(30_010_000, 0)
.saturating_add(Weight::from_parts(0, 7665))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -558,8 +558,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `476`
// Estimated: `7665`
// Minimum execution time: 27_608 nanoseconds.
Weight::from_ref_time(28_766_000)
.saturating_add(Weight::from_proof_size(7665))
Weight::from_parts(28_766_000, 0)
.saturating_add(Weight::from_parts(0, 7665))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -574,8 +574,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `466`
// Estimated: `8428`
// Minimum execution time: 23_987 nanoseconds.
Weight::from_ref_time(24_819_000)
.saturating_add(Weight::from_proof_size(8428))
Weight::from_parts(24_819_000, 0)
.saturating_add(Weight::from_parts(0, 8428))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -588,8 +588,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `474`
// Estimated: `5880`
// Minimum execution time: 21_254 nanoseconds.
Weight::from_ref_time(21_826_000)
.saturating_add(Weight::from_proof_size(5880))
Weight::from_parts(21_826_000, 0)
.saturating_add(Weight::from_parts(0, 5880))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -602,8 +602,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `474`
// Estimated: `5880`
// Minimum execution time: 20_272 nanoseconds.
Weight::from_ref_time(20_922_000)
.saturating_add(Weight::from_proof_size(5880))
Weight::from_parts(20_922_000, 0)
.saturating_add(Weight::from_parts(0, 5880))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -614,8 +614,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `42`
// Estimated: `2527`
// Minimum execution time: 14_287 nanoseconds.
Weight::from_ref_time(14_960_000)
.saturating_add(Weight::from_proof_size(2527))
Weight::from_parts(14_960_000, 0)
.saturating_add(Weight::from_parts(0, 2527))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -628,8 +628,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `333`
// Estimated: `5103`
// Minimum execution time: 17_948 nanoseconds.
Weight::from_ref_time(18_780_000)
.saturating_add(Weight::from_proof_size(5103))
Weight::from_parts(18_780_000, 0)
.saturating_add(Weight::from_parts(0, 5103))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -642,8 +642,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `333`
// Estimated: `5103`
// Minimum execution time: 16_616 nanoseconds.
Weight::from_ref_time(17_155_000)
.saturating_add(Weight::from_proof_size(5103))
Weight::from_parts(17_155_000, 0)
.saturating_add(Weight::from_parts(0, 5103))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -660,8 +660,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `516`
// Estimated: `8407`
// Minimum execution time: 22_777 nanoseconds.
Weight::from_ref_time(23_955_000)
.saturating_add(Weight::from_proof_size(8407))
Weight::from_parts(23_955_000, 0)
.saturating_add(Weight::from_parts(0, 8407))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -686,8 +686,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `934`
// Estimated: `16129`
// Minimum execution time: 61_131 nanoseconds.
Weight::from_ref_time(62_791_000)
.saturating_add(Weight::from_proof_size(16129))
Weight::from_parts(62_791_000, 0)
.saturating_add(Weight::from_parts(0, 16129))
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -697,10 +697,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_952 nanoseconds.
Weight::from_ref_time(3_975_700)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(3_975_700, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 11_254
.saturating_add(Weight::from_ref_time(3_501_698).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(3_501_698, 0).saturating_mul(n.into()))
}
/// Storage: Nfts Item (r:2 w:0)
/// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen)
@@ -711,8 +711,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `524`
// Estimated: `6672`
// Minimum execution time: 20_327 nanoseconds.
Weight::from_ref_time(21_714_000)
.saturating_add(Weight::from_proof_size(6672))
Weight::from_parts(21_714_000, 0)
.saturating_add(Weight::from_parts(0, 6672))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -725,8 +725,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `511`
// Estimated: `5882`
// Minimum execution time: 20_668 nanoseconds.
Weight::from_ref_time(21_416_000)
.saturating_add(Weight::from_proof_size(5882))
Weight::from_parts(21_416_000, 0)
.saturating_add(Weight::from_parts(0, 5882))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -751,8 +751,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1097`
// Estimated: `21970`
// Minimum execution time: 88_006 nanoseconds.
Weight::from_ref_time(90_390_000)
.saturating_add(Weight::from_proof_size(21970))
Weight::from_parts(90_390_000, 0)
.saturating_add(Weight::from_parts(0, 21970))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
}
@@ -778,15 +778,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `596`
// Estimated: `16180 + n * (2921 ±0)`
// Minimum execution time: 124_967 nanoseconds.
Weight::from_ref_time(131_602_642)
.saturating_add(Weight::from_proof_size(16180))
Weight::from_parts(131_602_642, 0)
.saturating_add(Weight::from_parts(0, 16180))
// Standard Error: 36_480
.saturating_add(Weight::from_ref_time(25_811_394).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(25_811_394, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into()))
}
/// Storage: Nfts Item (r:1 w:0)
/// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen)
@@ -806,15 +806,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `716`
// Estimated: `14198 + n * (2921 ±0)`
// Minimum execution time: 84_153 nanoseconds.
Weight::from_ref_time(96_401_623)
.saturating_add(Weight::from_proof_size(14198))
Weight::from_parts(96_401_623, 0)
.saturating_add(Weight::from_parts(0, 14198))
// Standard Error: 70_244
.saturating_add(Weight::from_ref_time(26_866_222).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(26_866_222, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into()))
}
}
@@ -835,8 +835,8 @@ impl WeightInfo for () {
// Measured: `214`
// Estimated: `3054`
// Minimum execution time: 33_769 nanoseconds.
Weight::from_ref_time(36_031_000)
.saturating_add(Weight::from_proof_size(3054))
Weight::from_parts(36_031_000, 0)
.saturating_add(Weight::from_parts(0, 3054))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -855,8 +855,8 @@ impl WeightInfo for () {
// Measured: `42`
// Estimated: `3054`
// Minimum execution time: 21_767 nanoseconds.
Weight::from_ref_time(22_565_000)
.saturating_add(Weight::from_proof_size(3054))
Weight::from_parts(22_565_000, 0)
.saturating_add(Weight::from_parts(0, 3054))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -888,20 +888,20 @@ impl WeightInfo for () {
// Measured: `172781 + m * (127 ±0) + a * (402 ±0)`
// Estimated: `3347427 + m * (2615 ±0) + a * (2921 ±0)`
// Minimum execution time: 26_973_627 nanoseconds.
Weight::from_ref_time(19_692_361_714)
.saturating_add(Weight::from_proof_size(3347427))
Weight::from_parts(19_692_361_714, 0)
.saturating_add(Weight::from_parts(0, 3347427))
// Standard Error: 17_036
.saturating_add(Weight::from_ref_time(7_797_219).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(7_797_219, 0).saturating_mul(m.into()))
// Standard Error: 17_036
.saturating_add(Weight::from_ref_time(9_504_128).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(9_504_128, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(1004_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(RocksDbWeight::get().writes(3005_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_proof_size(2615).saturating_mul(m.into()))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 2615).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(a.into()))
}
/// Storage: Nfts CollectionConfigOf (r:1 w:0)
/// Proof: Nfts CollectionConfigOf (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
@@ -920,8 +920,8 @@ impl WeightInfo for () {
// Measured: `448`
// Estimated: `13506`
// Minimum execution time: 44_837 nanoseconds.
Weight::from_ref_time(46_794_000)
.saturating_add(Weight::from_proof_size(13506))
Weight::from_parts(46_794_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -942,8 +942,8 @@ impl WeightInfo for () {
// Measured: `448`
// Estimated: `13506`
// Minimum execution time: 43_976 nanoseconds.
Weight::from_ref_time(44_831_000)
.saturating_add(Weight::from_proof_size(13506))
Weight::from_parts(44_831_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -970,8 +970,8 @@ impl WeightInfo for () {
// Measured: `647`
// Estimated: `13573`
// Minimum execution time: 48_233 nanoseconds.
Weight::from_ref_time(50_113_000)
.saturating_add(Weight::from_proof_size(13573))
Weight::from_parts(50_113_000, 0)
.saturating_add(Weight::from_parts(0, 13573))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
@@ -998,8 +998,8 @@ impl WeightInfo for () {
// Measured: `882`
// Estimated: `16109`
// Minimum execution time: 55_452 nanoseconds.
Weight::from_ref_time(57_642_000)
.saturating_add(Weight::from_proof_size(16109))
Weight::from_parts(57_642_000, 0)
.saturating_add(Weight::from_parts(0, 16109))
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
@@ -1015,14 +1015,14 @@ impl WeightInfo for () {
// Measured: `756 + i * (140 ±0)`
// Estimated: `5103 + i * (3336 ±0)`
// Minimum execution time: 15_598 nanoseconds.
Weight::from_ref_time(15_926_000)
.saturating_add(Weight::from_proof_size(5103))
Weight::from_parts(15_926_000, 0)
.saturating_add(Weight::from_parts(0, 5103))
// Standard Error: 13_692
.saturating_add(Weight::from_ref_time(14_040_741).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(14_040_741, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_proof_size(3336).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 3336).saturating_mul(i.into()))
}
/// Storage: Nfts CollectionRoleOf (r:1 w:0)
/// Proof: Nfts CollectionRoleOf (max_values: None, max_size: Some(69), added: 2544, mode: MaxEncodedLen)
@@ -1033,8 +1033,8 @@ impl WeightInfo for () {
// Measured: `401`
// Estimated: `5067`
// Minimum execution time: 19_686 nanoseconds.
Weight::from_ref_time(20_404_000)
.saturating_add(Weight::from_proof_size(5067))
Weight::from_parts(20_404_000, 0)
.saturating_add(Weight::from_parts(0, 5067))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1047,8 +1047,8 @@ impl WeightInfo for () {
// Measured: `401`
// Estimated: `5067`
// Minimum execution time: 19_172 nanoseconds.
Weight::from_ref_time(20_151_000)
.saturating_add(Weight::from_proof_size(5067))
Weight::from_parts(20_151_000, 0)
.saturating_add(Weight::from_parts(0, 5067))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1061,8 +1061,8 @@ impl WeightInfo for () {
// Measured: `289`
// Estimated: `5092`
// Minimum execution time: 17_063 nanoseconds.
Weight::from_ref_time(17_482_000)
.saturating_add(Weight::from_proof_size(5092))
Weight::from_parts(17_482_000, 0)
.saturating_add(Weight::from_parts(0, 5092))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1077,8 +1077,8 @@ impl WeightInfo for () {
// Measured: `381`
// Estimated: `5082`
// Minimum execution time: 21_974 nanoseconds.
Weight::from_ref_time(22_770_000)
.saturating_add(Weight::from_proof_size(5082))
Weight::from_parts(22_770_000, 0)
.saturating_add(Weight::from_parts(0, 5082))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -1091,8 +1091,8 @@ impl WeightInfo for () {
// Measured: `362`
// Estimated: `2555`
// Minimum execution time: 24_341 nanoseconds.
Weight::from_ref_time(25_059_000)
.saturating_add(Weight::from_proof_size(2555))
Weight::from_parts(25_059_000, 0)
.saturating_add(Weight::from_parts(0, 2555))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -1105,8 +1105,8 @@ impl WeightInfo for () {
// Measured: `304`
// Estimated: `2555`
// Minimum execution time: 16_897 nanoseconds.
Weight::from_ref_time(17_560_000)
.saturating_add(Weight::from_proof_size(2555))
Weight::from_parts(17_560_000, 0)
.saturating_add(Weight::from_parts(0, 2555))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -1119,8 +1119,8 @@ impl WeightInfo for () {
// Measured: `242`
// Estimated: `2555`
// Minimum execution time: 13_239 nanoseconds.
Weight::from_ref_time(13_963_000)
.saturating_add(Weight::from_proof_size(2555))
Weight::from_parts(13_963_000, 0)
.saturating_add(Weight::from_parts(0, 2555))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1133,8 +1133,8 @@ impl WeightInfo for () {
// Measured: `445`
// Estimated: `5078`
// Minimum execution time: 17_187 nanoseconds.
Weight::from_ref_time(17_942_000)
.saturating_add(Weight::from_proof_size(5078))
Weight::from_parts(17_942_000, 0)
.saturating_add(Weight::from_parts(0, 5078))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1151,8 +1151,8 @@ impl WeightInfo for () {
// Measured: `474`
// Estimated: `10547`
// Minimum execution time: 40_925 nanoseconds.
Weight::from_ref_time(42_733_000)
.saturating_add(Weight::from_proof_size(10547))
Weight::from_parts(42_733_000, 0)
.saturating_add(Weight::from_parts(0, 10547))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1165,8 +1165,8 @@ impl WeightInfo for () {
// Measured: `337`
// Estimated: `5476`
// Minimum execution time: 24_486 nanoseconds.
Weight::from_ref_time(25_409_000)
.saturating_add(Weight::from_proof_size(5476))
Weight::from_parts(25_409_000, 0)
.saturating_add(Weight::from_parts(0, 5476))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1181,8 +1181,8 @@ impl WeightInfo for () {
// Measured: `916`
// Estimated: `7999`
// Minimum execution time: 36_643 nanoseconds.
Weight::from_ref_time(37_805_000)
.saturating_add(Weight::from_proof_size(7999))
Weight::from_parts(37_805_000, 0)
.saturating_add(Weight::from_parts(0, 7999))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1195,8 +1195,8 @@ impl WeightInfo for () {
// Measured: `379`
// Estimated: `6492`
// Minimum execution time: 16_798 nanoseconds.
Weight::from_ref_time(17_326_000)
.saturating_add(Weight::from_proof_size(6492))
Weight::from_parts(17_326_000, 0)
.saturating_add(Weight::from_parts(0, 6492))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1214,15 +1214,15 @@ impl WeightInfo for () {
// Measured: `899 + n * (396 ±0)`
// Estimated: `12016 + n * (2921 ±0)`
// Minimum execution time: 25_524 nanoseconds.
Weight::from_ref_time(26_107_000)
.saturating_add(Weight::from_proof_size(12016))
Weight::from_parts(26_107_000, 0)
.saturating_add(Weight::from_parts(0, 12016))
// Standard Error: 5_460
.saturating_add(Weight::from_ref_time(9_030_830).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(9_030_830, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into()))
}
/// Storage: Nfts Collection (r:1 w:1)
/// Proof: Nfts Collection (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
@@ -1237,8 +1237,8 @@ impl WeightInfo for () {
// Measured: `474`
// Estimated: `10241`
// Minimum execution time: 34_400 nanoseconds.
Weight::from_ref_time(35_469_000)
.saturating_add(Weight::from_proof_size(10241))
Weight::from_parts(35_469_000, 0)
.saturating_add(Weight::from_parts(0, 10241))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1253,8 +1253,8 @@ impl WeightInfo for () {
// Measured: `609`
// Estimated: `7693`
// Minimum execution time: 31_560 nanoseconds.
Weight::from_ref_time(33_081_000)
.saturating_add(Weight::from_proof_size(7693))
Weight::from_parts(33_081_000, 0)
.saturating_add(Weight::from_parts(0, 7693))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1269,8 +1269,8 @@ impl WeightInfo for () {
// Measured: `333`
// Estimated: `7665`
// Minimum execution time: 28_821 nanoseconds.
Weight::from_ref_time(30_010_000)
.saturating_add(Weight::from_proof_size(7665))
Weight::from_parts(30_010_000, 0)
.saturating_add(Weight::from_parts(0, 7665))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1285,8 +1285,8 @@ impl WeightInfo for () {
// Measured: `476`
// Estimated: `7665`
// Minimum execution time: 27_608 nanoseconds.
Weight::from_ref_time(28_766_000)
.saturating_add(Weight::from_proof_size(7665))
Weight::from_parts(28_766_000, 0)
.saturating_add(Weight::from_parts(0, 7665))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1301,8 +1301,8 @@ impl WeightInfo for () {
// Measured: `466`
// Estimated: `8428`
// Minimum execution time: 23_987 nanoseconds.
Weight::from_ref_time(24_819_000)
.saturating_add(Weight::from_proof_size(8428))
Weight::from_parts(24_819_000, 0)
.saturating_add(Weight::from_parts(0, 8428))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1315,8 +1315,8 @@ impl WeightInfo for () {
// Measured: `474`
// Estimated: `5880`
// Minimum execution time: 21_254 nanoseconds.
Weight::from_ref_time(21_826_000)
.saturating_add(Weight::from_proof_size(5880))
Weight::from_parts(21_826_000, 0)
.saturating_add(Weight::from_parts(0, 5880))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1329,8 +1329,8 @@ impl WeightInfo for () {
// Measured: `474`
// Estimated: `5880`
// Minimum execution time: 20_272 nanoseconds.
Weight::from_ref_time(20_922_000)
.saturating_add(Weight::from_proof_size(5880))
Weight::from_parts(20_922_000, 0)
.saturating_add(Weight::from_parts(0, 5880))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1341,8 +1341,8 @@ impl WeightInfo for () {
// Measured: `42`
// Estimated: `2527`
// Minimum execution time: 14_287 nanoseconds.
Weight::from_ref_time(14_960_000)
.saturating_add(Weight::from_proof_size(2527))
Weight::from_parts(14_960_000, 0)
.saturating_add(Weight::from_parts(0, 2527))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1355,8 +1355,8 @@ impl WeightInfo for () {
// Measured: `333`
// Estimated: `5103`
// Minimum execution time: 17_948 nanoseconds.
Weight::from_ref_time(18_780_000)
.saturating_add(Weight::from_proof_size(5103))
Weight::from_parts(18_780_000, 0)
.saturating_add(Weight::from_parts(0, 5103))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1369,8 +1369,8 @@ impl WeightInfo for () {
// Measured: `333`
// Estimated: `5103`
// Minimum execution time: 16_616 nanoseconds.
Weight::from_ref_time(17_155_000)
.saturating_add(Weight::from_proof_size(5103))
Weight::from_parts(17_155_000, 0)
.saturating_add(Weight::from_parts(0, 5103))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1387,8 +1387,8 @@ impl WeightInfo for () {
// Measured: `516`
// Estimated: `8407`
// Minimum execution time: 22_777 nanoseconds.
Weight::from_ref_time(23_955_000)
.saturating_add(Weight::from_proof_size(8407))
Weight::from_parts(23_955_000, 0)
.saturating_add(Weight::from_parts(0, 8407))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1413,8 +1413,8 @@ impl WeightInfo for () {
// Measured: `934`
// Estimated: `16129`
// Minimum execution time: 61_131 nanoseconds.
Weight::from_ref_time(62_791_000)
.saturating_add(Weight::from_proof_size(16129))
Weight::from_parts(62_791_000, 0)
.saturating_add(Weight::from_parts(0, 16129))
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
@@ -1424,10 +1424,10 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_952 nanoseconds.
Weight::from_ref_time(3_975_700)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(3_975_700, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 11_254
.saturating_add(Weight::from_ref_time(3_501_698).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(3_501_698, 0).saturating_mul(n.into()))
}
/// Storage: Nfts Item (r:2 w:0)
/// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen)
@@ -1438,8 +1438,8 @@ impl WeightInfo for () {
// Measured: `524`
// Estimated: `6672`
// Minimum execution time: 20_327 nanoseconds.
Weight::from_ref_time(21_714_000)
.saturating_add(Weight::from_proof_size(6672))
Weight::from_parts(21_714_000, 0)
.saturating_add(Weight::from_parts(0, 6672))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1452,8 +1452,8 @@ impl WeightInfo for () {
// Measured: `511`
// Estimated: `5882`
// Minimum execution time: 20_668 nanoseconds.
Weight::from_ref_time(21_416_000)
.saturating_add(Weight::from_proof_size(5882))
Weight::from_parts(21_416_000, 0)
.saturating_add(Weight::from_parts(0, 5882))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1478,8 +1478,8 @@ impl WeightInfo for () {
// Measured: `1097`
// Estimated: `21970`
// Minimum execution time: 88_006 nanoseconds.
Weight::from_ref_time(90_390_000)
.saturating_add(Weight::from_proof_size(21970))
Weight::from_parts(90_390_000, 0)
.saturating_add(Weight::from_parts(0, 21970))
.saturating_add(RocksDbWeight::get().reads(8_u64))
.saturating_add(RocksDbWeight::get().writes(11_u64))
}
@@ -1505,15 +1505,15 @@ impl WeightInfo for () {
// Measured: `596`
// Estimated: `16180 + n * (2921 ±0)`
// Minimum execution time: 124_967 nanoseconds.
Weight::from_ref_time(131_602_642)
.saturating_add(Weight::from_proof_size(16180))
Weight::from_parts(131_602_642, 0)
.saturating_add(Weight::from_parts(0, 16180))
// Standard Error: 36_480
.saturating_add(Weight::from_ref_time(25_811_394).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(25_811_394, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(6_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into()))
}
/// Storage: Nfts Item (r:1 w:0)
/// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen)
@@ -1533,14 +1533,14 @@ impl WeightInfo for () {
// Measured: `716`
// Estimated: `14198 + n * (2921 ±0)`
// Minimum execution time: 84_153 nanoseconds.
Weight::from_ref_time(96_401_623)
.saturating_add(Weight::from_proof_size(14198))
Weight::from_parts(96_401_623, 0)
.saturating_add(Weight::from_parts(0, 14198))
// Standard Error: 70_244
.saturating_add(Weight::from_ref_time(26_866_222).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(26_866_222, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2921).saturating_mul(n.into()))
}
}
+1 -1
View File
@@ -111,7 +111,7 @@ parameter_types! {
pub static Target: Perquintill = Perquintill::zero();
pub const MinReceipt: Perquintill = Perquintill::from_percent(1);
pub const ThawThrottle: (Perquintill, u64) = (Perquintill::from_percent(25), 5);
pub static MaxIntakeWeight: Weight = Weight::from_ref_time(2_000_000_000_000);
pub static MaxIntakeWeight: Weight = Weight::from_parts(2_000_000_000_000, 0);
pub const ReserveId: [u8; 8] = *b"py/nis ";
}
+6 -6
View File
@@ -78,7 +78,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_814 nanoseconds.
Weight::from_parts(35_245_917, 60718)
// Standard Error: 189
.saturating_add(Weight::from_ref_time(45_322).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(45_322, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -111,7 +111,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 34_426 nanoseconds.
Weight::from_parts(36_434_166, 60718)
// Standard Error: 135
.saturating_add(Weight::from_ref_time(33_923).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(33_923, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -239,7 +239,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_758 nanoseconds.
Weight::from_ref_time(6_911_000)
Weight::from_parts(6_911_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
@@ -260,7 +260,7 @@ impl WeightInfo for () {
// Minimum execution time: 28_814 nanoseconds.
Weight::from_parts(35_245_917, 60718)
// Standard Error: 189
.saturating_add(Weight::from_ref_time(45_322).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(45_322, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -293,7 +293,7 @@ impl WeightInfo for () {
// Minimum execution time: 34_426 nanoseconds.
Weight::from_parts(36_434_166, 60718)
// Standard Error: 135
.saturating_add(Weight::from_ref_time(33_923).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(33_923, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -421,7 +421,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_758 nanoseconds.
Weight::from_ref_time(6_911_000)
Weight::from_parts(6_911_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
@@ -37,13 +37,13 @@ pub trait WeightInfo {
}
impl WeightInfo for () {
fn add_well_known_node() -> Weight { Weight::from_ref_time(50_000_000) }
fn remove_well_known_node() -> Weight { Weight::from_ref_time(50_000_000) }
fn swap_well_known_node() -> Weight { Weight::from_ref_time(50_000_000) }
fn reset_well_known_nodes() -> Weight { Weight::from_ref_time(50_000_000) }
fn claim_node() -> Weight { Weight::from_ref_time(50_000_000) }
fn remove_claim() -> Weight { Weight::from_ref_time(50_000_000) }
fn transfer_node() -> Weight { Weight::from_ref_time(50_000_000) }
fn add_connections() -> Weight { Weight::from_ref_time(50_000_000) }
fn remove_connections() -> Weight { Weight::from_ref_time(50_000_000) }
fn add_well_known_node() -> Weight { Weight::from_parts(50_000_000, 0) }
fn remove_well_known_node() -> Weight { Weight::from_parts(50_000_000, 0) }
fn swap_well_known_node() -> Weight { Weight::from_parts(50_000_000, 0) }
fn reset_well_known_nodes() -> Weight { Weight::from_parts(50_000_000, 0) }
fn claim_node() -> Weight { Weight::from_parts(50_000_000, 0) }
fn remove_claim() -> Weight { Weight::from_parts(50_000_000, 0) }
fn transfer_node() -> Weight { Weight::from_parts(50_000_000, 0) }
fn add_connections() -> Weight { Weight::from_parts(50_000_000, 0) }
fn remove_connections() -> Weight { Weight::from_parts(50_000_000, 0) }
}
+74 -74
View File
@@ -101,8 +101,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `3573`
// Estimated: `37988`
// Minimum execution time: 169_857 nanoseconds.
Weight::from_ref_time(173_895_000)
.saturating_add(Weight::from_proof_size(37988))
Weight::from_parts(173_895_000, 0)
.saturating_add(Weight::from_parts(0, 37988))
.saturating_add(T::DbWeight::get().reads(17_u64))
.saturating_add(T::DbWeight::get().writes(12_u64))
}
@@ -129,8 +129,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `3615`
// Estimated: `38583`
// Minimum execution time: 167_372 nanoseconds.
Weight::from_ref_time(168_776_000)
.saturating_add(Weight::from_proof_size(38583))
Weight::from_parts(168_776_000, 0)
.saturating_add(Weight::from_parts(0, 38583))
.saturating_add(T::DbWeight::get().reads(14_u64))
.saturating_add(T::DbWeight::get().writes(12_u64))
}
@@ -159,8 +159,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `3680`
// Estimated: `41099`
// Minimum execution time: 186_346 nanoseconds.
Weight::from_ref_time(191_308_000)
.saturating_add(Weight::from_proof_size(41099))
Weight::from_parts(191_308_000, 0)
.saturating_add(Weight::from_parts(0, 41099))
.saturating_add(T::DbWeight::get().reads(15_u64))
.saturating_add(T::DbWeight::get().writes(13_u64))
}
@@ -179,8 +179,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1254`
// Estimated: `13005`
// Minimum execution time: 61_423 nanoseconds.
Weight::from_ref_time(63_219_000)
.saturating_add(Weight::from_proof_size(13005))
Weight::from_parts(63_219_000, 0)
.saturating_add(Weight::from_parts(0, 13005))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -219,8 +219,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `3858`
// Estimated: `67379`
// Minimum execution time: 174_532 nanoseconds.
Weight::from_ref_time(180_032_000)
.saturating_add(Weight::from_proof_size(67379))
Weight::from_parts(180_032_000, 0)
.saturating_add(Weight::from_parts(0, 67379))
.saturating_add(T::DbWeight::get().reads(18_u64))
.saturating_add(T::DbWeight::get().writes(14_u64))
}
@@ -240,10 +240,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1779`
// Estimated: `13025`
// Minimum execution time: 55_327 nanoseconds.
Weight::from_ref_time(58_947_746)
.saturating_add(Weight::from_proof_size(13025))
Weight::from_parts(58_947_746, 0)
.saturating_add(Weight::from_parts(0, 13025))
// Standard Error: 1_589
.saturating_add(Weight::from_ref_time(40_696).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(40_696, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -271,10 +271,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `2303`
// Estimated: `45696`
// Minimum execution time: 105_923 nanoseconds.
Weight::from_ref_time(110_572_476)
.saturating_add(Weight::from_proof_size(45696))
Weight::from_parts(110_572_476, 0)
.saturating_add(Weight::from_parts(0, 45696))
// Standard Error: 2_438
.saturating_add(Weight::from_ref_time(69_045).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(69_045, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
@@ -324,8 +324,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `2690`
// Estimated: `68812`
// Minimum execution time: 169_700 nanoseconds.
Weight::from_ref_time(178_693_541)
.saturating_add(Weight::from_proof_size(68812))
Weight::from_parts(178_693_541, 0)
.saturating_add(Weight::from_parts(0, 68812))
.saturating_add(T::DbWeight::get().reads(20_u64))
.saturating_add(T::DbWeight::get().writes(17_u64))
}
@@ -376,8 +376,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1321`
// Estimated: `31522`
// Minimum execution time: 145_976 nanoseconds.
Weight::from_ref_time(150_664_000)
.saturating_add(Weight::from_proof_size(31522))
Weight::from_parts(150_664_000, 0)
.saturating_add(Weight::from_parts(0, 31522))
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(15_u64))
}
@@ -411,14 +411,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1909`
// Estimated: `21998 + n * (2520 ±0)`
// Minimum execution time: 69_288 nanoseconds.
Weight::from_ref_time(71_075_293)
.saturating_add(Weight::from_proof_size(21998))
Weight::from_parts(71_075_293, 0)
.saturating_add(Weight::from_parts(0, 21998))
// Standard Error: 10_508
.saturating_add(Weight::from_ref_time(1_384_674).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_384_674, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(5_u64))
.saturating_add(Weight::from_proof_size(2520).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
}
/// Storage: NominationPools BondedPools (r:1 w:1)
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(164), added: 2639, mode: MaxEncodedLen)
@@ -431,8 +431,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `1498`
// Estimated: `8752`
// Minimum execution time: 36_410 nanoseconds.
Weight::from_ref_time(37_585_000)
.saturating_add(Weight::from_proof_size(8752))
Weight::from_parts(37_585_000, 0)
.saturating_add(Weight::from_parts(0, 8752))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -448,10 +448,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `559`
// Estimated: `5883`
// Minimum execution time: 14_322 nanoseconds.
Weight::from_ref_time(15_328_204)
.saturating_add(Weight::from_proof_size(5883))
Weight::from_parts(15_328_204, 0)
.saturating_add(Weight::from_parts(0, 5883))
// Standard Error: 161
.saturating_add(Weight::from_ref_time(1_406).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_406, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -470,8 +470,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_968 nanoseconds.
Weight::from_ref_time(6_245_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(6_245_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: NominationPools BondedPools (r:1 w:1)
@@ -481,8 +481,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `559`
// Estimated: `2639`
// Minimum execution time: 18_979 nanoseconds.
Weight::from_ref_time(19_795_000)
.saturating_add(Weight::from_proof_size(2639))
Weight::from_parts(19_795_000, 0)
.saturating_add(Weight::from_parts(0, 2639))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -509,8 +509,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `2136`
// Estimated: `20489`
// Minimum execution time: 68_145 nanoseconds.
Weight::from_ref_time(70_444_000)
.saturating_add(Weight::from_proof_size(20489))
Weight::from_parts(70_444_000, 0)
.saturating_add(Weight::from_parts(0, 20489))
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -523,8 +523,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `542`
// Estimated: `5228`
// Minimum execution time: 15_112 nanoseconds.
Weight::from_ref_time(15_897_000)
.saturating_add(Weight::from_proof_size(5228))
Weight::from_parts(15_897_000, 0)
.saturating_add(Weight::from_parts(0, 5228))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -563,8 +563,8 @@ impl WeightInfo for () {
// Measured: `3573`
// Estimated: `37988`
// Minimum execution time: 169_857 nanoseconds.
Weight::from_ref_time(173_895_000)
.saturating_add(Weight::from_proof_size(37988))
Weight::from_parts(173_895_000, 0)
.saturating_add(Weight::from_parts(0, 37988))
.saturating_add(RocksDbWeight::get().reads(17_u64))
.saturating_add(RocksDbWeight::get().writes(12_u64))
}
@@ -591,8 +591,8 @@ impl WeightInfo for () {
// Measured: `3615`
// Estimated: `38583`
// Minimum execution time: 167_372 nanoseconds.
Weight::from_ref_time(168_776_000)
.saturating_add(Weight::from_proof_size(38583))
Weight::from_parts(168_776_000, 0)
.saturating_add(Weight::from_parts(0, 38583))
.saturating_add(RocksDbWeight::get().reads(14_u64))
.saturating_add(RocksDbWeight::get().writes(12_u64))
}
@@ -621,8 +621,8 @@ impl WeightInfo for () {
// Measured: `3680`
// Estimated: `41099`
// Minimum execution time: 186_346 nanoseconds.
Weight::from_ref_time(191_308_000)
.saturating_add(Weight::from_proof_size(41099))
Weight::from_parts(191_308_000, 0)
.saturating_add(Weight::from_parts(0, 41099))
.saturating_add(RocksDbWeight::get().reads(15_u64))
.saturating_add(RocksDbWeight::get().writes(13_u64))
}
@@ -641,8 +641,8 @@ impl WeightInfo for () {
// Measured: `1254`
// Estimated: `13005`
// Minimum execution time: 61_423 nanoseconds.
Weight::from_ref_time(63_219_000)
.saturating_add(Weight::from_proof_size(13005))
Weight::from_parts(63_219_000, 0)
.saturating_add(Weight::from_parts(0, 13005))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -681,8 +681,8 @@ impl WeightInfo for () {
// Measured: `3858`
// Estimated: `67379`
// Minimum execution time: 174_532 nanoseconds.
Weight::from_ref_time(180_032_000)
.saturating_add(Weight::from_proof_size(67379))
Weight::from_parts(180_032_000, 0)
.saturating_add(Weight::from_parts(0, 67379))
.saturating_add(RocksDbWeight::get().reads(18_u64))
.saturating_add(RocksDbWeight::get().writes(14_u64))
}
@@ -702,10 +702,10 @@ impl WeightInfo for () {
// Measured: `1779`
// Estimated: `13025`
// Minimum execution time: 55_327 nanoseconds.
Weight::from_ref_time(58_947_746)
.saturating_add(Weight::from_proof_size(13025))
Weight::from_parts(58_947_746, 0)
.saturating_add(Weight::from_parts(0, 13025))
// Standard Error: 1_589
.saturating_add(Weight::from_ref_time(40_696).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(40_696, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -733,10 +733,10 @@ impl WeightInfo for () {
// Measured: `2303`
// Estimated: `45696`
// Minimum execution time: 105_923 nanoseconds.
Weight::from_ref_time(110_572_476)
.saturating_add(Weight::from_proof_size(45696))
Weight::from_parts(110_572_476, 0)
.saturating_add(Weight::from_parts(0, 45696))
// Standard Error: 2_438
.saturating_add(Weight::from_ref_time(69_045).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(69_045, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
@@ -786,8 +786,8 @@ impl WeightInfo for () {
// Measured: `2690`
// Estimated: `68812`
// Minimum execution time: 169_700 nanoseconds.
Weight::from_ref_time(178_693_541)
.saturating_add(Weight::from_proof_size(68812))
Weight::from_parts(178_693_541, 0)
.saturating_add(Weight::from_parts(0, 68812))
.saturating_add(RocksDbWeight::get().reads(20_u64))
.saturating_add(RocksDbWeight::get().writes(17_u64))
}
@@ -838,8 +838,8 @@ impl WeightInfo for () {
// Measured: `1321`
// Estimated: `31522`
// Minimum execution time: 145_976 nanoseconds.
Weight::from_ref_time(150_664_000)
.saturating_add(Weight::from_proof_size(31522))
Weight::from_parts(150_664_000, 0)
.saturating_add(Weight::from_parts(0, 31522))
.saturating_add(RocksDbWeight::get().reads(21_u64))
.saturating_add(RocksDbWeight::get().writes(15_u64))
}
@@ -873,14 +873,14 @@ impl WeightInfo for () {
// Measured: `1909`
// Estimated: `21998 + n * (2520 ±0)`
// Minimum execution time: 69_288 nanoseconds.
Weight::from_ref_time(71_075_293)
.saturating_add(Weight::from_proof_size(21998))
Weight::from_parts(71_075_293, 0)
.saturating_add(Weight::from_parts(0, 21998))
// Standard Error: 10_508
.saturating_add(Weight::from_ref_time(1_384_674).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_384_674, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(5_u64))
.saturating_add(Weight::from_proof_size(2520).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
}
/// Storage: NominationPools BondedPools (r:1 w:1)
/// Proof: NominationPools BondedPools (max_values: None, max_size: Some(164), added: 2639, mode: MaxEncodedLen)
@@ -893,8 +893,8 @@ impl WeightInfo for () {
// Measured: `1498`
// Estimated: `8752`
// Minimum execution time: 36_410 nanoseconds.
Weight::from_ref_time(37_585_000)
.saturating_add(Weight::from_proof_size(8752))
Weight::from_parts(37_585_000, 0)
.saturating_add(Weight::from_parts(0, 8752))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -910,10 +910,10 @@ impl WeightInfo for () {
// Measured: `559`
// Estimated: `5883`
// Minimum execution time: 14_322 nanoseconds.
Weight::from_ref_time(15_328_204)
.saturating_add(Weight::from_proof_size(5883))
Weight::from_parts(15_328_204, 0)
.saturating_add(Weight::from_parts(0, 5883))
// Standard Error: 161
.saturating_add(Weight::from_ref_time(1_406).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_406, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -932,8 +932,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_968 nanoseconds.
Weight::from_ref_time(6_245_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(6_245_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
/// Storage: NominationPools BondedPools (r:1 w:1)
@@ -943,8 +943,8 @@ impl WeightInfo for () {
// Measured: `559`
// Estimated: `2639`
// Minimum execution time: 18_979 nanoseconds.
Weight::from_ref_time(19_795_000)
.saturating_add(Weight::from_proof_size(2639))
Weight::from_parts(19_795_000, 0)
.saturating_add(Weight::from_parts(0, 2639))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -971,8 +971,8 @@ impl WeightInfo for () {
// Measured: `2136`
// Estimated: `20489`
// Minimum execution time: 68_145 nanoseconds.
Weight::from_ref_time(70_444_000)
.saturating_add(Weight::from_proof_size(20489))
Weight::from_parts(70_444_000, 0)
.saturating_add(Weight::from_parts(0, 20489))
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -985,8 +985,8 @@ impl WeightInfo for () {
// Measured: `542`
// Estimated: `5228`
// Minimum execution time: 15_112 nanoseconds.
Weight::from_ref_time(15_897_000)
.saturating_add(Weight::from_proof_size(5228))
Weight::from_parts(15_897_000, 0)
.saturating_add(Weight::from_parts(0, 5228))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
+6 -6
View File
@@ -77,7 +77,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 23_484 nanoseconds.
Weight::from_parts(23_828_000, 2566)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_705).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_705, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -93,7 +93,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 14_812 nanoseconds.
Weight::from_parts(14_949_000, 2566)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_707).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_707, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -109,7 +109,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 14_185 nanoseconds.
Weight::from_parts(14_398_000, 2566)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_709).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_709, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -234,7 +234,7 @@ impl WeightInfo for () {
// Minimum execution time: 23_484 nanoseconds.
Weight::from_parts(23_828_000, 2566)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_705).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_705, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -250,7 +250,7 @@ impl WeightInfo for () {
// Minimum execution time: 14_812 nanoseconds.
Weight::from_parts(14_949_000, 2566)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_707).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_707, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -266,7 +266,7 @@ impl WeightInfo for () {
// Minimum execution time: 14_185 nanoseconds.
Weight::from_parts(14_398_000, 2566)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_709).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_709, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
+28 -28
View File
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 14_461 nanoseconds.
Weight::from_parts(14_913_927, 3716)
// Standard Error: 1_174
.saturating_add(Weight::from_ref_time(36_087).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(36_087, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: Proxy Proxies (r:1 w:0)
@@ -91,9 +91,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 31_523 nanoseconds.
Weight::from_parts(31_116_270, 11027)
// Standard Error: 1_789
.saturating_add(Weight::from_ref_time(135_656).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(135_656, 0).saturating_mul(a.into()))
// Standard Error: 1_849
.saturating_add(Weight::from_ref_time(53_893).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(53_893, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -110,9 +110,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 19_363 nanoseconds.
Weight::from_parts(20_282_191, 7311)
// Standard Error: 1_084
.saturating_add(Weight::from_ref_time(133_825).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(133_825, 0).saturating_mul(a.into()))
// Standard Error: 1_120
.saturating_add(Weight::from_ref_time(3_434).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(3_434, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -129,9 +129,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 19_363 nanoseconds.
Weight::from_parts(20_211_584, 7311)
// Standard Error: 1_171
.saturating_add(Weight::from_ref_time(136_984).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(136_984, 0).saturating_mul(a.into()))
// Standard Error: 1_210
.saturating_add(Weight::from_ref_time(3_686).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(3_686, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -150,9 +150,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_811 nanoseconds.
Weight::from_parts(27_965_813, 11027)
// Standard Error: 1_987
.saturating_add(Weight::from_ref_time(124_133).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(124_133, 0).saturating_mul(a.into()))
// Standard Error: 2_053
.saturating_add(Weight::from_ref_time(54_692).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(54_692, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -166,7 +166,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 20_922 nanoseconds.
Weight::from_parts(21_551_797, 3716)
// Standard Error: 1_425
.saturating_add(Weight::from_ref_time(58_434).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(58_434, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -180,7 +180,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 20_812 nanoseconds.
Weight::from_parts(21_660_732, 3716)
// Standard Error: 1_438
.saturating_add(Weight::from_ref_time(68_740).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(68_740, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -194,7 +194,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 16_786 nanoseconds.
Weight::from_parts(17_249_958, 3716)
// Standard Error: 1_007
.saturating_add(Weight::from_ref_time(37_546).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(37_546, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -208,7 +208,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 22_764 nanoseconds.
Weight::from_parts(23_539_039, 3716)
// Standard Error: 814
.saturating_add(Weight::from_ref_time(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(144, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -222,7 +222,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_720 nanoseconds.
Weight::from_parts(18_428_849, 3716)
// Standard Error: 1_093
.saturating_add(Weight::from_ref_time(34_600).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(34_600, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -240,7 +240,7 @@ impl WeightInfo for () {
// Minimum execution time: 14_461 nanoseconds.
Weight::from_parts(14_913_927, 3716)
// Standard Error: 1_174
.saturating_add(Weight::from_ref_time(36_087).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(36_087, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: Proxy Proxies (r:1 w:0)
@@ -258,9 +258,9 @@ impl WeightInfo for () {
// Minimum execution time: 31_523 nanoseconds.
Weight::from_parts(31_116_270, 11027)
// Standard Error: 1_789
.saturating_add(Weight::from_ref_time(135_656).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(135_656, 0).saturating_mul(a.into()))
// Standard Error: 1_849
.saturating_add(Weight::from_ref_time(53_893).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(53_893, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -277,9 +277,9 @@ impl WeightInfo for () {
// Minimum execution time: 19_363 nanoseconds.
Weight::from_parts(20_282_191, 7311)
// Standard Error: 1_084
.saturating_add(Weight::from_ref_time(133_825).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(133_825, 0).saturating_mul(a.into()))
// Standard Error: 1_120
.saturating_add(Weight::from_ref_time(3_434).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(3_434, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -296,9 +296,9 @@ impl WeightInfo for () {
// Minimum execution time: 19_363 nanoseconds.
Weight::from_parts(20_211_584, 7311)
// Standard Error: 1_171
.saturating_add(Weight::from_ref_time(136_984).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(136_984, 0).saturating_mul(a.into()))
// Standard Error: 1_210
.saturating_add(Weight::from_ref_time(3_686).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(3_686, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -317,9 +317,9 @@ impl WeightInfo for () {
// Minimum execution time: 27_811 nanoseconds.
Weight::from_parts(27_965_813, 11027)
// Standard Error: 1_987
.saturating_add(Weight::from_ref_time(124_133).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(124_133, 0).saturating_mul(a.into()))
// Standard Error: 2_053
.saturating_add(Weight::from_ref_time(54_692).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(54_692, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -333,7 +333,7 @@ impl WeightInfo for () {
// Minimum execution time: 20_922 nanoseconds.
Weight::from_parts(21_551_797, 3716)
// Standard Error: 1_425
.saturating_add(Weight::from_ref_time(58_434).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(58_434, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -347,7 +347,7 @@ impl WeightInfo for () {
// Minimum execution time: 20_812 nanoseconds.
Weight::from_parts(21_660_732, 3716)
// Standard Error: 1_438
.saturating_add(Weight::from_ref_time(68_740).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(68_740, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -361,7 +361,7 @@ impl WeightInfo for () {
// Minimum execution time: 16_786 nanoseconds.
Weight::from_parts(17_249_958, 3716)
// Standard Error: 1_007
.saturating_add(Weight::from_ref_time(37_546).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(37_546, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -375,7 +375,7 @@ impl WeightInfo for () {
// Minimum execution time: 22_764 nanoseconds.
Weight::from_parts(23_539_039, 3716)
// Standard Error: 814
.saturating_add(Weight::from_ref_time(144).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(144, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -389,7 +389,7 @@ impl WeightInfo for () {
// Minimum execution time: 17_720 nanoseconds.
Weight::from_parts(18_428_849, 3716)
// Standard Error: 1_093
.saturating_add(Weight::from_ref_time(34_600).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(34_600, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -92,12 +92,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 26_177 nanoseconds.
Weight::from_parts(29_245_248, 10064)
// Standard Error: 18_611
.saturating_add(Weight::from_ref_time(10_916_516).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(10_916_516, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(7547).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 7547).saturating_mul(r.into()))
}
/// Storage: RankedCollective Members (r:1 w:1)
/// Proof: RankedCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
@@ -115,7 +115,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 18_953 nanoseconds.
Weight::from_parts(19_570_567, 5006)
// Standard Error: 4_156
.saturating_add(Weight::from_ref_time(263_843).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(263_843, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -135,7 +135,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 26_243 nanoseconds.
Weight::from_parts(28_532_816, 10064)
// Standard Error: 22_689
.saturating_add(Weight::from_ref_time(614_464).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(614_464, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -170,7 +170,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 13_245 nanoseconds.
Weight::from_parts(17_420_271, 5394)
// Standard Error: 1_503
.saturating_add(Weight::from_ref_time(952_500).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(952_500, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
@@ -211,12 +211,12 @@ impl WeightInfo for () {
// Minimum execution time: 26_177 nanoseconds.
Weight::from_parts(29_245_248, 10064)
// Standard Error: 18_611
.saturating_add(Weight::from_ref_time(10_916_516).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(10_916_516, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(7547).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 7547).saturating_mul(r.into()))
}
/// Storage: RankedCollective Members (r:1 w:1)
/// Proof: RankedCollective Members (max_values: None, max_size: Some(42), added: 2517, mode: MaxEncodedLen)
@@ -234,7 +234,7 @@ impl WeightInfo for () {
// Minimum execution time: 18_953 nanoseconds.
Weight::from_parts(19_570_567, 5006)
// Standard Error: 4_156
.saturating_add(Weight::from_ref_time(263_843).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(263_843, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -254,7 +254,7 @@ impl WeightInfo for () {
// Minimum execution time: 26_243 nanoseconds.
Weight::from_parts(28_532_816, 10064)
// Standard Error: 22_689
.saturating_add(Weight::from_ref_time(614_464).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(614_464, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -289,7 +289,7 @@ impl WeightInfo for () {
// Minimum execution time: 13_245 nanoseconds.
Weight::from_parts(17_420_271, 5394)
// Standard Error: 1_503
.saturating_add(Weight::from_ref_time(952_500).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(952_500, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
+12 -12
View File
@@ -79,7 +79,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_893 nanoseconds.
Weight::from_ref_time(9_177_000)
Weight::from_parts(9_177_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Recovery Recoverable (r:1 w:1)
@@ -92,7 +92,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 20_662 nanoseconds.
Weight::from_parts(21_378_064, 2826)
// Standard Error: 3_350
.saturating_add(Weight::from_ref_time(83_738).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(83_738, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -121,7 +121,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_837 nanoseconds.
Weight::from_parts(18_429_664, 5690)
// Standard Error: 3_187
.saturating_add(Weight::from_ref_time(143_648).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(143_648, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -139,7 +139,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 21_960 nanoseconds.
Weight::from_parts(22_529_644, 8245)
// Standard Error: 2_945
.saturating_add(Weight::from_ref_time(85_604).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(85_604, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -155,7 +155,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 26_054 nanoseconds.
Weight::from_parts(26_724_866, 5467)
// Standard Error: 2_645
.saturating_add(Weight::from_ref_time(104_301).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(104_301, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -171,7 +171,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 25_110 nanoseconds.
Weight::from_parts(25_805_837, 5690)
// Standard Error: 2_732
.saturating_add(Weight::from_ref_time(73_458).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(73_458, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -207,7 +207,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_893 nanoseconds.
Weight::from_ref_time(9_177_000)
Weight::from_parts(9_177_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Recovery Recoverable (r:1 w:1)
@@ -220,7 +220,7 @@ impl WeightInfo for () {
// Minimum execution time: 20_662 nanoseconds.
Weight::from_parts(21_378_064, 2826)
// Standard Error: 3_350
.saturating_add(Weight::from_ref_time(83_738).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(83_738, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -249,7 +249,7 @@ impl WeightInfo for () {
// Minimum execution time: 17_837 nanoseconds.
Weight::from_parts(18_429_664, 5690)
// Standard Error: 3_187
.saturating_add(Weight::from_ref_time(143_648).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(143_648, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -267,7 +267,7 @@ impl WeightInfo for () {
// Minimum execution time: 21_960 nanoseconds.
Weight::from_parts(22_529_644, 8245)
// Standard Error: 2_945
.saturating_add(Weight::from_ref_time(85_604).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(85_604, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -283,7 +283,7 @@ impl WeightInfo for () {
// Minimum execution time: 26_054 nanoseconds.
Weight::from_parts(26_724_866, 5467)
// Standard Error: 2_645
.saturating_add(Weight::from_ref_time(104_301).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(104_301, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -299,7 +299,7 @@ impl WeightInfo for () {
// Minimum execution time: 25_110 nanoseconds.
Weight::from_parts(25_805_837, 5690)
// Standard Error: 2_732
.saturating_add(Weight::from_ref_time(73_458).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(73_458, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
+4 -4
View File
@@ -60,9 +60,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_404 nanoseconds.
Weight::from_ref_time(343_031)
Weight::from_parts(343_031, 0)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(1_404).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(1_404, 0).saturating_mul(l.into()))
}
}
@@ -74,8 +74,8 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_404 nanoseconds.
Weight::from_ref_time(343_031)
Weight::from_parts(343_031, 0)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(1_404).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(1_404, 0).saturating_mul(l.into()))
}
}
+13 -13
View File
@@ -121,7 +121,7 @@ impl Contains<RuntimeCall> for BaseFilter {
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(
Weight::from_ref_time(2_000_000_000_000).set_proof_size(u64::MAX),
Weight::from_parts(2_000_000_000_000, u64::MAX),
);
}
impl system::Config for Test {
@@ -169,40 +169,40 @@ impl pallet_preimage::Config for Test {
pub struct TestWeightInfo;
impl WeightInfo for TestWeightInfo {
fn service_agendas_base() -> Weight {
Weight::from_ref_time(0b0000_0001)
Weight::from_parts(0b0000_0001, 0)
}
fn service_agenda_base(i: u32) -> Weight {
Weight::from_ref_time((i << 8) as u64 + 0b0000_0010)
Weight::from_parts((i << 8) as u64 + 0b0000_0010, 0)
}
fn service_task_base() -> Weight {
Weight::from_ref_time(0b0000_0100)
Weight::from_parts(0b0000_0100, 0)
}
fn service_task_periodic() -> Weight {
Weight::from_ref_time(0b0000_1100)
Weight::from_parts(0b0000_1100, 0)
}
fn service_task_named() -> Weight {
Weight::from_ref_time(0b0001_0100)
Weight::from_parts(0b0001_0100, 0)
}
fn service_task_fetched(s: u32) -> Weight {
Weight::from_ref_time((s << 8) as u64 + 0b0010_0100)
Weight::from_parts((s << 8) as u64 + 0b0010_0100, 0)
}
fn execute_dispatch_signed() -> Weight {
Weight::from_ref_time(0b0100_0000)
Weight::from_parts(0b0100_0000, 0)
}
fn execute_dispatch_unsigned() -> Weight {
Weight::from_ref_time(0b1000_0000)
Weight::from_parts(0b1000_0000, 0)
}
fn schedule(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
fn cancel(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
fn schedule_named(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
fn cancel_named(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
}
parameter_types! {
+67 -67
View File
@@ -33,7 +33,7 @@ use substrate_test_utils::assert_eq_uvec;
fn basic_scheduling_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_ok!(Scheduler::do_schedule(
DispatchTime::At(4),
@@ -55,7 +55,7 @@ fn basic_scheduling_works() {
fn scheduling_with_preimages_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
let len = call.using_encoded(|x| x.len()) as u32;
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
@@ -79,7 +79,7 @@ fn schedule_after_works() {
new_test_ext().execute_with(|| {
run_to_block(2);
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
// This will schedule the call 3 blocks after the next block... so block 3 + 3 = 6
assert_ok!(Scheduler::do_schedule(
@@ -103,7 +103,7 @@ fn schedule_after_zero_works() {
new_test_ext().execute_with(|| {
run_to_block(2);
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_ok!(Scheduler::do_schedule(
DispatchTime::After(0),
@@ -131,7 +131,7 @@ fn periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(logger::Call::log {
i: 42,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap()
));
@@ -156,7 +156,7 @@ fn periodic_scheduling_works() {
fn reschedule_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_eq!(
Scheduler::do_schedule(
@@ -195,7 +195,7 @@ fn reschedule_works() {
fn reschedule_named_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_eq!(
Scheduler::do_schedule_named(
@@ -235,7 +235,7 @@ fn reschedule_named_works() {
fn reschedule_named_perodic_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_eq!(
Scheduler::do_schedule_named(
@@ -293,7 +293,7 @@ fn cancel_named_scheduling_works_with_normal_cancel() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -305,7 +305,7 @@ fn cancel_named_scheduling_works_with_normal_cancel() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -331,7 +331,7 @@ fn cancel_named_periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -345,7 +345,7 @@ fn cancel_named_periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
)
@@ -359,7 +359,7 @@ fn cancel_named_periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -581,12 +581,12 @@ fn scheduler_respects_priority_ordering_with_soft_deadlines() {
#[test]
fn on_initialize_weight_is_correct() {
new_test_ext().execute_with(|| {
let call_weight = Weight::from_ref_time(25);
let call_weight = Weight::from_parts(25, 0);
// Named
let call = RuntimeCall::Logger(LoggerCall::log {
i: 3,
weight: call_weight + Weight::from_ref_time(1),
weight: call_weight + Weight::from_parts(1, 0),
});
assert_ok!(Scheduler::do_schedule_named(
[1u8; 32],
@@ -598,7 +598,7 @@ fn on_initialize_weight_is_correct() {
));
let call = RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: call_weight + Weight::from_ref_time(2),
weight: call_weight + Weight::from_parts(2, 0),
});
// Anon Periodic
assert_ok!(Scheduler::do_schedule(
@@ -610,7 +610,7 @@ fn on_initialize_weight_is_correct() {
));
let call = RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: call_weight + Weight::from_ref_time(3),
weight: call_weight + Weight::from_parts(3, 0),
});
// Anon
assert_ok!(Scheduler::do_schedule(
@@ -623,7 +623,7 @@ fn on_initialize_weight_is_correct() {
// Named Periodic
let call = RuntimeCall::Logger(LoggerCall::log {
i: 2600,
weight: call_weight + Weight::from_ref_time(4),
weight: call_weight + Weight::from_parts(4, 0),
});
assert_ok!(Scheduler::do_schedule_named(
[2u8; 32],
@@ -641,7 +641,7 @@ fn on_initialize_weight_is_correct() {
TestWeightInfo::service_agenda_base(1) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, true) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(4)
call_weight + Weight::from_parts(4, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), None);
assert_eq!(logger::log(), vec![(root(), 2600u32)]);
@@ -653,10 +653,10 @@ fn on_initialize_weight_is_correct() {
TestWeightInfo::service_agenda_base(2) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, true) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(3) +
call_weight + Weight::from_parts(3, 0) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, false) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(2)
call_weight + Weight::from_parts(2, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), None);
assert_eq!(logger::log(), vec![(root(), 2600u32), (root(), 69u32), (root(), 42u32)]);
@@ -668,7 +668,7 @@ fn on_initialize_weight_is_correct() {
TestWeightInfo::service_agenda_base(1) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, false) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(1)
call_weight + Weight::from_parts(1, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), None);
assert_eq!(
@@ -690,11 +690,11 @@ fn root_calls_works() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_ok!(
Scheduler::schedule_named(RuntimeOrigin::root(), [1u8; 32], 4, None, 127, call,)
@@ -719,15 +719,15 @@ fn fails_to_schedule_task_in_the_past() {
let call1 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call3 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_noop!(
@@ -752,11 +752,11 @@ fn should_use_origin() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_ok!(Scheduler::schedule_named(
system::RawOrigin::Signed(1).into(),
@@ -784,11 +784,11 @@ fn should_check_origin() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_noop!(
Scheduler::schedule_named(
@@ -813,11 +813,11 @@ fn should_check_origin_for_cancel() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_ok!(Scheduler::schedule_named(
system::RawOrigin::Signed(1).into(),
@@ -861,7 +861,7 @@ fn migration_to_v4_works() {
priority: i as u8 + 10,
call: RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}),
maybe_periodic: None,
}),
@@ -871,7 +871,7 @@ fn migration_to_v4_works() {
priority: 123,
call: RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}),
maybe_periodic: Some((456u64, 10)),
}),
@@ -892,7 +892,7 @@ fn migration_to_v4_works() {
priority: 10,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
maybe_periodic: None,
@@ -905,7 +905,7 @@ fn migration_to_v4_works() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -922,7 +922,7 @@ fn migration_to_v4_works() {
priority: 11,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
maybe_periodic: None,
@@ -935,7 +935,7 @@ fn migration_to_v4_works() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -952,7 +952,7 @@ fn migration_to_v4_works() {
priority: 12,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
maybe_periodic: None,
@@ -965,7 +965,7 @@ fn migration_to_v4_works() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -998,7 +998,7 @@ fn test_migrate_origin() {
priority: i as u8 + 10,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
origin: 3u32,
@@ -1012,7 +1012,7 @@ fn test_migrate_origin() {
origin: 2u32,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1045,7 +1045,7 @@ fn test_migrate_origin() {
priority: 10,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100)
weight: Weight::from_parts(100, 0)
}))
.unwrap(),
maybe_periodic: None,
@@ -1058,7 +1058,7 @@ fn test_migrate_origin() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1075,7 +1075,7 @@ fn test_migrate_origin() {
priority: 11,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100)
weight: Weight::from_parts(100, 0)
}))
.unwrap(),
maybe_periodic: None,
@@ -1088,7 +1088,7 @@ fn test_migrate_origin() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1105,7 +1105,7 @@ fn test_migrate_origin() {
priority: 12,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100)
weight: Weight::from_parts(100, 0)
}))
.unwrap(),
maybe_periodic: None,
@@ -1118,7 +1118,7 @@ fn test_migrate_origin() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1136,7 +1136,7 @@ fn test_migrate_origin() {
fn postponed_named_task_cannot_be_rescheduled() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(1000) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(1000, 0) });
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
let len = call.using_encoded(|x| x.len()) as u32;
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
@@ -1204,7 +1204,7 @@ fn scheduler_v3_anon_basic_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
// Schedule a call.
let _address = <Scheduler as Anon<_, _, _>>::schedule(
@@ -1233,7 +1233,7 @@ fn scheduler_v3_anon_cancel_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule a call.
@@ -1260,7 +1260,7 @@ fn scheduler_v3_anon_reschedule_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
// Schedule a call.
let address = <Scheduler as Anon<_, _, _>>::schedule(
@@ -1307,7 +1307,7 @@ fn scheduler_v3_anon_next_schedule_time_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule a call.
@@ -1344,7 +1344,7 @@ fn scheduler_v3_anon_reschedule_and_next_schedule_time_work() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule a call.
@@ -1386,7 +1386,7 @@ fn scheduler_v3_anon_schedule_agenda_overflows() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule the maximal number allowed per block.
@@ -1422,7 +1422,7 @@ fn scheduler_v3_anon_cancel_and_schedule_fills_holes() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let mut addrs = Vec::<_>::default();
@@ -1471,7 +1471,7 @@ fn scheduler_v3_anon_reschedule_fills_holes() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let mut addrs = Vec::<_>::default();
@@ -1515,7 +1515,7 @@ fn scheduler_v3_named_basic_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let name = [1u8; 32];
// Schedule a call.
@@ -1547,7 +1547,7 @@ fn scheduler_v3_named_cancel_named_works() {
use frame_support::traits::schedule::v3::Named;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let name = [1u8; 32];
@@ -1577,7 +1577,7 @@ fn scheduler_v3_named_cancel_without_name_works() {
use frame_support::traits::schedule::v3::{Anon, Named};
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let name = [1u8; 32];
@@ -1607,7 +1607,7 @@ fn scheduler_v3_named_reschedule_named_works() {
use frame_support::traits::schedule::v3::{Anon, Named};
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let name = [1u8; 32];
// Schedule a call.
@@ -1666,7 +1666,7 @@ fn scheduler_v3_named_next_schedule_time_works() {
use frame_support::traits::schedule::v3::{Anon, Named};
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let name = [1u8; 32];
@@ -1711,7 +1711,7 @@ fn cancel_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let address = Scheduler::do_schedule(
DispatchTime::At(when),
None,
@@ -1745,7 +1745,7 @@ fn cancel_named_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
Scheduler::do_schedule_named(
[1u8; 32],
DispatchTime::At(when),
@@ -1781,7 +1781,7 @@ fn reschedule_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let address = Scheduler::do_schedule(
DispatchTime::At(when),
None,
@@ -1818,7 +1818,7 @@ fn reschedule_named_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
Scheduler::do_schedule_named(
[1u8; 32],
DispatchTime::At(when),
+24 -24
View File
@@ -86,7 +86,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 3_079 nanoseconds.
Weight::from_parts(7_087_647, 109497)
// Standard Error: 658
.saturating_add(Weight::from_ref_time(279_320).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(279_320, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -95,7 +95,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_192 nanoseconds.
Weight::from_ref_time(5_528_000)
Weight::from_parts(5_528_000, 0)
}
/// Storage: Preimage PreimageFor (r:1 w:1)
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)
@@ -109,10 +109,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_284 nanoseconds.
Weight::from_parts(17_574_000, 5252)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_126).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_126, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
}
/// Storage: Scheduler Lookup (r:0 w:1)
/// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
@@ -121,7 +121,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_020 nanoseconds.
Weight::from_ref_time(7_262_000)
Weight::from_parts(7_262_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
fn service_task_periodic() -> Weight {
@@ -129,21 +129,21 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_187 nanoseconds.
Weight::from_ref_time(5_368_000)
Weight::from_parts(5_368_000, 0)
}
fn execute_dispatch_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_313 nanoseconds.
Weight::from_ref_time(2_404_000)
Weight::from_parts(2_404_000, 0)
}
fn execute_dispatch_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_187 nanoseconds.
Weight::from_ref_time(2_362_000)
Weight::from_parts(2_362_000, 0)
}
/// Storage: Scheduler Agenda (r:1 w:1)
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(107022), added: 109497, mode: MaxEncodedLen)
@@ -155,7 +155,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 11_971 nanoseconds.
Weight::from_parts(16_060_361, 109497)
// Standard Error: 665
.saturating_add(Weight::from_ref_time(286_324).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(286_324, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -171,7 +171,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_594 nanoseconds.
Weight::from_parts(17_191_501, 109497)
// Standard Error: 626
.saturating_add(Weight::from_ref_time(425_572).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(425_572, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -187,7 +187,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_127 nanoseconds.
Weight::from_parts(20_932_642, 112020)
// Standard Error: 692
.saturating_add(Weight::from_ref_time(288_344).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(288_344, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -203,7 +203,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 16_859 nanoseconds.
Weight::from_parts(19_736_937, 112020)
// Standard Error: 676
.saturating_add(Weight::from_ref_time(429_770).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(429_770, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -232,7 +232,7 @@ impl WeightInfo for () {
// Minimum execution time: 3_079 nanoseconds.
Weight::from_parts(7_087_647, 109497)
// Standard Error: 658
.saturating_add(Weight::from_ref_time(279_320).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(279_320, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -241,7 +241,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_192 nanoseconds.
Weight::from_ref_time(5_528_000)
Weight::from_parts(5_528_000, 0)
}
/// Storage: Preimage PreimageFor (r:1 w:1)
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)
@@ -255,10 +255,10 @@ impl WeightInfo for () {
// Minimum execution time: 17_284 nanoseconds.
Weight::from_parts(17_574_000, 5252)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_126).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_126, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
}
/// Storage: Scheduler Lookup (r:0 w:1)
/// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
@@ -267,7 +267,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_020 nanoseconds.
Weight::from_ref_time(7_262_000)
Weight::from_parts(7_262_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
fn service_task_periodic() -> Weight {
@@ -275,21 +275,21 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_187 nanoseconds.
Weight::from_ref_time(5_368_000)
Weight::from_parts(5_368_000, 0)
}
fn execute_dispatch_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_313 nanoseconds.
Weight::from_ref_time(2_404_000)
Weight::from_parts(2_404_000, 0)
}
fn execute_dispatch_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_187 nanoseconds.
Weight::from_ref_time(2_362_000)
Weight::from_parts(2_362_000, 0)
}
/// Storage: Scheduler Agenda (r:1 w:1)
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(107022), added: 109497, mode: MaxEncodedLen)
@@ -301,7 +301,7 @@ impl WeightInfo for () {
// Minimum execution time: 11_971 nanoseconds.
Weight::from_parts(16_060_361, 109497)
// Standard Error: 665
.saturating_add(Weight::from_ref_time(286_324).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(286_324, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -317,7 +317,7 @@ impl WeightInfo for () {
// Minimum execution time: 15_594 nanoseconds.
Weight::from_parts(17_191_501, 109497)
// Standard Error: 626
.saturating_add(Weight::from_ref_time(425_572).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(425_572, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -333,7 +333,7 @@ impl WeightInfo for () {
// Minimum execution time: 15_127 nanoseconds.
Weight::from_parts(20_932_642, 112020)
// Standard Error: 692
.saturating_add(Weight::from_ref_time(288_344).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(288_344, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -349,7 +349,7 @@ impl WeightInfo for () {
// Minimum execution time: 16_859 nanoseconds.
Weight::from_parts(19_736_937, 112020)
// Standard Error: 676
.saturating_add(Weight::from_ref_time(429_770).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(429_770, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
+1 -1
View File
@@ -1267,7 +1267,7 @@ where
disable_strategy: DisableStrategy,
) -> Weight {
let reward_proportion = SlashRewardFraction::<T>::get();
let mut consumed_weight = Weight::from_ref_time(0);
let mut consumed_weight = Weight::from_parts(0, 0);
let mut add_db_reads_writes = |reads, writes| {
consumed_weight += T::DbWeight::get().reads_writes(reads, writes);
};
+72 -72
View File
@@ -164,7 +164,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 31_479 nanoseconds.
Weight::from_parts(32_410_035, 10442)
// Standard Error: 313
.saturating_add(Weight::from_ref_time(9_090).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(9_090, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -204,11 +204,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 71_968 nanoseconds.
Weight::from_parts(76_631_804, 32303)
// Standard Error: 1_613
.saturating_add(Weight::from_ref_time(1_058_968).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_058_968, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13_u64))
.saturating_add(T::DbWeight::get().writes(12_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(4).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: Staking Ledger (r:1 w:0)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -253,11 +253,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 25_685 nanoseconds.
Weight::from_parts(25_290_286, 3566)
// Standard Error: 5_164
.saturating_add(Weight::from_ref_time(6_445_608).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(6_445_608, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
.saturating_add(Weight::from_proof_size(3033).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(0, 3033).saturating_mul(k.into()))
}
/// Storage: Staking Ledger (r:1 w:0)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -289,11 +289,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 59_542 nanoseconds.
Weight::from_parts(57_558_678, 21988)
// Standard Error: 10_364
.saturating_add(Weight::from_ref_time(2_759_713).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(2_759_713, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(Weight::from_proof_size(2520).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
}
/// Storage: Staking Ledger (r:1 w:0)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -351,7 +351,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_069 nanoseconds.
Weight::from_ref_time(3_176_000)
Weight::from_parts(3_176_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Staking ForceEra (r:0 w:1)
@@ -361,7 +361,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_386 nanoseconds.
Weight::from_ref_time(11_672_000)
Weight::from_parts(11_672_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Staking ForceEra (r:0 w:1)
@@ -371,7 +371,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_591 nanoseconds.
Weight::from_ref_time(11_799_000)
Weight::from_parts(11_799_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Staking ForceEra (r:0 w:1)
@@ -381,7 +381,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_553 nanoseconds.
Weight::from_ref_time(11_871_000)
Weight::from_parts(11_871_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Staking Invulnerables (r:0 w:1)
@@ -392,9 +392,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_292 nanoseconds.
Weight::from_ref_time(3_754_352)
Weight::from_parts(3_754_352, 0)
// Standard Error: 40
.saturating_add(Weight::from_ref_time(9_838).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(9_838, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Staking Bonded (r:1 w:1)
@@ -431,11 +431,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 65_307 nanoseconds.
Weight::from_parts(70_227_980, 27930)
// Standard Error: 2_113
.saturating_add(Weight::from_ref_time(1_059_856).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_059_856, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(12_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(4).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: Staking UnappliedSlashes (r:1 w:1)
/// Proof Skipped: Staking UnappliedSlashes (max_values: None, max_size: None, mode: Measured)
@@ -447,7 +447,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 89_123 nanoseconds.
Weight::from_parts(890_989_741, 69146)
// Standard Error: 58_282
.saturating_add(Weight::from_ref_time(4_920_413).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(4_920_413, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -477,12 +477,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 73_652 nanoseconds.
Weight::from_parts(127_839_483, 54756)
// Standard Error: 14_195
.saturating_add(Weight::from_ref_time(21_932_079).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(21_932_079, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(8024).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 8024).saturating_mul(n.into()))
}
/// Storage: Staking CurrentEra (r:1 w:0)
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -512,12 +512,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 94_560 nanoseconds.
Weight::from_parts(154_033_219, 83594)
// Standard Error: 26_663
.saturating_add(Weight::from_ref_time(31_269_223).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(31_269_223, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(16026).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 16026).saturating_mul(n.into()))
}
/// Storage: Staking Ledger (r:1 w:1)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -539,7 +539,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 74_764 nanoseconds.
Weight::from_parts(75_814_067, 25491)
// Standard Error: 1_217
.saturating_add(Weight::from_ref_time(64_725).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(64_725, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
@@ -577,11 +577,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 77_611 nanoseconds.
Weight::from_parts(79_760_034, 31810)
// Standard Error: 1_597
.saturating_add(Weight::from_ref_time(1_039_268).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_039_268, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(12_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(4).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: VoterList CounterForListNodes (r:1 w:0)
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -626,16 +626,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 489_824 nanoseconds.
Weight::from_parts(491_687_000, 528203)
// Standard Error: 1_787_577
.saturating_add(Weight::from_ref_time(58_719_498).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(58_719_498, 0).saturating_mul(v.into()))
// Standard Error: 178_122
.saturating_add(Weight::from_ref_time(13_273_555).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(13_273_555, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(206_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(16743).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(12947).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 16743).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 12947).saturating_mul(n.into()))
}
/// Storage: VoterList CounterForListNodes (r:1 w:0)
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -662,15 +662,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 23_373_467 nanoseconds.
Weight::from_parts(23_497_257_000, 511899)
// Standard Error: 299_205
.saturating_add(Weight::from_ref_time(3_434_000).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(3_434_000, 0).saturating_mul(v.into()))
// Standard Error: 299_205
.saturating_add(Weight::from_ref_time(2_568_954).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(2_568_954, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(201_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(14295).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(11775).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 14295).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 11775).saturating_mul(n.into()))
}
/// Storage: Staking CounterForValidators (r:1 w:0)
/// Proof: Staking CounterForValidators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -684,10 +684,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 3_882_120 nanoseconds.
Weight::from_parts(3_951_993_000, 3019)
// Standard Error: 46_729
.saturating_add(Weight::from_ref_time(2_856_043).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(2_856_043, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(2520).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into()))
}
/// Storage: Staking MinCommission (r:0 w:1)
/// Proof: Staking MinCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -706,7 +706,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_427 nanoseconds.
Weight::from_ref_time(8_794_000)
Weight::from_parts(8_794_000, 0)
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: Staking MinCommission (r:0 w:1)
@@ -726,7 +726,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_620 nanoseconds.
Weight::from_ref_time(7_901_000)
Weight::from_parts(7_901_000, 0)
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: Staking Ledger (r:1 w:0)
@@ -778,7 +778,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_518 nanoseconds.
Weight::from_ref_time(4_656_000)
Weight::from_parts(4_656_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
@@ -866,7 +866,7 @@ impl WeightInfo for () {
// Minimum execution time: 31_479 nanoseconds.
Weight::from_parts(32_410_035, 10442)
// Standard Error: 313
.saturating_add(Weight::from_ref_time(9_090).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(9_090, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -906,11 +906,11 @@ impl WeightInfo for () {
// Minimum execution time: 71_968 nanoseconds.
Weight::from_parts(76_631_804, 32303)
// Standard Error: 1_613
.saturating_add(Weight::from_ref_time(1_058_968).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_058_968, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(13_u64))
.saturating_add(RocksDbWeight::get().writes(12_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(4).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: Staking Ledger (r:1 w:0)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -955,11 +955,11 @@ impl WeightInfo for () {
// Minimum execution time: 25_685 nanoseconds.
Weight::from_parts(25_290_286, 3566)
// Standard Error: 5_164
.saturating_add(Weight::from_ref_time(6_445_608).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(6_445_608, 0).saturating_mul(k.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into())))
.saturating_add(Weight::from_proof_size(3033).saturating_mul(k.into()))
.saturating_add(Weight::from_parts(0, 3033).saturating_mul(k.into()))
}
/// Storage: Staking Ledger (r:1 w:0)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -991,11 +991,11 @@ impl WeightInfo for () {
// Minimum execution time: 59_542 nanoseconds.
Weight::from_parts(57_558_678, 21988)
// Standard Error: 10_364
.saturating_add(Weight::from_ref_time(2_759_713).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(2_759_713, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(6_u64))
.saturating_add(Weight::from_proof_size(2520).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
}
/// Storage: Staking Ledger (r:1 w:0)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -1053,7 +1053,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_069 nanoseconds.
Weight::from_ref_time(3_176_000)
Weight::from_parts(3_176_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Staking ForceEra (r:0 w:1)
@@ -1063,7 +1063,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_386 nanoseconds.
Weight::from_ref_time(11_672_000)
Weight::from_parts(11_672_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Staking ForceEra (r:0 w:1)
@@ -1073,7 +1073,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_591 nanoseconds.
Weight::from_ref_time(11_799_000)
Weight::from_parts(11_799_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Staking ForceEra (r:0 w:1)
@@ -1083,7 +1083,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_553 nanoseconds.
Weight::from_ref_time(11_871_000)
Weight::from_parts(11_871_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Staking Invulnerables (r:0 w:1)
@@ -1094,9 +1094,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_292 nanoseconds.
Weight::from_ref_time(3_754_352)
Weight::from_parts(3_754_352, 0)
// Standard Error: 40
.saturating_add(Weight::from_ref_time(9_838).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(9_838, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Staking Bonded (r:1 w:1)
@@ -1133,11 +1133,11 @@ impl WeightInfo for () {
// Minimum execution time: 65_307 nanoseconds.
Weight::from_parts(70_227_980, 27930)
// Standard Error: 2_113
.saturating_add(Weight::from_ref_time(1_059_856).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_059_856, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(11_u64))
.saturating_add(RocksDbWeight::get().writes(12_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(4).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: Staking UnappliedSlashes (r:1 w:1)
/// Proof Skipped: Staking UnappliedSlashes (max_values: None, max_size: None, mode: Measured)
@@ -1149,7 +1149,7 @@ impl WeightInfo for () {
// Minimum execution time: 89_123 nanoseconds.
Weight::from_parts(890_989_741, 69146)
// Standard Error: 58_282
.saturating_add(Weight::from_ref_time(4_920_413).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(4_920_413, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1179,12 +1179,12 @@ impl WeightInfo for () {
// Minimum execution time: 73_652 nanoseconds.
Weight::from_parts(127_839_483, 54756)
// Standard Error: 14_195
.saturating_add(Weight::from_ref_time(21_932_079).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(21_932_079, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(8024).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 8024).saturating_mul(n.into()))
}
/// Storage: Staking CurrentEra (r:1 w:0)
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -1214,12 +1214,12 @@ impl WeightInfo for () {
// Minimum execution time: 94_560 nanoseconds.
Weight::from_parts(154_033_219, 83594)
// Standard Error: 26_663
.saturating_add(Weight::from_ref_time(31_269_223).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(31_269_223, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(10_u64))
.saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(16026).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 16026).saturating_mul(n.into()))
}
/// Storage: Staking Ledger (r:1 w:1)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
@@ -1241,7 +1241,7 @@ impl WeightInfo for () {
// Minimum execution time: 74_764 nanoseconds.
Weight::from_parts(75_814_067, 25491)
// Standard Error: 1_217
.saturating_add(Weight::from_ref_time(64_725).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(64_725, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().writes(8_u64))
}
@@ -1279,11 +1279,11 @@ impl WeightInfo for () {
// Minimum execution time: 77_611 nanoseconds.
Weight::from_parts(79_760_034, 31810)
// Standard Error: 1_597
.saturating_add(Weight::from_ref_time(1_039_268).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_039_268, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().writes(12_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_proof_size(4).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: VoterList CounterForListNodes (r:1 w:0)
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -1328,16 +1328,16 @@ impl WeightInfo for () {
// Minimum execution time: 489_824 nanoseconds.
Weight::from_parts(491_687_000, 528203)
// Standard Error: 1_787_577
.saturating_add(Weight::from_ref_time(58_719_498).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(58_719_498, 0).saturating_mul(v.into()))
// Standard Error: 178_122
.saturating_add(Weight::from_ref_time(13_273_555).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(13_273_555, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(206_u64))
.saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(16743).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(12947).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 16743).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 12947).saturating_mul(n.into()))
}
/// Storage: VoterList CounterForListNodes (r:1 w:0)
/// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -1364,15 +1364,15 @@ impl WeightInfo for () {
// Minimum execution time: 23_373_467 nanoseconds.
Weight::from_parts(23_497_257_000, 511899)
// Standard Error: 299_205
.saturating_add(Weight::from_ref_time(3_434_000).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(3_434_000, 0).saturating_mul(v.into()))
// Standard Error: 299_205
.saturating_add(Weight::from_ref_time(2_568_954).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(2_568_954, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(201_u64))
.saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(14295).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(11775).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 14295).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 11775).saturating_mul(n.into()))
}
/// Storage: Staking CounterForValidators (r:1 w:0)
/// Proof: Staking CounterForValidators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -1386,10 +1386,10 @@ impl WeightInfo for () {
// Minimum execution time: 3_882_120 nanoseconds.
Weight::from_parts(3_951_993_000, 3019)
// Standard Error: 46_729
.saturating_add(Weight::from_ref_time(2_856_043).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(2_856_043, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(2520).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into()))
}
/// Storage: Staking MinCommission (r:0 w:1)
/// Proof: Staking MinCommission (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -1408,7 +1408,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_427 nanoseconds.
Weight::from_ref_time(8_794_000)
Weight::from_parts(8_794_000, 0)
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
/// Storage: Staking MinCommission (r:0 w:1)
@@ -1428,7 +1428,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_620 nanoseconds.
Weight::from_ref_time(7_901_000)
Weight::from_parts(7_901_000, 0)
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
/// Storage: Staking Ledger (r:1 w:0)
@@ -1480,7 +1480,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_518 nanoseconds.
Weight::from_ref_time(4_656_000)
Weight::from_parts(4_656_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
@@ -1136,25 +1136,25 @@ mod mock {
impl WeightInfo for StateMigrationTestWeight {
fn process_top_key(_: u32) -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
fn continue_migrate() -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
fn continue_migrate_wrong_witness() -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
fn migrate_custom_top_fail() -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
fn migrate_custom_top_success() -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
fn migrate_custom_child_fail() -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
fn migrate_custom_child_success() -> Weight {
Weight::from_ref_time(1000000)
Weight::from_parts(1000000, 0)
}
}
@@ -88,7 +88,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_817 nanoseconds.
Weight::from_ref_time(9_027_000)
Weight::from_parts(9_027_000, 0)
}
/// Storage: unknown `0x666f6f` (r:1 w:1)
/// Proof Skipped: unknown `0x666f6f` (r:1 w:1)
@@ -106,7 +106,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_020 nanoseconds.
Weight::from_ref_time(9_234_000)
Weight::from_parts(9_234_000, 0)
}
/// Storage: unknown `0x666f6f` (r:1 w:1)
/// Proof Skipped: unknown `0x666f6f` (r:1 w:1)
@@ -129,10 +129,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 5_279 nanoseconds.
Weight::from_parts(5_517_000, 2700)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(1_230).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(1_230, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(v.into()))
}
}
@@ -166,7 +166,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_817 nanoseconds.
Weight::from_ref_time(9_027_000)
Weight::from_parts(9_027_000, 0)
}
/// Storage: unknown `0x666f6f` (r:1 w:1)
/// Proof Skipped: unknown `0x666f6f` (r:1 w:1)
@@ -184,7 +184,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_020 nanoseconds.
Weight::from_ref_time(9_234_000)
Weight::from_parts(9_234_000, 0)
}
/// Storage: unknown `0x666f6f` (r:1 w:1)
/// Proof Skipped: unknown `0x666f6f` (r:1 w:1)
@@ -207,9 +207,9 @@ impl WeightInfo for () {
// Minimum execution time: 5_279 nanoseconds.
Weight::from_parts(5_517_000, 2700)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(1_230).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(1_230, 0).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(v.into()))
}
}
+16 -16
View File
@@ -41,7 +41,7 @@ fn sudo_basics() {
// A privileged function should work when `sudo` is passed the root `key` as `origin`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1_000),
weight: Weight::from_parts(1_000, 0),
}));
assert_ok!(Sudo::sudo(RuntimeOrigin::signed(1), call));
assert_eq!(Logger::i32_log(), vec![42i32]);
@@ -49,7 +49,7 @@ fn sudo_basics() {
// A privileged function should not work when `sudo` is passed a non-root `key` as `origin`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1_000),
weight: Weight::from_parts(1_000, 0),
}));
assert_noop!(Sudo::sudo(RuntimeOrigin::signed(2), call), Error::<Test>::RequireSudo);
});
@@ -64,7 +64,7 @@ fn sudo_emits_events_correctly() {
// Should emit event to indicate success when called with the root `key` and `call` is `Ok`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1),
weight: Weight::from_parts(1, 0),
}));
assert_ok!(Sudo::sudo(RuntimeOrigin::signed(1), call));
System::assert_has_event(TestEvent::Sudo(Event::Sudid { sudo_result: Ok(()) }));
@@ -77,25 +77,25 @@ fn sudo_unchecked_weight_basics() {
// A privileged function should work when `sudo` is passed the root `key` as origin.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1_000),
weight: Weight::from_parts(1_000, 0),
}));
assert_ok!(Sudo::sudo_unchecked_weight(
RuntimeOrigin::signed(1),
call,
Weight::from_ref_time(1_000)
Weight::from_parts(1_000, 0)
));
assert_eq!(Logger::i32_log(), vec![42i32]);
// A privileged function should not work when called with a non-root `key`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1_000),
weight: Weight::from_parts(1_000, 0),
}));
assert_noop!(
Sudo::sudo_unchecked_weight(
RuntimeOrigin::signed(2),
call,
Weight::from_ref_time(1_000)
Weight::from_parts(1_000, 0)
),
Error::<Test>::RequireSudo,
);
@@ -105,12 +105,12 @@ fn sudo_unchecked_weight_basics() {
// Controls the dispatched weight.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1),
weight: Weight::from_parts(1, 0),
}));
let sudo_unchecked_weight_call =
SudoCall::sudo_unchecked_weight { call, weight: Weight::from_ref_time(1_000) };
SudoCall::sudo_unchecked_weight { call, weight: Weight::from_parts(1_000, 0) };
let info = sudo_unchecked_weight_call.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(1_000));
assert_eq!(info.weight, Weight::from_parts(1_000, 0));
});
}
@@ -123,12 +123,12 @@ fn sudo_unchecked_weight_emits_events_correctly() {
// Should emit event to indicate success when called with the root `key` and `call` is `Ok`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1),
weight: Weight::from_parts(1, 0),
}));
assert_ok!(Sudo::sudo_unchecked_weight(
RuntimeOrigin::signed(1),
call,
Weight::from_ref_time(1_000)
Weight::from_parts(1_000, 0)
));
System::assert_has_event(TestEvent::Sudo(Event::Sudid { sudo_result: Ok(()) }));
})
@@ -170,7 +170,7 @@ fn sudo_as_basics() {
// A privileged function will not work when passed to `sudo_as`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::privileged_i32_log {
i: 42,
weight: Weight::from_ref_time(1_000),
weight: Weight::from_parts(1_000, 0),
}));
assert_ok!(Sudo::sudo_as(RuntimeOrigin::signed(1), 2, call));
assert!(Logger::i32_log().is_empty());
@@ -179,14 +179,14 @@ fn sudo_as_basics() {
// A non-privileged function should not work when called with a non-root `key`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::non_privileged_log {
i: 42,
weight: Weight::from_ref_time(1),
weight: Weight::from_parts(1, 0),
}));
assert_noop!(Sudo::sudo_as(RuntimeOrigin::signed(3), 2, call), Error::<Test>::RequireSudo);
// A non-privileged function will work when passed to `sudo_as` with the root `key`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::non_privileged_log {
i: 42,
weight: Weight::from_ref_time(1),
weight: Weight::from_parts(1, 0),
}));
assert_ok!(Sudo::sudo_as(RuntimeOrigin::signed(1), 2, call));
assert_eq!(Logger::i32_log(), vec![42i32]);
@@ -204,7 +204,7 @@ fn sudo_as_emits_events_correctly() {
// A non-privileged function will work when passed to `sudo_as` with the root `key`.
let call = Box::new(RuntimeCall::Logger(LoggerCall::non_privileged_log {
i: 42,
weight: Weight::from_ref_time(1),
weight: Weight::from_parts(1, 0),
}));
assert_ok!(Sudo::sudo_as(RuntimeOrigin::signed(1), 2, call));
System::assert_has_event(TestEvent::Sudo(Event::SudoAsDone { sudo_result: Ok(()) }));
+40 -40
View File
@@ -314,7 +314,7 @@ pub trait WithPostDispatchInfo {
/// # Example
///
/// ```ignore
/// let who = ensure_signed(origin).map_err(|e| e.with_weight(Weight::from_ref_time(100)))?;
/// let who = ensure_signed(origin).map_err(|e| e.with_weight(Weight::from_parts(100, 0)))?;
/// ensure!(who == me, Error::<T>::NotMe.with_weight(200_000));
/// ```
fn with_weight(self, actual_weight: Weight) -> DispatchErrorWithPostInfo;
@@ -365,7 +365,7 @@ impl<Call: Encode + GetDispatchInfo, Extra: Encode> GetDispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo {
// for testing: weight == size.
DispatchInfo {
weight: Weight::from_ref_time(self.encode().len() as _),
weight: Weight::from_parts(self.encode().len() as _, 0),
pays_fee: Pays::Yes,
class: self.call.get_dispatch_info().class,
}
@@ -552,7 +552,7 @@ impl<T> ClassifyDispatch<T> for (Weight, DispatchClass, Pays) {
impl From<Option<u64>> for PostDispatchInfo {
fn from(maybe_actual_computation: Option<u64>) -> Self {
let actual_weight = match maybe_actual_computation {
Some(actual_computation) => Some(Weight::zero().set_ref_time(actual_computation)),
Some(actual_computation) => Some(Weight::from_parts(actual_computation, 0)),
None => None,
};
Self { actual_weight, pays_fee: Default::default() }
@@ -563,7 +563,7 @@ impl From<(Option<u64>, Pays)> for PostDispatchInfo {
fn from(post_weight_info: (Option<u64>, Pays)) -> Self {
let (maybe_actual_time, pays_fee) = post_weight_info;
let actual_weight = match maybe_actual_time {
Some(actual_time) => Some(Weight::zero().set_ref_time(actual_time)),
Some(actual_time) => Some(Weight::from_parts(actual_time, 0)),
None => None,
};
Self { actual_weight, pays_fee }
@@ -584,7 +584,7 @@ impl<T> PaysFee<T> for u64 {
impl<T> WeighData<T> for u64 {
fn weigh_data(&self, _: T) -> Weight {
return Weight::zero().set_ref_time(*self)
return Weight::from_parts(*self, 0)
}
}
@@ -735,7 +735,7 @@ impl<T> PaysFee<T> for (u64, Pays) {
/// pub struct Module<T: Config> for enum Call where origin: T::RuntimeOrigin {
/// #[weight = 1_000_000]
/// fn my_long_function(origin, do_expensive_calc: bool) -> DispatchResultWithPostInfo {
/// ensure_signed(origin).map_err(|e| e.with_weight(Weight::from_ref_time(100_000)))?;
/// ensure_signed(origin).map_err(|e| e.with_weight(Weight::from_parts(100_000, 0)))?;
/// if do_expensive_calc {
/// // do the expensive calculation
/// // ...
@@ -3239,13 +3239,13 @@ mod tests {
#[weight = (5, DispatchClass::Operational)]
fn operational(_origin) { unreachable!() }
fn on_initialize(n: T::BlockNumber,) -> Weight { if n.into() == 42 { panic!("on_initialize") } Weight::from_ref_time(7) }
fn on_initialize(n: T::BlockNumber,) -> Weight { if n.into() == 42 { panic!("on_initialize") } Weight::from_parts(7, 0) }
fn on_idle(n: T::BlockNumber, remaining_weight: Weight,) -> Weight {
if n.into() == 42 || remaining_weight == Weight::from_ref_time(42) { panic!("on_idle") }
Weight::from_ref_time(7)
if n.into() == 42 || remaining_weight == Weight::from_parts(42, 0) { panic!("on_idle") }
Weight::from_parts(7, 0)
}
fn on_finalize(n: T::BlockNumber,) { if n.into() == 42 { panic!("on_finalize") } }
fn on_runtime_upgrade() -> Weight { Weight::from_ref_time(10) }
fn on_runtime_upgrade() -> Weight { Weight::from_parts(10, 0) }
fn offchain_worker() {}
/// Some doc
fn integrity_test() { panic!("integrity_test") }
@@ -3423,27 +3423,27 @@ mod tests {
fn on_initialize_should_work_2() {
assert_eq!(
<Module<TraitImpl> as OnInitialize<u32>>::on_initialize(10),
Weight::from_ref_time(7)
Weight::from_parts(7, 0)
);
}
#[test]
#[should_panic(expected = "on_idle")]
fn on_idle_should_work_1() {
<Module<TraitImpl> as OnIdle<u32>>::on_idle(42, Weight::from_ref_time(9));
<Module<TraitImpl> as OnIdle<u32>>::on_idle(42, Weight::from_parts(9, 0));
}
#[test]
#[should_panic(expected = "on_idle")]
fn on_idle_should_work_2() {
<Module<TraitImpl> as OnIdle<u32>>::on_idle(9, Weight::from_ref_time(42));
<Module<TraitImpl> as OnIdle<u32>>::on_idle(9, Weight::from_parts(42, 0));
}
#[test]
fn on_idle_should_work_3() {
assert_eq!(
<Module<TraitImpl> as OnIdle<u32>>::on_idle(10, Weight::from_ref_time(11)),
Weight::from_ref_time(7)
<Module<TraitImpl> as OnIdle<u32>>::on_idle(10, Weight::from_parts(11, 0)),
Weight::from_parts(7, 0)
);
}
@@ -3458,7 +3458,7 @@ mod tests {
sp_io::TestExternalities::default().execute_with(|| {
assert_eq!(
<Module<TraitImpl> as OnRuntimeUpgrade>::on_runtime_upgrade(),
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
)
});
}
@@ -3469,7 +3469,7 @@ mod tests {
assert_eq!(
Call::<TraitImpl>::operational {}.get_dispatch_info(),
DispatchInfo {
weight: Weight::from_ref_time(5),
weight: Weight::from_parts(5, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes
},
@@ -3478,7 +3478,7 @@ mod tests {
assert_eq!(
Call::<TraitImpl>::aux_3 {}.get_dispatch_info(),
DispatchInfo {
weight: Weight::from_ref_time(3),
weight: Weight::from_parts(3, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes
},
@@ -3567,10 +3567,10 @@ mod weight_tests {
#[weight = (0, DispatchClass::Operational, Pays::Yes)]
fn f12(_origin, _a: u32, _eb: u32) { unimplemented!(); }
#[weight = T::DbWeight::get().reads(3) + T::DbWeight::get().writes(2) + Weight::from_ref_time(10_000)]
#[weight = T::DbWeight::get().reads(3) + T::DbWeight::get().writes(2) + Weight::from_parts(10_000, 0)]
fn f20(_origin) { unimplemented!(); }
#[weight = T::DbWeight::get().reads_writes(6, 5) + Weight::from_ref_time(40_000)]
#[weight = T::DbWeight::get().reads_writes(6, 5) + Weight::from_parts(40_000, 0)]
fn f21(_origin) { unimplemented!(); }
}
@@ -3580,96 +3580,96 @@ mod weight_tests {
fn weights_are_correct() {
// #[weight = 1000]
let info = Call::<TraitImpl>::f00 {}.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(1000));
assert_eq!(info.weight, Weight::from_parts(1000, 0));
assert_eq!(info.class, DispatchClass::Normal);
assert_eq!(info.pays_fee, Pays::Yes);
// #[weight = (1000, DispatchClass::Mandatory)]
let info = Call::<TraitImpl>::f01 {}.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(1000));
assert_eq!(info.weight, Weight::from_parts(1000, 0));
assert_eq!(info.class, DispatchClass::Mandatory);
assert_eq!(info.pays_fee, Pays::Yes);
// #[weight = (1000, Pays::No)]
let info = Call::<TraitImpl>::f02 {}.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(1000));
assert_eq!(info.weight, Weight::from_parts(1000, 0));
assert_eq!(info.class, DispatchClass::Normal);
assert_eq!(info.pays_fee, Pays::No);
// #[weight = (1000, DispatchClass::Operational, Pays::No)]
let info = Call::<TraitImpl>::f03 {}.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(1000));
assert_eq!(info.weight, Weight::from_parts(1000, 0));
assert_eq!(info.class, DispatchClass::Operational);
assert_eq!(info.pays_fee, Pays::No);
// #[weight = ((_a * 10 + _eb * 1) as Weight, DispatchClass::Normal, Pays::Yes)]
let info = Call::<TraitImpl>::f11 { _a: 13, _eb: 20 }.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(150)); // 13*10 + 20
assert_eq!(info.weight, Weight::from_parts(150, 0)); // 13*10 + 20
assert_eq!(info.class, DispatchClass::Normal);
assert_eq!(info.pays_fee, Pays::Yes);
// #[weight = (0, DispatchClass::Operational, Pays::Yes)]
let info = Call::<TraitImpl>::f12 { _a: 10, _eb: 20 }.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(0));
assert_eq!(info.weight, Weight::from_parts(0, 0));
assert_eq!(info.class, DispatchClass::Operational);
assert_eq!(info.pays_fee, Pays::Yes);
// #[weight = T::DbWeight::get().reads(3) + T::DbWeight::get().writes(2) + 10_000]
let info = Call::<TraitImpl>::f20 {}.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(12300)); // 100*3 + 1000*2 + 10_1000
assert_eq!(info.weight, Weight::from_parts(12300, 0)); // 100*3 + 1000*2 + 10_1000
assert_eq!(info.class, DispatchClass::Normal);
assert_eq!(info.pays_fee, Pays::Yes);
// #[weight = T::DbWeight::get().reads_writes(6, 5) + 40_000]
let info = Call::<TraitImpl>::f21 {}.get_dispatch_info();
assert_eq!(info.weight, Weight::from_ref_time(45600)); // 100*6 + 1000*5 + 40_1000
assert_eq!(info.weight, Weight::from_parts(45600, 0)); // 100*6 + 1000*5 + 40_1000
assert_eq!(info.class, DispatchClass::Normal);
assert_eq!(info.pays_fee, Pays::Yes);
}
#[test]
fn extract_actual_weight_works() {
let pre = DispatchInfo { weight: Weight::from_ref_time(1000), ..Default::default() };
assert_eq!(extract_actual_weight(&Ok(Some(7).into()), &pre), Weight::from_ref_time(7));
let pre = DispatchInfo { weight: Weight::from_parts(1000, 0), ..Default::default() };
assert_eq!(extract_actual_weight(&Ok(Some(7).into()), &pre), Weight::from_parts(7, 0));
assert_eq!(
extract_actual_weight(&Ok(Some(1000).into()), &pre),
Weight::from_ref_time(1000)
Weight::from_parts(1000, 0)
);
assert_eq!(
extract_actual_weight(
&Err(DispatchError::BadOrigin.with_weight(Weight::from_ref_time(9))),
&Err(DispatchError::BadOrigin.with_weight(Weight::from_parts(9, 0))),
&pre
),
Weight::from_ref_time(9)
Weight::from_parts(9, 0)
);
}
#[test]
fn extract_actual_weight_caps_at_pre_weight() {
let pre = DispatchInfo { weight: Weight::from_ref_time(1000), ..Default::default() };
let pre = DispatchInfo { weight: Weight::from_parts(1000, 0), ..Default::default() };
assert_eq!(
extract_actual_weight(&Ok(Some(1250).into()), &pre),
Weight::from_ref_time(1000)
Weight::from_parts(1000, 0)
);
assert_eq!(
extract_actual_weight(
&Err(DispatchError::BadOrigin.with_weight(Weight::from_ref_time(1300))),
&Err(DispatchError::BadOrigin.with_weight(Weight::from_parts(1300, 0))),
&pre
),
Weight::from_ref_time(1000),
Weight::from_parts(1000, 0),
);
}
#[test]
fn extract_actual_pays_fee_works() {
let pre = DispatchInfo { weight: Weight::from_ref_time(1000), ..Default::default() };
let pre = DispatchInfo { weight: Weight::from_parts(1000, 0), ..Default::default() };
assert_eq!(extract_actual_pays_fee(&Ok(Some(7).into()), &pre), Pays::Yes);
assert_eq!(extract_actual_pays_fee(&Ok(Some(1000).into()), &pre), Pays::Yes);
assert_eq!(extract_actual_pays_fee(&Ok((Some(1000), Pays::Yes).into()), &pre), Pays::Yes);
assert_eq!(extract_actual_pays_fee(&Ok((Some(1000), Pays::No).into()), &pre), Pays::No);
assert_eq!(
extract_actual_pays_fee(
&Err(DispatchError::BadOrigin.with_weight(Weight::from_ref_time(9))),
&Err(DispatchError::BadOrigin.with_weight(Weight::from_parts(9, 0))),
&pre
),
Pays::Yes
@@ -3686,7 +3686,7 @@ mod weight_tests {
);
let pre = DispatchInfo {
weight: Weight::from_ref_time(1000),
weight: Weight::from_parts(1000, 0),
pays_fee: Pays::No,
..Default::default()
};
+4 -4
View File
@@ -367,18 +367,18 @@ mod tests {
impl OnInitialize<u8> for Test {
fn on_initialize(_n: u8) -> Weight {
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
}
}
impl OnRuntimeUpgrade for Test {
fn on_runtime_upgrade() -> Weight {
Weight::from_ref_time(20)
Weight::from_parts(20, 0)
}
}
TestExternalities::default().execute_with(|| {
assert_eq!(<(Test, Test)>::on_initialize(0), Weight::from_ref_time(20));
assert_eq!(<(Test, Test)>::on_runtime_upgrade(), Weight::from_ref_time(40));
assert_eq!(<(Test, Test)>::on_initialize(0), Weight::from_parts(20, 0));
assert_eq!(<(Test, Test)>::on_runtime_upgrade(), Weight::from_parts(40, 0));
});
}
@@ -54,7 +54,7 @@ parameter_types! {
/// 95th: 384_876
/// 75th: 380_642
pub const BlockExecutionWeight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(381_015));
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(381_015), 0);
}
#[cfg(test)]
@@ -54,7 +54,7 @@ parameter_types! {
/// 95th: 100_051
/// 75th: 99_916
pub const ExtrinsicBaseWeight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(99_840));
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(99_840), 0);
}
#[cfg(test)]
@@ -508,7 +508,7 @@ fn call_weight_should_attach_to_call_enum() {
assert_eq!(
module3::Call::<Runtime>::operational {}.get_dispatch_info(),
DispatchInfo {
weight: Weight::from_ref_time(5),
weight: Weight::from_parts(5, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes
},
@@ -517,7 +517,7 @@ fn call_weight_should_attach_to_call_enum() {
assert_eq!(
module3::Call::<Runtime>::aux_4 {}.get_dispatch_info(),
DispatchInfo {
weight: Weight::from_ref_time(3),
weight: Weight::from_parts(3, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes
},
+9 -9
View File
@@ -171,7 +171,7 @@ pub mod pallet {
let _ = T::AccountId::from(SomeType1); // Test for where clause
let _ = T::AccountId::from(SomeType2); // Test for where clause
Self::deposit_event(Event::Something(10));
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
}
fn on_finalize(_: BlockNumberFor<T>) {
let _ = T::AccountId::from(SomeType1); // Test for where clause
@@ -182,7 +182,7 @@ pub mod pallet {
let _ = T::AccountId::from(SomeType1); // Test for where clause
let _ = T::AccountId::from(SomeType2); // Test for where clause
Self::deposit_event(Event::Something(30));
Weight::from_ref_time(30)
Weight::from_parts(30, 0)
}
fn integrity_test() {
let _ = T::AccountId::from(SomeType1); // Test for where clause
@@ -197,7 +197,7 @@ pub mod pallet {
{
/// Doc comment put in metadata
#[pallet::call_index(0)]
#[pallet::weight(Weight::from_ref_time(*_foo as u64))]
#[pallet::weight(Weight::from_parts(*_foo as u64, 0))]
pub fn foo(
origin: OriginFor<T>,
#[pallet::compact] _foo: u32,
@@ -715,7 +715,7 @@ fn call_expand() {
assert_eq!(
call_foo.get_dispatch_info(),
DispatchInfo {
weight: frame_support::weights::Weight::from_ref_time(3),
weight: frame_support::weights::Weight::from_parts(3, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes
}
@@ -1096,10 +1096,10 @@ fn pallet_hooks_expand() {
TestExternalities::default().execute_with(|| {
frame_system::Pallet::<Runtime>::set_block_number(1);
assert_eq!(AllPalletsWithoutSystem::on_initialize(1), Weight::from_ref_time(10));
assert_eq!(AllPalletsWithoutSystem::on_initialize(1), Weight::from_parts(10, 0));
AllPalletsWithoutSystem::on_finalize(1);
assert_eq!(AllPalletsWithoutSystem::on_runtime_upgrade(), Weight::from_ref_time(30));
assert_eq!(AllPalletsWithoutSystem::on_runtime_upgrade(), Weight::from_parts(30, 0));
assert_eq!(
frame_system::Pallet::<Runtime>::events()[0].event,
@@ -1137,13 +1137,13 @@ fn all_pallets_type_reversed_order_is_correct() {
{
assert_eq!(
AllPalletsWithoutSystemReversed::on_initialize(1),
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
);
AllPalletsWithoutSystemReversed::on_finalize(1);
assert_eq!(
AllPalletsWithoutSystemReversed::on_runtime_upgrade(),
Weight::from_ref_time(30)
Weight::from_parts(30, 0)
);
}
@@ -1219,7 +1219,7 @@ fn migrate_from_pallet_version_to_storage_version() {
};
// `pallet_num` pallets, 2 writes and every write costs 5 weight.
assert_eq!(Weight::from_ref_time(pallet_num * 2 * 5), weight);
assert_eq!(Weight::from_parts(pallet_num * 2 * 5, 0), weight);
// All pallet versions should be removed
assert!(sp_io::storage::get(&pallet_version_key(Example::name())).is_none());
@@ -85,7 +85,7 @@ mod pallet_old {
fn on_initialize(_n: T::BlockNumber) -> Weight {
<Dummy<T>>::put(T::Balance::from(10));
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
}
fn on_finalize(_n: T::BlockNumber) {
@@ -131,7 +131,7 @@ pub mod pallet {
impl<T: Config> Hooks<T::BlockNumber> for Pallet<T> {
fn on_initialize(_n: T::BlockNumber) -> Weight {
<Dummy<T>>::put(T::Balance::from(10));
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
}
fn on_finalize(_n: T::BlockNumber) {
@@ -72,7 +72,7 @@ mod pallet_old {
fn on_initialize(_n: T::BlockNumber) -> Weight {
<Dummy<T, I>>::put(T::Balance::from(10));
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
}
fn on_finalize(_n: T::BlockNumber) {
@@ -117,7 +117,7 @@ pub mod pallet {
impl<T: Config<I>, I: 'static> Hooks<T::BlockNumber> for Pallet<T, I> {
fn on_initialize(_n: T::BlockNumber) -> Weight {
<Dummy<T, I>>::put(T::Balance::from(10));
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
}
fn on_finalize(_n: T::BlockNumber) {
@@ -54,10 +54,10 @@ pub mod pallet {
fn on_initialize(_: BlockNumberFor<T>) -> Weight {
if TypeId::of::<I>() == TypeId::of::<()>() {
Self::deposit_event(Event::Something(10));
Weight::from_ref_time(10)
Weight::from_parts(10, 0)
} else {
Self::deposit_event(Event::Something(11));
Weight::from_ref_time(11)
Weight::from_parts(11, 0)
}
}
fn on_finalize(_: BlockNumberFor<T>) {
@@ -70,10 +70,10 @@ pub mod pallet {
fn on_runtime_upgrade() -> Weight {
if TypeId::of::<I>() == TypeId::of::<()>() {
Self::deposit_event(Event::Something(30));
Weight::from_ref_time(30)
Weight::from_parts(30, 0)
} else {
Self::deposit_event(Event::Something(31));
Weight::from_ref_time(31)
Weight::from_parts(31, 0)
}
}
fn integrity_test() {}
@@ -83,7 +83,7 @@ pub mod pallet {
impl<T: Config<I>, I: 'static> Pallet<T, I> {
/// Doc comment put in metadata
#[pallet::call_index(0)]
#[pallet::weight(Weight::from_ref_time(*_foo as u64))]
#[pallet::weight(Weight::from_parts(*_foo as u64, 0))]
pub fn foo(
origin: OriginFor<T>,
#[pallet::compact] _foo: u32,
@@ -356,7 +356,7 @@ fn call_expand() {
assert_eq!(
call_foo.get_dispatch_info(),
DispatchInfo {
weight: Weight::from_ref_time(3),
weight: Weight::from_parts(3, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes
}
@@ -368,7 +368,7 @@ fn call_expand() {
assert_eq!(
call_foo.get_dispatch_info(),
DispatchInfo {
weight: Weight::from_ref_time(3),
weight: Weight::from_parts(3, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes
}
@@ -649,10 +649,10 @@ fn pallet_hooks_expand() {
TestExternalities::default().execute_with(|| {
frame_system::Pallet::<Runtime>::set_block_number(1);
assert_eq!(AllPalletsWithoutSystem::on_initialize(1), Weight::from_ref_time(21));
assert_eq!(AllPalletsWithoutSystem::on_initialize(1), Weight::from_parts(21, 0));
AllPalletsWithoutSystem::on_finalize(1);
assert_eq!(AllPalletsWithoutSystem::on_runtime_upgrade(), Weight::from_ref_time(61));
assert_eq!(AllPalletsWithoutSystem::on_runtime_upgrade(), Weight::from_parts(61, 0));
assert_eq!(
frame_system::Pallet::<Runtime>::events()[0].event,
@@ -130,7 +130,7 @@ mod tests {
fn signed_ext_check_era_should_change_longevity() {
new_test_ext().execute_with(|| {
let normal = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes,
};
@@ -308,7 +308,7 @@ mod tests {
new_test_ext().execute_with(|| {
let max = DispatchInfo {
weight: block_weights().get(DispatchClass::Normal).max_extrinsic.unwrap() +
Weight::from_ref_time(1),
Weight::from_parts(1, 0),
class: DispatchClass::Normal,
..Default::default()
};
@@ -334,7 +334,7 @@ mod tests {
let okay =
DispatchInfo { weight, class: DispatchClass::Operational, ..Default::default() };
let max = DispatchInfo {
weight: weight + Weight::from_ref_time(1),
weight: weight + Weight::from_parts(1, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -366,9 +366,9 @@ mod tests {
// So normal extrinsic can be 758 weight (-5 for base extrinsic weight)
// And Operational can be 246 to produce a full block (-10 for base)
let max_normal =
DispatchInfo { weight: Weight::from_ref_time(753), ..Default::default() };
DispatchInfo { weight: Weight::from_parts(753, 0), ..Default::default() };
let rest_operational = DispatchInfo {
weight: Weight::from_ref_time(246),
weight: Weight::from_parts(246, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -376,9 +376,9 @@ mod tests {
let len = 0_usize;
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&max_normal, len));
assert_eq!(System::block_weight().total(), Weight::from_ref_time(768));
assert_eq!(System::block_weight().total(), Weight::from_parts(768, 0));
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&rest_operational, len));
assert_eq!(block_weight_limit(), Weight::from_ref_time(1024).set_proof_size(u64::MAX));
assert_eq!(block_weight_limit(), Weight::from_parts(1024, u64::MAX));
assert_eq!(System::block_weight().total(), block_weight_limit().set_proof_size(0));
// Checking single extrinsic should not take current block weight into account.
assert_eq!(CheckWeight::<Test>::check_extrinsic_weight(&rest_operational), Ok(()));
@@ -390,9 +390,9 @@ mod tests {
new_test_ext().execute_with(|| {
// We switch the order of `full_block_with_normal_and_operational`
let max_normal =
DispatchInfo { weight: Weight::from_ref_time(753), ..Default::default() };
DispatchInfo { weight: Weight::from_parts(753, 0), ..Default::default() };
let rest_operational = DispatchInfo {
weight: Weight::from_ref_time(246),
weight: Weight::from_parts(246, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -401,9 +401,9 @@ mod tests {
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&rest_operational, len));
// Extra 20 here from block execution + base extrinsic weight
assert_eq!(System::block_weight().total(), Weight::from_ref_time(266));
assert_eq!(System::block_weight().total(), Weight::from_parts(266, 0));
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&max_normal, len));
assert_eq!(block_weight_limit(), Weight::from_ref_time(1024).set_proof_size(u64::MAX));
assert_eq!(block_weight_limit(), Weight::from_parts(1024, u64::MAX));
assert_eq!(System::block_weight().total(), block_weight_limit().set_proof_size(0));
});
}
@@ -414,12 +414,12 @@ mod tests {
// An on_initialize takes up the whole block! (Every time!)
System::register_extra_weight_unchecked(Weight::MAX, DispatchClass::Mandatory);
let dispatch_normal = DispatchInfo {
weight: Weight::from_ref_time(251),
weight: Weight::from_parts(251, 0),
class: DispatchClass::Normal,
..Default::default()
};
let dispatch_operational = DispatchInfo {
weight: Weight::from_ref_time(246),
weight: Weight::from_parts(246, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -445,9 +445,9 @@ mod tests {
#[test]
fn signed_ext_check_weight_works_operational_tx() {
new_test_ext().execute_with(|| {
let normal = DispatchInfo { weight: Weight::from_ref_time(100), ..Default::default() };
let normal = DispatchInfo { weight: Weight::from_parts(100, 0), ..Default::default() };
let op = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -513,12 +513,12 @@ mod tests {
fn signed_ext_check_weight_works_normal_tx() {
new_test_ext().execute_with(|| {
let normal_limit = normal_weight_limit();
let small = DispatchInfo { weight: Weight::from_ref_time(100), ..Default::default() };
let small = DispatchInfo { weight: Weight::from_parts(100, 0), ..Default::default() };
let base_extrinsic = block_weights().get(DispatchClass::Normal).base_extrinsic;
let medium =
DispatchInfo { weight: normal_limit - base_extrinsic, ..Default::default() };
let big = DispatchInfo {
weight: normal_limit - base_extrinsic + Weight::from_ref_time(1),
weight: normal_limit - base_extrinsic + Weight::from_parts(1, 0),
..Default::default()
};
let len = 0_usize;
@@ -537,7 +537,7 @@ mod tests {
reset_check_weight(&small, false, Weight::zero());
reset_check_weight(&medium, false, Weight::zero());
reset_check_weight(&big, true, Weight::from_ref_time(1));
reset_check_weight(&big, true, Weight::from_parts(1, 0));
})
}
@@ -545,9 +545,9 @@ mod tests {
fn signed_ext_check_weight_refund_works() {
new_test_ext().execute_with(|| {
// This is half of the max block weight
let info = DispatchInfo { weight: Weight::from_ref_time(512), ..Default::default() };
let info = DispatchInfo { weight: Weight::from_parts(512, 0), ..Default::default() };
let post_info = PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(128)),
actual_weight: Some(Weight::from_parts(128, 0)),
pays_fee: Default::default(),
};
let len = 0_usize;
@@ -557,13 +557,13 @@ mod tests {
BlockWeight::<Test>::mutate(|current_weight| {
current_weight.set(Weight::zero(), DispatchClass::Mandatory);
current_weight
.set(Weight::from_ref_time(256) - base_extrinsic, DispatchClass::Normal);
.set(Weight::from_parts(256, 0) - base_extrinsic, DispatchClass::Normal);
});
let pre = CheckWeight::<Test>(PhantomData).pre_dispatch(&1, CALL, &info, len).unwrap();
assert_eq!(
BlockWeight::<Test>::get().total(),
info.weight + Weight::from_ref_time(256)
info.weight + Weight::from_parts(256, 0)
);
assert_ok!(CheckWeight::<Test>::post_dispatch(
@@ -575,7 +575,7 @@ mod tests {
));
assert_eq!(
BlockWeight::<Test>::get().total(),
post_info.actual_weight.unwrap() + Weight::from_ref_time(256)
post_info.actual_weight.unwrap() + Weight::from_parts(256, 0)
);
})
}
@@ -583,23 +583,23 @@ mod tests {
#[test]
fn signed_ext_check_weight_actual_weight_higher_than_max_is_capped() {
new_test_ext().execute_with(|| {
let info = DispatchInfo { weight: Weight::from_ref_time(512), ..Default::default() };
let info = DispatchInfo { weight: Weight::from_parts(512, 0), ..Default::default() };
let post_info = PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(700)),
actual_weight: Some(Weight::from_parts(700, 0)),
pays_fee: Default::default(),
};
let len = 0_usize;
BlockWeight::<Test>::mutate(|current_weight| {
current_weight.set(Weight::zero(), DispatchClass::Mandatory);
current_weight.set(Weight::from_ref_time(128), DispatchClass::Normal);
current_weight.set(Weight::from_parts(128, 0), DispatchClass::Normal);
});
let pre = CheckWeight::<Test>(PhantomData).pre_dispatch(&1, CALL, &info, len).unwrap();
assert_eq!(
BlockWeight::<Test>::get().total(),
info.weight +
Weight::from_ref_time(128) +
Weight::from_parts(128, 0) +
block_weights().get(DispatchClass::Normal).base_extrinsic,
);
@@ -613,7 +613,7 @@ mod tests {
assert_eq!(
BlockWeight::<Test>::get().total(),
info.weight +
Weight::from_ref_time(128) +
Weight::from_parts(128, 0) +
block_weights().get(DispatchClass::Normal).base_extrinsic,
);
})
@@ -643,9 +643,9 @@ mod tests {
// Max normal is 768 (75%)
// Max mandatory is unlimited
let max_normal =
DispatchInfo { weight: Weight::from_ref_time(753), ..Default::default() };
DispatchInfo { weight: Weight::from_parts(753, 0), ..Default::default() };
let mandatory = DispatchInfo {
weight: Weight::from_ref_time(1019),
weight: Weight::from_parts(1019, 0),
class: DispatchClass::Mandatory,
..Default::default()
};
@@ -653,10 +653,10 @@ mod tests {
let len = 0_usize;
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&max_normal, len));
assert_eq!(System::block_weight().total(), Weight::from_ref_time(768));
assert_eq!(System::block_weight().total(), Weight::from_parts(768, 0));
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&mandatory, len));
assert_eq!(block_weight_limit(), Weight::from_ref_time(1024).set_proof_size(u64::MAX));
assert_eq!(System::block_weight().total(), Weight::from_ref_time(1024 + 768));
assert_eq!(block_weight_limit(), Weight::from_parts(1024, u64::MAX));
assert_eq!(System::block_weight().total(), Weight::from_parts(1024 + 768, 0));
assert_eq!(CheckWeight::<Test>::check_extrinsic_weight(&mandatory), Ok(()));
});
}
@@ -668,30 +668,30 @@ mod tests {
.base_block(Weight::zero())
.for_class(DispatchClass::non_mandatory(), |w| {
w.base_extrinsic = Weight::zero();
w.max_total = Some(Weight::from_ref_time(20).set_proof_size(u64::MAX));
w.max_total = Some(Weight::from_parts(20, u64::MAX));
})
.for_class(DispatchClass::Mandatory, |w| {
w.base_extrinsic = Weight::zero();
w.reserved = Some(Weight::from_ref_time(5).set_proof_size(u64::MAX));
w.reserved = Some(Weight::from_parts(5, u64::MAX));
w.max_total = None;
})
.build_or_panic();
let all_weight = crate::ConsumedWeight::new(|class| match class {
DispatchClass::Normal => Weight::from_ref_time(10),
DispatchClass::Operational => Weight::from_ref_time(10),
DispatchClass::Normal => Weight::from_parts(10, 0),
DispatchClass::Operational => Weight::from_parts(10, 0),
DispatchClass::Mandatory => Weight::zero(),
});
assert_eq!(maximum_weight.max_block, all_weight.total().set_proof_size(u64::MAX));
// fits into reserved
let mandatory1 = DispatchInfo {
weight: Weight::from_ref_time(5),
weight: Weight::from_parts(5, 0),
class: DispatchClass::Mandatory,
..Default::default()
};
// does not fit into reserved and the block is full.
let mandatory2 = DispatchInfo {
weight: Weight::from_ref_time(6),
weight: Weight::from_parts(6, 0),
class: DispatchClass::Mandatory,
..Default::default()
};
+4 -4
View File
@@ -41,7 +41,7 @@ frame_support::construct_runtime!(
);
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
const MAX_BLOCK_WEIGHT: Weight = Weight::from_ref_time(1024).set_proof_size(u64::MAX);
const MAX_BLOCK_WEIGHT: Weight = Weight::from_parts(1024, u64::MAX);
parameter_types! {
pub Version: RuntimeVersion = RuntimeVersion {
@@ -59,15 +59,15 @@ parameter_types! {
write: 100,
};
pub RuntimeBlockWeights: limits::BlockWeights = limits::BlockWeights::builder()
.base_block(Weight::from_ref_time(10))
.base_block(Weight::from_parts(10, 0))
.for_class(DispatchClass::all(), |weights| {
weights.base_extrinsic = Weight::from_ref_time(5);
weights.base_extrinsic = Weight::from_parts(5, 0);
})
.for_class(DispatchClass::Normal, |weights| {
weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAX_BLOCK_WEIGHT);
})
.for_class(DispatchClass::Operational, |weights| {
weights.base_extrinsic = Weight::from_ref_time(10);
weights.base_extrinsic = Weight::from_parts(10, 0);
weights.max_total = Some(MAX_BLOCK_WEIGHT);
weights.reserved = Some(
MAX_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAX_BLOCK_WEIGHT
+17 -17
View File
@@ -233,7 +233,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
let normal_base = <Test as crate::Config>::BlockWeights::get()
.get(DispatchClass::Normal)
.base_extrinsic;
let pre_info = DispatchInfo { weight: Weight::from_ref_time(1000), ..Default::default() };
let pre_info = DispatchInfo { weight: Weight::from_parts(1000, 0), ..Default::default() };
System::note_applied_extrinsic(&Ok(Some(300).into()), pre_info);
System::note_applied_extrinsic(&Ok(Some(1000).into()), pre_info);
System::note_applied_extrinsic(
@@ -246,7 +246,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
System::note_applied_extrinsic(&Ok((Some(2_500_000), Pays::No).into()), pre_info);
System::note_applied_extrinsic(&Ok((Some(500), Pays::No).into()), pre_info);
System::note_applied_extrinsic(
&Err(DispatchError::BadOrigin.with_weight(Weight::from_ref_time(999))),
&Err(DispatchError::BadOrigin.with_weight(Weight::from_parts(999, 0))),
pre_info,
);
@@ -260,7 +260,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
System::note_applied_extrinsic(
&Err(DispatchErrorWithPostInfo {
post_info: PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(800)),
actual_weight: Some(Weight::from_parts(800, 0)),
pays_fee: Pays::Yes,
},
error: DispatchError::BadOrigin,
@@ -270,7 +270,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
System::note_applied_extrinsic(
&Err(DispatchErrorWithPostInfo {
post_info: PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(800)),
actual_weight: Some(Weight::from_parts(800, 0)),
pays_fee: Pays::No,
},
error: DispatchError::BadOrigin,
@@ -283,7 +283,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
.base_extrinsic;
assert!(normal_base != operational_base, "Test pre-condition violated");
let pre_info = DispatchInfo {
weight: Weight::from_ref_time(1000),
weight: Weight::from_parts(1000, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -295,7 +295,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(0),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(300).saturating_add(normal_base),
weight: Weight::from_parts(300, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -306,7 +306,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(1),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -317,7 +317,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(2),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -328,7 +328,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(3),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::Yes,
..Default::default()
},
@@ -340,7 +340,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(4),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -352,7 +352,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(5),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -364,7 +364,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(6),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(500).saturating_add(normal_base),
weight: Weight::from_parts(500, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -377,7 +377,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(999).saturating_add(normal_base),
weight: Weight::from_parts(999, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -389,7 +389,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::Yes,
..Default::default()
},
@@ -402,7 +402,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(800).saturating_add(normal_base),
weight: Weight::from_parts(800, 0).saturating_add(normal_base),
pays_fee: Pays::Yes,
..Default::default()
},
@@ -415,7 +415,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(800).saturating_add(normal_base),
weight: Weight::from_parts(800, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -427,7 +427,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(11),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(300).saturating_add(operational_base),
weight: Weight::from_parts(300, 0).saturating_add(operational_base),
class: DispatchClass::Operational,
..Default::default()
},
+20 -20
View File
@@ -65,9 +65,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_018 nanoseconds.
Weight::from_ref_time(2_091_000)
Weight::from_parts(2_091_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(362).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(362, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
@@ -75,9 +75,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_449 nanoseconds.
Weight::from_ref_time(7_748_000)
Weight::from_parts(7_748_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_423).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_423, 0).saturating_mul(b.into()))
}
/// Storage: System Digest (r:1 w:1)
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
@@ -100,9 +100,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_981 nanoseconds.
Weight::from_ref_time(2_114_000)
Weight::from_parts(2_114_000, 0)
// Standard Error: 804
.saturating_add(Weight::from_ref_time(631_438).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(631_438, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -113,9 +113,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_061 nanoseconds.
Weight::from_ref_time(2_153_000)
Weight::from_parts(2_153_000, 0)
// Standard Error: 952
.saturating_add(Weight::from_ref_time(502_629).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(502_629, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -128,9 +128,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 4_026 nanoseconds.
Weight::from_parts(4_174_000, 121)
// Standard Error: 1_148
.saturating_add(Weight::from_ref_time(1_093_099).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(1_093_099, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(70).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
}
@@ -142,9 +142,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_018 nanoseconds.
Weight::from_ref_time(2_091_000)
Weight::from_parts(2_091_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(362).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(362, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
@@ -152,9 +152,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_449 nanoseconds.
Weight::from_ref_time(7_748_000)
Weight::from_parts(7_748_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_423).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_423, 0).saturating_mul(b.into()))
}
/// Storage: System Digest (r:1 w:1)
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
@@ -177,9 +177,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_981 nanoseconds.
Weight::from_ref_time(2_114_000)
Weight::from_parts(2_114_000, 0)
// Standard Error: 804
.saturating_add(Weight::from_ref_time(631_438).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(631_438, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -190,9 +190,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_061 nanoseconds.
Weight::from_ref_time(2_153_000)
Weight::from_parts(2_153_000, 0)
// Standard Error: 952
.saturating_add(Weight::from_ref_time(502_629).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(502_629, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -205,8 +205,8 @@ impl WeightInfo for () {
// Minimum execution time: 4_026 nanoseconds.
Weight::from_parts(4_174_000, 121)
// Standard Error: 1_148
.saturating_add(Weight::from_ref_time(1_093_099).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(1_093_099, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(70).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
}
+2 -2
View File
@@ -73,7 +73,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `161`
// Estimated: `0`
// Minimum execution time: 3_927 nanoseconds.
Weight::from_ref_time(4_078_000)
Weight::from_parts(4_078_000, 0)
}
}
@@ -97,6 +97,6 @@ impl WeightInfo for () {
// Measured: `161`
// Estimated: `0`
// Minimum execution time: 3_927 nanoseconds.
Weight::from_ref_time(4_078_000)
Weight::from_parts(4_078_000, 0)
}
}
+18 -18
View File
@@ -71,7 +71,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 23_262 nanoseconds.
Weight::from_parts(24_104_224, 4958)
// Standard Error: 148
.saturating_add(Weight::from_ref_time(1_963).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(1_963, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -103,12 +103,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 18_382 nanoseconds.
Weight::from_parts(18_195_288, 4644)
// Standard Error: 103
.saturating_add(Weight::from_ref_time(2_096).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(2_096, 0).saturating_mul(r.into()))
// Standard Error: 2_469
.saturating_add(Weight::from_ref_time(97_092).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(97_092, 0).saturating_mul(t.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(t.into()))
}
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -122,10 +122,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 13_564 nanoseconds.
Weight::from_parts(13_867_280, 4592)
// Standard Error: 4_245
.saturating_add(Weight::from_ref_time(206_587).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(206_587, 0).saturating_mul(t.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(224).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into()))
}
/// Storage: Tips Tips (r:1 w:1)
/// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured)
@@ -143,10 +143,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 39_902 nanoseconds.
Weight::from_parts(40_747_650, 8096)
// Standard Error: 5_322
.saturating_add(Weight::from_ref_time(144_298).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(144_298, 0).saturating_mul(t.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(336).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 336).saturating_mul(t.into()))
}
/// Storage: Tips Tips (r:1 w:1)
/// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured)
@@ -160,7 +160,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 13_511 nanoseconds.
Weight::from_parts(14_114_101, 3077)
// Standard Error: 1_815
.saturating_add(Weight::from_ref_time(7_825).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(7_825, 0).saturating_mul(t.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -180,7 +180,7 @@ impl WeightInfo for () {
// Minimum execution time: 23_262 nanoseconds.
Weight::from_parts(24_104_224, 4958)
// Standard Error: 148
.saturating_add(Weight::from_ref_time(1_963).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(1_963, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -212,12 +212,12 @@ impl WeightInfo for () {
// Minimum execution time: 18_382 nanoseconds.
Weight::from_parts(18_195_288, 4644)
// Standard Error: 103
.saturating_add(Weight::from_ref_time(2_096).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(2_096, 0).saturating_mul(r.into()))
// Standard Error: 2_469
.saturating_add(Weight::from_ref_time(97_092).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(97_092, 0).saturating_mul(t.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(192).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 192).saturating_mul(t.into()))
}
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
@@ -231,10 +231,10 @@ impl WeightInfo for () {
// Minimum execution time: 13_564 nanoseconds.
Weight::from_parts(13_867_280, 4592)
// Standard Error: 4_245
.saturating_add(Weight::from_ref_time(206_587).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(206_587, 0).saturating_mul(t.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(224).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 224).saturating_mul(t.into()))
}
/// Storage: Tips Tips (r:1 w:1)
/// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured)
@@ -252,10 +252,10 @@ impl WeightInfo for () {
// Minimum execution time: 39_902 nanoseconds.
Weight::from_parts(40_747_650, 8096)
// Standard Error: 5_322
.saturating_add(Weight::from_ref_time(144_298).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(144_298, 0).saturating_mul(t.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(336).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 336).saturating_mul(t.into()))
}
/// Storage: Tips Tips (r:1 w:1)
/// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured)
@@ -269,7 +269,7 @@ impl WeightInfo for () {
// Minimum execution time: 13_511 nanoseconds.
Weight::from_parts(14_114_101, 3077)
// Standard Error: 1_815
.saturating_add(Weight::from_ref_time(7_825).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(7_825, 0).saturating_mul(t.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -67,7 +67,7 @@ impl Get<frame_system::limits::BlockWeights> for BlockWeights {
weights.base_extrinsic = ExtrinsicBaseWeight::get().into();
})
.for_class(DispatchClass::non_mandatory(), |weights| {
weights.max_total = Weight::from_ref_time(1024).set_proof_size(u64::MAX).into();
weights.max_total = Weight::from_parts(1024, u64::MAX).into();
})
.build_or_panic()
}
@@ -41,7 +41,7 @@ impl Default for ExtBuilder {
fn default() -> Self {
Self {
balance_factor: 1,
base_weight: Weight::from_ref_time(0),
base_weight: Weight::from_parts(0, 0),
byte_fee: 1,
weight_to_fee: 1,
}
@@ -112,19 +112,19 @@ fn transaction_payment_in_native_possible() {
let balance_factor = 100;
ExtBuilder::default()
.balance_factor(balance_factor)
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.build()
.execute_with(|| {
let len = 10;
let pre = ChargeAssetTxPayment::<Runtime>::from(0, None)
.pre_dispatch(&1, CALL, &info_from_weight(Weight::from_ref_time(5)), len)
.pre_dispatch(&1, CALL, &info_from_weight(Weight::from_parts(5, 0)), len)
.unwrap();
let initial_balance = 10 * balance_factor;
assert_eq!(Balances::free_balance(1), initial_balance - 5 - 5 - 10);
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(5)),
&info_from_weight(Weight::from_parts(5, 0)),
&default_post_info(),
len,
&Ok(())
@@ -132,15 +132,15 @@ fn transaction_payment_in_native_possible() {
assert_eq!(Balances::free_balance(1), initial_balance - 5 - 5 - 10);
let pre = ChargeAssetTxPayment::<Runtime>::from(5 /* tipped */, None)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_ref_time(100)), len)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_parts(100, 0)), len)
.unwrap();
let initial_balance_for_2 = 20 * balance_factor;
assert_eq!(Balances::free_balance(2), initial_balance_for_2 - 5 - 10 - 100 - 5);
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(100)),
&post_info_from_weight(Weight::from_ref_time(50)),
&info_from_weight(Weight::from_parts(100, 0)),
&post_info_from_weight(Weight::from_parts(50, 0)),
len,
&Ok(())
));
@@ -154,7 +154,7 @@ fn transaction_payment_in_asset_possible() {
let balance_factor = 100;
ExtBuilder::default()
.balance_factor(balance_factor)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -180,7 +180,7 @@ fn transaction_payment_in_asset_possible() {
// existential deposit
let fee = (base_weight + weight + len as u64) * min_balance / ExistentialDeposit::get();
let pre = ChargeAssetTxPayment::<Runtime>::from(0, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.unwrap();
// assert that native balance is not used
assert_eq!(Balances::free_balance(caller), 10 * balance_factor);
@@ -190,7 +190,7 @@ fn transaction_payment_in_asset_possible() {
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
&default_post_info(),
len,
&Ok(())
@@ -207,7 +207,7 @@ fn transaction_payment_without_fee() {
let balance_factor = 100;
ExtBuilder::default()
.balance_factor(balance_factor)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -233,7 +233,7 @@ fn transaction_payment_without_fee() {
// existential deposit
let fee = (base_weight + weight + len as u64) * min_balance / ExistentialDeposit::get();
let pre = ChargeAssetTxPayment::<Runtime>::from(0, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.unwrap();
// assert that native balance is not used
assert_eq!(Balances::free_balance(caller), 10 * balance_factor);
@@ -243,7 +243,7 @@ fn transaction_payment_without_fee() {
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
&post_info_from_pays(Pays::No),
len,
&Ok(())
@@ -260,7 +260,7 @@ fn asset_transaction_payment_with_tip_and_refund() {
let base_weight = 5;
ExtBuilder::default()
.balance_factor(100)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -288,15 +288,15 @@ fn asset_transaction_payment_with_tip_and_refund() {
let fee_with_tip =
(base_weight + weight + len as u64 + tip) * min_balance / ExistentialDeposit::get();
let pre = ChargeAssetTxPayment::<Runtime>::from(tip, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.unwrap();
assert_eq!(Assets::balance(asset_id, caller), balance - fee_with_tip);
let final_weight = 50;
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(weight)),
&post_info_from_weight(Weight::from_ref_time(final_weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
&post_info_from_weight(Weight::from_parts(final_weight, 0)),
len,
&Ok(())
));
@@ -312,7 +312,7 @@ fn payment_from_account_with_only_assets() {
let base_weight = 5;
ExtBuilder::default()
.balance_factor(100)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -340,7 +340,7 @@ fn payment_from_account_with_only_assets() {
// existential deposit
let fee = (base_weight + weight + len as u64) * min_balance / ExistentialDeposit::get();
let pre = ChargeAssetTxPayment::<Runtime>::from(0, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.unwrap();
assert_eq!(Balances::free_balance(caller), 0);
// check that fee was charged in the given asset
@@ -348,7 +348,7 @@ fn payment_from_account_with_only_assets() {
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
&default_post_info(),
len,
&Ok(())
@@ -363,7 +363,7 @@ fn payment_only_with_existing_sufficient_asset() {
let base_weight = 5;
ExtBuilder::default()
.balance_factor(100)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
let asset_id = 1;
@@ -372,7 +372,7 @@ fn payment_only_with_existing_sufficient_asset() {
let len = 10;
// pre_dispatch fails for non-existent asset
assert!(ChargeAssetTxPayment::<Runtime>::from(0, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.is_err());
// create the non-sufficient asset
@@ -386,7 +386,7 @@ fn payment_only_with_existing_sufficient_asset() {
));
// pre_dispatch fails for non-sufficient asset
assert!(ChargeAssetTxPayment::<Runtime>::from(0, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.is_err());
});
}
@@ -396,7 +396,7 @@ fn converted_fee_is_never_zero_if_input_fee_is_not() {
let base_weight = 1;
ExtBuilder::default()
.balance_factor(100)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -440,14 +440,14 @@ fn converted_fee_is_never_zero_if_input_fee_is_not() {
assert_eq!(Assets::balance(asset_id, caller), balance);
}
let pre = ChargeAssetTxPayment::<Runtime>::from(0, Some(asset_id))
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_ref_time(weight)), len)
.pre_dispatch(&caller, CALL, &info_from_weight(Weight::from_parts(weight, 0)), len)
.unwrap();
// check that at least one coin was charged in the given asset
assert_eq!(Assets::balance(asset_id, caller), balance - 1);
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
&default_post_info(),
len,
&Ok(())
@@ -461,7 +461,7 @@ fn post_dispatch_fee_is_zero_if_pre_dispatch_fee_is_zero() {
let base_weight = 1;
ExtBuilder::default()
.balance_factor(100)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -518,7 +518,7 @@ fn post_dispatch_fee_is_zero_if_unsigned_pre_dispatch_fee_is_zero() {
let base_weight = 1;
ExtBuilder::default()
.balance_factor(100)
.base_weight(Weight::from_ref_time(base_weight))
.base_weight(Weight::from_parts(base_weight, 0))
.build()
.execute_with(|| {
// create the asset
@@ -542,7 +542,7 @@ fn post_dispatch_fee_is_zero_if_unsigned_pre_dispatch_fee_is_zero() {
let len = 1;
ChargeAssetTxPayment::<Runtime>::pre_dispatch_unsigned(
CALL,
&info_from_weight(Weight::from_ref_time(weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
len,
)
.unwrap();
@@ -553,7 +553,7 @@ fn post_dispatch_fee_is_zero_if_unsigned_pre_dispatch_fee_is_zero() {
// initial fee)
assert_ok!(ChargeAssetTxPayment::<Runtime>::post_dispatch(
None,
&info_from_weight(Weight::from_ref_time(weight)),
&info_from_weight(Weight::from_parts(weight, 0)),
&post_info_from_pays(Pays::Yes),
len,
&Ok(())
@@ -614,7 +614,7 @@ where
/// Compute the length portion of a fee by invoking the configured `LengthToFee` impl.
pub fn length_to_fee(length: u32) -> BalanceOf<T> {
T::LengthToFee::weight_to_fee(&Weight::from_ref_time(length as u64))
T::LengthToFee::weight_to_fee(&Weight::from_parts(length as u64, 0))
}
/// Compute the unadjusted portion of the weight fee by invoking the configured `WeightToFee`
@@ -64,7 +64,7 @@ impl Get<frame_system::limits::BlockWeights> for BlockWeights {
weights.base_extrinsic = ExtrinsicBaseWeight::get().into();
})
.for_class(DispatchClass::non_mandatory(), |weights| {
weights.max_total = Weight::from_ref_time(1024).set_proof_size(u64::MAX).into();
weights.max_total = Weight::from_parts(1024, u64::MAX).into();
})
.build_or_panic()
}
@@ -129,18 +129,18 @@ fn default_post_info() -> PostDispatchInfo {
fn signed_extension_transaction_payment_work() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.build()
.execute_with(|| {
let len = 10;
let pre = ChargeTransactionPayment::<Runtime>::from(0)
.pre_dispatch(&1, CALL, &info_from_weight(Weight::from_ref_time(5)), len)
.pre_dispatch(&1, CALL, &info_from_weight(Weight::from_parts(5, 0)), len)
.unwrap();
assert_eq!(Balances::free_balance(1), 100 - 5 - 5 - 10);
assert_ok!(ChargeTransactionPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(5)),
&info_from_weight(Weight::from_parts(5, 0)),
&default_post_info(),
len,
&Ok(())
@@ -152,14 +152,14 @@ fn signed_extension_transaction_payment_work() {
FeeUnbalancedAmount::mutate(|a| *a = 0);
let pre = ChargeTransactionPayment::<Runtime>::from(5 /* tipped */)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_ref_time(100)), len)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_parts(100, 0)), len)
.unwrap();
assert_eq!(Balances::free_balance(2), 200 - 5 - 10 - 100 - 5);
assert_ok!(ChargeTransactionPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(100)),
&post_info_from_weight(Weight::from_ref_time(50)),
&info_from_weight(Weight::from_parts(100, 0)),
&post_info_from_weight(Weight::from_parts(50, 0)),
len,
&Ok(())
));
@@ -173,22 +173,22 @@ fn signed_extension_transaction_payment_work() {
fn signed_extension_transaction_payment_multiplied_refund_works() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.build()
.execute_with(|| {
let len = 10;
<NextFeeMultiplier<Runtime>>::put(Multiplier::saturating_from_rational(3, 2));
let pre = ChargeTransactionPayment::<Runtime>::from(5 /* tipped */)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_ref_time(100)), len)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_parts(100, 0)), len)
.unwrap();
// 5 base fee, 10 byte fee, 3/2 * 100 weight fee, 5 tip
assert_eq!(Balances::free_balance(2), 200 - 5 - 10 - 150 - 5);
assert_ok!(ChargeTransactionPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(100)),
&post_info_from_weight(Weight::from_ref_time(50)),
&info_from_weight(Weight::from_parts(100, 0)),
&post_info_from_weight(Weight::from_parts(50, 0)),
len,
&Ok(())
));
@@ -219,7 +219,7 @@ fn signed_extension_transaction_payment_is_bounded() {
#[test]
fn signed_extension_allows_free_transactions() {
ExtBuilder::default()
.base_weight(Weight::from_ref_time(100))
.base_weight(Weight::from_parts(100, 0))
.balance_factor(0)
.build()
.execute_with(|| {
@@ -230,7 +230,7 @@ fn signed_extension_allows_free_transactions() {
// This is a completely free (and thus wholly insecure/DoS-ridden) transaction.
let operational_transaction = DispatchInfo {
weight: Weight::from_ref_time(0),
weight: Weight::from_parts(0, 0),
class: DispatchClass::Operational,
pays_fee: Pays::No,
};
@@ -243,7 +243,7 @@ fn signed_extension_allows_free_transactions() {
// like a InsecureFreeNormal
let free_transaction = DispatchInfo {
weight: Weight::from_ref_time(0),
weight: Weight::from_parts(0, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes,
};
@@ -262,7 +262,7 @@ fn signed_extension_allows_free_transactions() {
#[test]
fn signed_ext_length_fee_is_also_updated_per_congestion() {
ExtBuilder::default()
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.balance_factor(10)
.build()
.execute_with(|| {
@@ -271,7 +271,7 @@ fn signed_ext_length_fee_is_also_updated_per_congestion() {
let len = 10;
assert_ok!(ChargeTransactionPayment::<Runtime>::from(10) // tipped
.pre_dispatch(&1, CALL, &info_from_weight(Weight::from_ref_time(3)), len));
.pre_dispatch(&1, CALL, &info_from_weight(Weight::from_parts(3, 0)), len));
assert_eq!(
Balances::free_balance(1),
100 // original
@@ -297,7 +297,7 @@ fn query_info_and_fee_details_works() {
let unsigned_xt_info = unsigned_xt.get_dispatch_info();
ExtBuilder::default()
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.weight_fee(2)
.build()
.execute_with(|| {
@@ -354,7 +354,7 @@ fn query_call_info_and_fee_details_works() {
let len = encoded_call.len() as u32;
ExtBuilder::default()
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.weight_fee(2)
.build()
.execute_with(|| {
@@ -392,7 +392,7 @@ fn query_call_info_and_fee_details_works() {
#[test]
fn compute_fee_works_without_multiplier() {
ExtBuilder::default()
.base_weight(Weight::from_ref_time(100))
.base_weight(Weight::from_parts(100, 0))
.byte_fee(10)
.balance_factor(0)
.build()
@@ -402,14 +402,14 @@ fn compute_fee_works_without_multiplier() {
// Tip only, no fees works
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(0),
weight: Weight::from_parts(0, 0),
class: DispatchClass::Operational,
pays_fee: Pays::No,
};
assert_eq!(Pallet::<Runtime>::compute_fee(0, &dispatch_info, 10), 10);
// No tip, only base fee works
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(0),
weight: Weight::from_parts(0, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -420,7 +420,7 @@ fn compute_fee_works_without_multiplier() {
assert_eq!(Pallet::<Runtime>::compute_fee(42, &dispatch_info, 0), 520);
// Weight fee + base fee works
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(1000),
weight: Weight::from_parts(1000, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -431,7 +431,7 @@ fn compute_fee_works_without_multiplier() {
#[test]
fn compute_fee_works_with_multiplier() {
ExtBuilder::default()
.base_weight(Weight::from_ref_time(100))
.base_weight(Weight::from_parts(100, 0))
.byte_fee(10)
.balance_factor(0)
.build()
@@ -440,7 +440,7 @@ fn compute_fee_works_with_multiplier() {
<NextFeeMultiplier<Runtime>>::put(Multiplier::saturating_from_rational(3, 2));
// Base fee is unaffected by multiplier
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(0),
weight: Weight::from_parts(0, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -448,7 +448,7 @@ fn compute_fee_works_with_multiplier() {
// Everything works together :)
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(123),
weight: Weight::from_parts(123, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -463,7 +463,7 @@ fn compute_fee_works_with_multiplier() {
#[test]
fn compute_fee_works_with_negative_multiplier() {
ExtBuilder::default()
.base_weight(Weight::from_ref_time(100))
.base_weight(Weight::from_parts(100, 0))
.byte_fee(10)
.balance_factor(0)
.build()
@@ -473,7 +473,7 @@ fn compute_fee_works_with_negative_multiplier() {
// Base fee is unaffected by multiplier.
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(0),
weight: Weight::from_parts(0, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -481,7 +481,7 @@ fn compute_fee_works_with_negative_multiplier() {
// Everything works together.
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(123),
weight: Weight::from_parts(123, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -496,7 +496,7 @@ fn compute_fee_works_with_negative_multiplier() {
#[test]
fn compute_fee_does_not_overflow() {
ExtBuilder::default()
.base_weight(Weight::from_ref_time(100))
.base_weight(Weight::from_parts(100, 0))
.byte_fee(10)
.balance_factor(0)
.build()
@@ -518,14 +518,14 @@ fn compute_fee_does_not_overflow() {
fn refund_does_not_recreate_account() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.build()
.execute_with(|| {
// So events are emitted
System::set_block_number(10);
let len = 10;
let pre = ChargeTransactionPayment::<Runtime>::from(5 /* tipped */)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_ref_time(100)), len)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_parts(100, 0)), len)
.unwrap();
assert_eq!(Balances::free_balance(2), 200 - 5 - 10 - 100 - 5);
@@ -535,8 +535,8 @@ fn refund_does_not_recreate_account() {
assert_ok!(ChargeTransactionPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(100)),
&post_info_from_weight(Weight::from_ref_time(50)),
&info_from_weight(Weight::from_parts(100, 0)),
&post_info_from_weight(Weight::from_parts(50, 0)),
len,
&Ok(())
));
@@ -558,19 +558,19 @@ fn refund_does_not_recreate_account() {
fn actual_weight_higher_than_max_refunds_nothing() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.build()
.execute_with(|| {
let len = 10;
let pre = ChargeTransactionPayment::<Runtime>::from(5 /* tipped */)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_ref_time(100)), len)
.pre_dispatch(&2, CALL, &info_from_weight(Weight::from_parts(100, 0)), len)
.unwrap();
assert_eq!(Balances::free_balance(2), 200 - 5 - 10 - 100 - 5);
assert_ok!(ChargeTransactionPayment::<Runtime>::post_dispatch(
Some(pre),
&info_from_weight(Weight::from_ref_time(100)),
&post_info_from_weight(Weight::from_ref_time(101)),
&info_from_weight(Weight::from_parts(100, 0)),
&post_info_from_weight(Weight::from_parts(101, 0)),
len,
&Ok(())
));
@@ -582,14 +582,14 @@ fn actual_weight_higher_than_max_refunds_nothing() {
fn zero_transfer_on_free_transaction() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(5))
.base_weight(Weight::from_parts(5, 0))
.build()
.execute_with(|| {
// So events are emitted
System::set_block_number(10);
let len = 10;
let dispatch_info = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
pays_fee: Pays::No,
class: DispatchClass::Normal,
};
@@ -621,11 +621,11 @@ fn zero_transfer_on_free_transaction() {
fn refund_consistent_with_actual_weight() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(7))
.base_weight(Weight::from_parts(7, 0))
.build()
.execute_with(|| {
let info = info_from_weight(Weight::from_ref_time(100));
let post_info = post_info_from_weight(Weight::from_ref_time(33));
let info = info_from_weight(Weight::from_parts(100, 0));
let post_info = post_info_from_weight(Weight::from_parts(33, 0));
let prev_balance = Balances::free_balance(2);
let len = 10;
let tip = 5;
@@ -662,7 +662,7 @@ fn should_alter_operational_priority() {
ExtBuilder::default().balance_factor(100).build().execute_with(|| {
let normal = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes,
};
@@ -683,7 +683,7 @@ fn should_alter_operational_priority() {
ExtBuilder::default().balance_factor(100).build().execute_with(|| {
let op = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -708,7 +708,7 @@ fn no_tip_has_some_priority() {
ExtBuilder::default().balance_factor(100).build().execute_with(|| {
let normal = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes,
};
@@ -722,7 +722,7 @@ fn no_tip_has_some_priority() {
ExtBuilder::default().balance_factor(100).build().execute_with(|| {
let op = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -742,7 +742,7 @@ fn higher_tip_have_higher_priority() {
let len = 10;
ExtBuilder::default().balance_factor(100).build().execute_with(|| {
let normal = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes,
};
@@ -754,7 +754,7 @@ fn higher_tip_have_higher_priority() {
ExtBuilder::default().balance_factor(100).build().execute_with(|| {
let op = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -781,10 +781,10 @@ fn higher_tip_have_higher_priority() {
fn post_info_can_change_pays_fee() {
ExtBuilder::default()
.balance_factor(10)
.base_weight(Weight::from_ref_time(7))
.base_weight(Weight::from_parts(7, 0))
.build()
.execute_with(|| {
let info = info_from_weight(Weight::from_ref_time(100));
let info = info_from_weight(Weight::from_parts(100, 0));
let post_info = post_info_from_pays(Pays::No);
let prev_balance = Balances::free_balance(2);
let len = 10;
@@ -144,7 +144,7 @@ mod tests {
#[test]
fn should_serialize_and_deserialize_properly_with_string() {
let info = RuntimeDispatchInfo {
weight: Weight::from_ref_time(5),
weight: Weight::from_parts(5, 0),
class: DispatchClass::Normal,
partial_fee: 1_000_000_u64,
};
@@ -162,7 +162,7 @@ mod tests {
#[test]
fn should_serialize_and_deserialize_properly_large_value() {
let info = RuntimeDispatchInfo {
weight: Weight::from_ref_time(5),
weight: Weight::from_parts(5, 0),
class: DispatchClass::Normal,
partial_fee: u128::max_value(),
};
@@ -70,7 +70,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_702 nanoseconds.
Weight::from_parts(29_164_000, 38383)
// Standard Error: 2
.saturating_add(Weight::from_ref_time(5_601).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(5_601, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -128,7 +128,7 @@ impl WeightInfo for () {
// Minimum execution time: 28_702 nanoseconds.
Weight::from_parts(29_164_000, 38383)
// Standard Error: 2
.saturating_add(Weight::from_ref_time(5_601).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(5_601, 0).saturating_mul(l.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
+6 -6
View File
@@ -112,7 +112,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 9_366 nanoseconds.
Weight::from_parts(11_731_455, 3480)
// Standard Error: 761
.saturating_add(Weight::from_ref_time(21_665).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(21_665, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -145,12 +145,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 37_834 nanoseconds.
Weight::from_parts(47_496_917, 2305)
// Standard Error: 12_505
.saturating_add(Weight::from_ref_time(26_902_474).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(26_902_474, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(7789).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 7789).saturating_mul(p.into()))
}
}
@@ -209,7 +209,7 @@ impl WeightInfo for () {
// Minimum execution time: 9_366 nanoseconds.
Weight::from_parts(11_731_455, 3480)
// Standard Error: 761
.saturating_add(Weight::from_ref_time(21_665).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(21_665, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -242,11 +242,11 @@ impl WeightInfo for () {
// Minimum execution time: 37_834 nanoseconds.
Weight::from_parts(47_496_917, 2305)
// Standard Error: 12_505
.saturating_add(Weight::from_ref_time(26_902_474).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(26_902_474, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(p.into())))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(7789).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 7789).saturating_mul(p.into()))
}
}
+12 -12
View File
@@ -131,18 +131,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 2_404_081 nanoseconds.
Weight::from_parts(2_419_004_000, 5250)
// Standard Error: 27_175
.saturating_add(Weight::from_ref_time(8_616_904).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(8_616_904, 0).saturating_mul(n.into()))
// Standard Error: 27_175
.saturating_add(Weight::from_ref_time(334_249).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(334_249, 0).saturating_mul(m.into()))
// Standard Error: 27_175
.saturating_add(Weight::from_ref_time(213_038).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(213_038, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_proof_size(2597).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
@@ -207,12 +207,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 13_633 nanoseconds.
Weight::from_parts(13_797_000, 2653)
// Standard Error: 9_293
.saturating_add(Weight::from_ref_time(11_163_914).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(11_163_914, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_proof_size(2597).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(i.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
@@ -519,18 +519,18 @@ impl WeightInfo for () {
// Minimum execution time: 2_404_081 nanoseconds.
Weight::from_parts(2_419_004_000, 5250)
// Standard Error: 27_175
.saturating_add(Weight::from_ref_time(8_616_904).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(8_616_904, 0).saturating_mul(n.into()))
// Standard Error: 27_175
.saturating_add(Weight::from_ref_time(334_249).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(334_249, 0).saturating_mul(m.into()))
// Standard Error: 27_175
.saturating_add(Weight::from_ref_time(213_038).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(213_038, 0).saturating_mul(a.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(4_u64))
.saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_proof_size(2597).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(n.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
@@ -595,12 +595,12 @@ impl WeightInfo for () {
// Minimum execution time: 13_633 nanoseconds.
Weight::from_parts(13_797_000, 2653)
// Standard Error: 9_293
.saturating_add(Weight::from_ref_time(11_163_914).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(11_163_914, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_proof_size(2597).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(0, 2597).saturating_mul(i.into()))
}
/// Storage: Uniques Asset (r:1 w:1)
/// Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen)
+7 -7
View File
@@ -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),
]
+16 -16
View File
@@ -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()))
}
}
+32 -32
View File
@@ -74,9 +74,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_062 nanoseconds.
Weight::from_parts(26_857_563, 7306)
// Standard Error: 623
.saturating_add(Weight::from_ref_time(55_988).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(55_988, 0).saturating_mul(l.into()))
// Standard Error: 1_109
.saturating_add(Weight::from_ref_time(59_714).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(59_714, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -93,9 +93,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_027 nanoseconds.
Weight::from_parts(26_509_364, 7306)
// Standard Error: 815
.saturating_add(Weight::from_ref_time(54_711).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(54_711, 0).saturating_mul(l.into()))
// Standard Error: 1_451
.saturating_add(Weight::from_ref_time(32_792).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(32_792, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -114,9 +114,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 29_554 nanoseconds.
Weight::from_parts(28_269_203, 9909)
// Standard Error: 623
.saturating_add(Weight::from_ref_time(59_058).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(59_058, 0).saturating_mul(l.into()))
// Standard Error: 1_108
.saturating_add(Weight::from_ref_time(63_429).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(63_429, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -135,9 +135,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 28_546 nanoseconds.
Weight::from_parts(28_299_251, 9909)
// Standard Error: 786
.saturating_add(Weight::from_ref_time(53_401).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(53_401, 0).saturating_mul(l.into()))
// Standard Error: 1_399
.saturating_add(Weight::from_ref_time(29_713).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(29_713, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -156,9 +156,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 43_436 nanoseconds.
Weight::from_parts(44_885_707, 9909)
// Standard Error: 1_516
.saturating_add(Weight::from_ref_time(59_066).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(59_066, 0).saturating_mul(l.into()))
// Standard Error: 2_698
.saturating_add(Weight::from_ref_time(32_053).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(32_053, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -177,9 +177,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 45_805 nanoseconds.
Weight::from_parts(46_869_490, 12512)
// Standard Error: 1_445
.saturating_add(Weight::from_ref_time(52_654).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(52_654, 0).saturating_mul(l.into()))
// Standard Error: 2_571
.saturating_add(Weight::from_ref_time(34_202).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(34_202, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -198,9 +198,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 30_460 nanoseconds.
Weight::from_parts(29_407_637, 9909)
// Standard Error: 794
.saturating_add(Weight::from_ref_time(63_757).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(63_757, 0).saturating_mul(l.into()))
// Standard Error: 1_466
.saturating_add(Weight::from_ref_time(56_032).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(56_032, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -219,9 +219,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 30_413 nanoseconds.
Weight::from_parts(29_350_467, 9909)
// Standard Error: 724
.saturating_add(Weight::from_ref_time(65_366).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(65_366, 0).saturating_mul(l.into()))
// Standard Error: 1_337
.saturating_add(Weight::from_ref_time(53_799).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(53_799, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -242,9 +242,9 @@ impl WeightInfo for () {
// Minimum execution time: 28_062 nanoseconds.
Weight::from_parts(26_857_563, 7306)
// Standard Error: 623
.saturating_add(Weight::from_ref_time(55_988).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(55_988, 0).saturating_mul(l.into()))
// Standard Error: 1_109
.saturating_add(Weight::from_ref_time(59_714).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(59_714, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -261,9 +261,9 @@ impl WeightInfo for () {
// Minimum execution time: 27_027 nanoseconds.
Weight::from_parts(26_509_364, 7306)
// Standard Error: 815
.saturating_add(Weight::from_ref_time(54_711).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(54_711, 0).saturating_mul(l.into()))
// Standard Error: 1_451
.saturating_add(Weight::from_ref_time(32_792).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(32_792, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -282,9 +282,9 @@ impl WeightInfo for () {
// Minimum execution time: 29_554 nanoseconds.
Weight::from_parts(28_269_203, 9909)
// Standard Error: 623
.saturating_add(Weight::from_ref_time(59_058).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(59_058, 0).saturating_mul(l.into()))
// Standard Error: 1_108
.saturating_add(Weight::from_ref_time(63_429).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(63_429, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -303,9 +303,9 @@ impl WeightInfo for () {
// Minimum execution time: 28_546 nanoseconds.
Weight::from_parts(28_299_251, 9909)
// Standard Error: 786
.saturating_add(Weight::from_ref_time(53_401).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(53_401, 0).saturating_mul(l.into()))
// Standard Error: 1_399
.saturating_add(Weight::from_ref_time(29_713).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(29_713, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -324,9 +324,9 @@ impl WeightInfo for () {
// Minimum execution time: 43_436 nanoseconds.
Weight::from_parts(44_885_707, 9909)
// Standard Error: 1_516
.saturating_add(Weight::from_ref_time(59_066).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(59_066, 0).saturating_mul(l.into()))
// Standard Error: 2_698
.saturating_add(Weight::from_ref_time(32_053).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(32_053, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -345,9 +345,9 @@ impl WeightInfo for () {
// Minimum execution time: 45_805 nanoseconds.
Weight::from_parts(46_869_490, 12512)
// Standard Error: 1_445
.saturating_add(Weight::from_ref_time(52_654).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(52_654, 0).saturating_mul(l.into()))
// Standard Error: 2_571
.saturating_add(Weight::from_ref_time(34_202).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(34_202, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -366,9 +366,9 @@ impl WeightInfo for () {
// Minimum execution time: 30_460 nanoseconds.
Weight::from_parts(29_407_637, 9909)
// Standard Error: 794
.saturating_add(Weight::from_ref_time(63_757).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(63_757, 0).saturating_mul(l.into()))
// Standard Error: 1_466
.saturating_add(Weight::from_ref_time(56_032).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(56_032, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -387,9 +387,9 @@ impl WeightInfo for () {
// Minimum execution time: 30_413 nanoseconds.
Weight::from_parts(29_350_467, 9909)
// Standard Error: 724
.saturating_add(Weight::from_ref_time(65_366).saturating_mul(l.into()))
.saturating_add(Weight::from_parts(65_366, 0).saturating_mul(l.into()))
// Standard Error: 1_337
.saturating_add(Weight::from_ref_time(53_799).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(53_799, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
+1 -1
View File
@@ -119,7 +119,7 @@ fn test_whitelist_call_and_execute() {
RuntimeOrigin::root(),
call_hash,
call_encoded_len,
call_weight - Weight::from_ref_time(1)
call_weight - Weight::from_parts(1, 0)
),
crate::Error::<Test>::InvalidCallWeightWitness,
);
+6 -6
View File
@@ -97,10 +97,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 27_539 nanoseconds.
Weight::from_parts(27_950_000, 8007)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_134).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_134, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: Whitelist WhitelistedCall (r:1 w:1)
/// Proof: Whitelist WhitelistedCall (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen)
@@ -114,7 +114,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 20_581 nanoseconds.
Weight::from_parts(21_762_318, 5081)
// Standard Error: 4
.saturating_add(Weight::from_ref_time(1_480).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_480, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -162,10 +162,10 @@ impl WeightInfo for () {
// Minimum execution time: 27_539 nanoseconds.
Weight::from_parts(27_950_000, 8007)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_134).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_134, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: Whitelist WhitelistedCall (r:1 w:1)
/// Proof: Whitelist WhitelistedCall (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen)
@@ -179,7 +179,7 @@ impl WeightInfo for () {
// Minimum execution time: 20_581 nanoseconds.
Weight::from_parts(21_762_318, 5081)
// Standard Error: 4
.saturating_add(Weight::from_ref_time(1_480).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(1_480, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
+12 -12
View File
@@ -82,17 +82,17 @@ pub struct RuntimeDbWeight {
impl RuntimeDbWeight {
pub fn reads(self, r: u64) -> Weight {
Weight::from_ref_time(self.read.saturating_mul(r))
Weight::from_parts(self.read.saturating_mul(r), 0)
}
pub fn writes(self, w: u64) -> Weight {
Weight::from_ref_time(self.write.saturating_mul(w))
Weight::from_parts(self.write.saturating_mul(w), 0)
}
pub fn reads_writes(self, r: u64, w: u64) -> Weight {
let read_weight = self.read.saturating_mul(r);
let write_weight = self.write.saturating_mul(w);
Weight::from_ref_time(read_weight.saturating_add(write_weight))
Weight::from_parts(read_weight.saturating_add(write_weight), 0)
}
}
@@ -264,15 +264,15 @@ mod tests {
#[test]
fn polynomial_works() {
// 100^3/2=500000 100^2*(2+1/3)=23333 700 -10000
assert_eq!(Poly::weight_to_fee(&Weight::from_ref_time(100)), 514033);
assert_eq!(Poly::weight_to_fee(&Weight::from_parts(100, 0)), 514033);
// 10123^3/2=518677865433 10123^2*(2+1/3)=239108634 70861 -10000
assert_eq!(Poly::weight_to_fee(&Weight::from_ref_time(10_123)), 518917034928);
assert_eq!(Poly::weight_to_fee(&Weight::from_parts(10_123, 0)), 518917034928);
}
#[test]
fn polynomial_does_not_underflow() {
assert_eq!(Poly::weight_to_fee(&Weight::zero()), 0);
assert_eq!(Poly::weight_to_fee(&Weight::from_ref_time(10)), 0);
assert_eq!(Poly::weight_to_fee(&Weight::from_parts(10, 0)), 0);
}
#[test]
@@ -283,7 +283,7 @@ mod tests {
#[test]
fn identity_fee_works() {
assert_eq!(IdentityFee::<Balance>::weight_to_fee(&Weight::zero()), 0);
assert_eq!(IdentityFee::<Balance>::weight_to_fee(&Weight::from_ref_time(50)), 50);
assert_eq!(IdentityFee::<Balance>::weight_to_fee(&Weight::from_parts(50, 0)), 50);
assert_eq!(IdentityFee::<Balance>::weight_to_fee(&Weight::MAX), Balance::max_value());
}
@@ -295,20 +295,20 @@ mod tests {
0
);
assert_eq!(
ConstantMultiplier::<u128, ConstU128<10u128>>::weight_to_fee(&Weight::from_ref_time(
50
ConstantMultiplier::<u128, ConstU128<10u128>>::weight_to_fee(&Weight::from_parts(
50, 0
)),
500
);
assert_eq!(
ConstantMultiplier::<u128, ConstU128<1024u128>>::weight_to_fee(&Weight::from_ref_time(
16
ConstantMultiplier::<u128, ConstU128<1024u128>>::weight_to_fee(&Weight::from_parts(
16, 0
)),
16384
);
assert_eq!(
ConstantMultiplier::<u128, ConstU128<{ u128::MAX }>>::weight_to_fee(
&Weight::from_ref_time(2)
&Weight::from_parts(2, 0)
),
u128::MAX
);
@@ -37,7 +37,7 @@ pub struct Weight {
impl From<OldWeight> for Weight {
fn from(old: OldWeight) -> Self {
Weight::from_ref_time(old.0)
Weight::from_parts(old.0, 0)
}
}
@@ -103,11 +103,13 @@ impl Weight {
}
/// Construct [`Weight`] with reference time weight and 0 storage size weight.
#[deprecated = "Will be removed soon; use `from_parts` instead."]
pub const fn from_ref_time(ref_time: u64) -> Self {
Self { ref_time, proof_size: 0 }
}
/// Construct [`Weight`] with storage size weight and 0 reference time weight.
#[deprecated = "Will be removed soon; use `from_parts` instead."]
pub const fn from_proof_size(proof_size: u64) -> Self {
Self { ref_time: 0, proof_size }
}
@@ -238,7 +240,7 @@ impl Weight {
/// of all those divisions. Returns `None` in case **all** components of `other` are zero.
///
/// This returns `Some` even if some components of `other` are zero as long as there is at least
/// one non-zero component in `other`. The devision for this particular component will then
/// one non-zero component in `other`. The division for this particular component will then
/// yield the maximum value (e.g u64::MAX). This is because we assume not every operation and
/// hence each `Weight` will necessarily use each resource.
pub const fn checked_div_per_component(self, other: &Self) -> Option<u64> {
+1 -1
View File
@@ -601,7 +601,7 @@ parameter_types! {
pub RuntimeBlockLength: BlockLength =
BlockLength::max(4 * 1024 * 1024);
pub RuntimeBlockWeights: BlockWeights =
BlockWeights::with_sensible_defaults(Weight::from_ref_time(4 * 1024 * 1024), Perbill::from_percent(75));
BlockWeights::with_sensible_defaults(Weight::from_parts(4 * 1024 * 1024, 0), Perbill::from_percent(75));
}
impl From<frame_system::Call<Runtime>> for Extrinsic {
@@ -31,7 +31,7 @@ The file will contain the concrete weight value and various statistics about the
/// 95th: 3_595_674
/// 75th: 3_526_435
pub const BlockExecutionWeight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(3_532_484));
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(3_532_484), 0);
```
In this example it takes 3.5 ms to execute an empty block. That means that it always takes at least 3.5 ms to execute *any* block.
@@ -61,7 +61,7 @@ The relevant section in the output file looks like this:
/// 95th: 67_843
/// 75th: 67_749
pub const ExtrinsicBaseWeight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(67_745));
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(67_745), 0);
```
In this example it takes 67.7 µs to execute a NO-OP extrinsic. That means that it always takes at least 67.7 µs to execute *any* extrinsic.
@@ -35,7 +35,7 @@ parameter_types! {
/// 95th: {{underscore stats.p95}}
/// 75th: {{underscore stats.p75}}
pub const {{long_name}}Weight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul({{underscore weight}}));
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul({{underscore weight}}), 0);
}
#[cfg(test)]

Some files were not shown because too many files have changed in this diff Show More