Fixes PoV over-estimation (#13766)

* Align log

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use max instead of sum

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make comment ordering deterministic

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Dont add Pov overhead when all is ignored

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update test pallet weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-run weights on bm2

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Actually use new weights

Fucked up the merge for this file...

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update contract weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-04-13 15:11:58 +02:00
committed by GitHub
parent 46e2d3e5f8
commit ebfe00d590
54 changed files with 5526 additions and 5534 deletions
+62 -57
View File
@@ -18,9 +18,9 @@
//! Autogenerated weights for pallet_fast_unstake
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
@@ -31,9 +31,6 @@
// --steps=50
// --repeat=20
// --pallet=pallet_fast_unstake
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
@@ -85,6 +82,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Balances Locks (r:64 w:64)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: Balances Freezes (r:64 w:0)
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
/// Storage: Staking Ledger (r:0 w:64)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
/// Storage: Staking Payee (r:0 w:64)
@@ -93,16 +92,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn on_idle_unstake(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1344 + b * (343 ±0)`
// Estimated: `23254 + b * (17642 ±0)`
// Minimum execution time: 78_484_000 picoseconds.
Weight::from_parts(39_186_541, 23254)
// Standard Error: 37_606
.saturating_add(Weight::from_parts(42_433_199, 0).saturating_mul(b.into()))
// Estimated: `7253 + b * (3774 ±0)`
// Minimum execution time: 92_282_000 picoseconds.
Weight::from_parts(31_665_344, 7253)
// Standard Error: 35_348
.saturating_add(Weight::from_parts(57_005_152, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 17642).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))
}
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -122,19 +121,19 @@ 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 {
// Proof Size summary in bytes:
// Measured: `1512 + v * (10037 ±0) + b * (48 ±0)`
// Estimated: `20889 + v * (22551 ±0) + b * (98 ±0)`
// Minimum execution time: 1_538_727_000 picoseconds.
Weight::from_parts(1_549_586_000, 20889)
// Standard Error: 14_184_223
.saturating_add(Weight::from_parts(452_966_006, 0).saturating_mul(v.into()))
// Standard Error: 56_752_692
.saturating_add(Weight::from_parts(1_775_601_329, 0).saturating_mul(b.into()))
// Measured: `1512 + b * (48 ±0) + v * (10037 ±0)`
// Estimated: `7253 + b * (49 ±0) + v * (12513 ±0)`
// Minimum execution time: 1_547_716_000 picoseconds.
Weight::from_parts(1_552_476_000, 7253)
// Standard Error: 13_914_457
.saturating_add(Weight::from_parts(445_314_876, 0).saturating_mul(v.into()))
// Standard Error: 55_673_329
.saturating_add(Weight::from_parts(1_749_024_692, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_parts(0, 22551).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 98).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 49).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 12513).saturating_mul(v.into()))
}
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -162,15 +161,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: Balances Freezes (r:1 w:0)
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
/// Storage: FastUnstake CounterForQueue (r:1 w:1)
/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
fn register_fast_unstake() -> Weight {
// Proof Size summary in bytes:
// Measured: `1964`
// Estimated: `45775`
// Minimum execution time: 117_552_000 picoseconds.
Weight::from_parts(118_303_000, 45775)
.saturating_add(T::DbWeight::get().reads(14_u64))
// Estimated: `7253`
// Minimum execution time: 124_644_000 picoseconds.
Weight::from_parts(125_793_000, 7253)
.saturating_add(T::DbWeight::get().reads(15_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
@@ -186,9 +187,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `1223`
// Estimated: `18308`
// Minimum execution time: 42_291_000 picoseconds.
Weight::from_parts(42_835_000, 18308)
// Estimated: `7253`
// Minimum execution time: 45_037_000 picoseconds.
Weight::from_parts(45_545_000, 7253)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -198,8 +199,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_551_000 picoseconds.
Weight::from_parts(3_632_000, 0)
// Minimum execution time: 3_228_000 picoseconds.
Weight::from_parts(3_428_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
@@ -230,6 +231,8 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Balances Locks (r:64 w:64)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: Balances Freezes (r:64 w:0)
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
/// Storage: Staking Ledger (r:0 w:64)
/// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen)
/// Storage: Staking Payee (r:0 w:64)
@@ -238,16 +241,16 @@ impl WeightInfo for () {
fn on_idle_unstake(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1344 + b * (343 ±0)`
// Estimated: `23254 + b * (17642 ±0)`
// Minimum execution time: 78_484_000 picoseconds.
Weight::from_parts(39_186_541, 23254)
// Standard Error: 37_606
.saturating_add(Weight::from_parts(42_433_199, 0).saturating_mul(b.into()))
// Estimated: `7253 + b * (3774 ±0)`
// Minimum execution time: 92_282_000 picoseconds.
Weight::from_parts(31_665_344, 7253)
// Standard Error: 35_348
.saturating_add(Weight::from_parts(57_005_152, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(b.into())))
.saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(b.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((5_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 17642).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))
}
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -267,19 +270,19 @@ impl WeightInfo for () {
/// The range of component `b` is `[1, 64]`.
fn on_idle_check(v: u32, b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1512 + v * (10037 ±0) + b * (48 ±0)`
// Estimated: `20889 + v * (22551 ±0) + b * (98 ±0)`
// Minimum execution time: 1_538_727_000 picoseconds.
Weight::from_parts(1_549_586_000, 20889)
// Standard Error: 14_184_223
.saturating_add(Weight::from_parts(452_966_006, 0).saturating_mul(v.into()))
// Standard Error: 56_752_692
.saturating_add(Weight::from_parts(1_775_601_329, 0).saturating_mul(b.into()))
// Measured: `1512 + b * (48 ±0) + v * (10037 ±0)`
// Estimated: `7253 + b * (49 ±0) + v * (12513 ±0)`
// Minimum execution time: 1_547_716_000 picoseconds.
Weight::from_parts(1_552_476_000, 7253)
// Standard Error: 13_914_457
.saturating_add(Weight::from_parts(445_314_876, 0).saturating_mul(v.into()))
// Standard Error: 55_673_329
.saturating_add(Weight::from_parts(1_749_024_692, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_parts(0, 22551).saturating_mul(v.into()))
.saturating_add(Weight::from_parts(0, 98).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 49).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 12513).saturating_mul(v.into()))
}
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -307,15 +310,17 @@ impl WeightInfo for () {
/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: Balances Freezes (r:1 w:0)
/// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
/// Storage: FastUnstake CounterForQueue (r:1 w:1)
/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
fn register_fast_unstake() -> Weight {
// Proof Size summary in bytes:
// Measured: `1964`
// Estimated: `45775`
// Minimum execution time: 117_552_000 picoseconds.
Weight::from_parts(118_303_000, 45775)
.saturating_add(RocksDbWeight::get().reads(14_u64))
// Estimated: `7253`
// Minimum execution time: 124_644_000 picoseconds.
Weight::from_parts(125_793_000, 7253)
.saturating_add(RocksDbWeight::get().reads(15_u64))
.saturating_add(RocksDbWeight::get().writes(9_u64))
}
/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
@@ -331,9 +336,9 @@ impl WeightInfo for () {
fn deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `1223`
// Estimated: `18308`
// Minimum execution time: 42_291_000 picoseconds.
Weight::from_parts(42_835_000, 18308)
// Estimated: `7253`
// Minimum execution time: 45_037_000 picoseconds.
Weight::from_parts(45_545_000, 7253)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -343,8 +348,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_551_000 picoseconds.
Weight::from_parts(3_632_000, 0)
// Minimum execution time: 3_228_000 picoseconds.
Weight::from_parts(3_428_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}