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
+60 -63
View File
@@ -18,9 +18,9 @@
//! Autogenerated weights for pallet_glutton
//!
//! 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_glutton
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
@@ -74,10 +71,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `1489`
// Minimum execution time: 10_384_000 picoseconds.
Weight::from_parts(10_598_000, 1489)
// Standard Error: 1_369
.saturating_add(Weight::from_parts(1_580_155, 0).saturating_mul(n.into()))
// Minimum execution time: 10_410_000 picoseconds.
Weight::from_parts(10_515_000, 1489)
// Standard Error: 1_069
.saturating_add(Weight::from_parts(1_513_013, 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 +88,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `65`
// Estimated: `1489`
// Minimum execution time: 11_022_000 picoseconds.
Weight::from_parts(11_319_000, 1489)
// Standard Error: 1_108
.saturating_add(Weight::from_parts(1_048_682, 0).saturating_mul(n.into()))
// Minimum execution time: 11_105_000 picoseconds.
Weight::from_parts(584_850, 1489)
// Standard Error: 1_417
.saturating_add(Weight::from_parts(1_054_988, 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())))
@@ -104,10 +101,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 660_000 picoseconds.
Weight::from_parts(7_814_200, 0)
// Standard Error: 33
.saturating_add(Weight::from_parts(94_390, 0).saturating_mul(i.into()))
// Minimum execution time: 709_000 picoseconds.
Weight::from_parts(7_409_096, 0)
// Standard Error: 23
.saturating_add(Weight::from_parts(95_342, 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)
@@ -116,10 +113,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `119036 + i * (1022 ±0)`
// Estimated: `990 + i * (3016 ±0)`
// Minimum execution time: 712_000 picoseconds.
Weight::from_parts(814_000, 990)
// Standard Error: 1_805
.saturating_add(Weight::from_parts(5_407_690, 0).saturating_mul(i.into()))
// Minimum execution time: 584_000 picoseconds.
Weight::from_parts(674_000, 990)
// Standard Error: 1_802
.saturating_add(Weight::from_parts(5_360_522, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_parts(0, 3016).saturating_mul(i.into()))
}
@@ -132,9 +129,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn on_idle_high_proof_waste() -> Weight {
// Proof Size summary in bytes:
// Measured: `1900466`
// Estimated: `5242760`
// Minimum execution time: 54_903_045_000 picoseconds.
Weight::from_parts(55_194_691_000, 5242760)
// Estimated: `5239782`
// Minimum execution time: 57_124_610_000 picoseconds.
Weight::from_parts(57_256_059_000, 5239782)
.saturating_add(T::DbWeight::get().reads(1739_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -146,9 +143,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn on_idle_low_proof_waste() -> Weight {
// Proof Size summary in bytes:
// Measured: `9516`
// Estimated: `19048`
// Minimum execution time: 97_295_331_000 picoseconds.
Weight::from_parts(97_853_502_000, 19048)
// Estimated: `16070`
// Minimum execution time: 101_500_066_000 picoseconds.
Weight::from_parts(101_621_640_000, 16070)
.saturating_add(T::DbWeight::get().reads(7_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -158,9 +155,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn empty_on_idle() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `2978`
// Minimum execution time: 4_280_000 picoseconds.
Weight::from_parts(4_381_000, 2978)
// Estimated: `1489`
// Minimum execution time: 4_164_000 picoseconds.
Weight::from_parts(4_378_000, 1489)
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: Glutton Compute (r:0 w:1)
@@ -169,8 +166,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_758_000 picoseconds.
Weight::from_parts(8_988_000, 0)
// Minimum execution time: 8_795_000 picoseconds.
Weight::from_parts(9_076_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Glutton Storage (r:0 w:1)
@@ -179,8 +176,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_901_000 picoseconds.
Weight::from_parts(9_291_000, 0)
// Minimum execution time: 8_979_000 picoseconds.
Weight::from_parts(9_195_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
@@ -196,10 +193,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `1489`
// Minimum execution time: 10_384_000 picoseconds.
Weight::from_parts(10_598_000, 1489)
// Standard Error: 1_369
.saturating_add(Weight::from_parts(1_580_155, 0).saturating_mul(n.into()))
// Minimum execution time: 10_410_000 picoseconds.
Weight::from_parts(10_515_000, 1489)
// Standard Error: 1_069
.saturating_add(Weight::from_parts(1_513_013, 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())))
@@ -213,10 +210,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `65`
// Estimated: `1489`
// Minimum execution time: 11_022_000 picoseconds.
Weight::from_parts(11_319_000, 1489)
// Standard Error: 1_108
.saturating_add(Weight::from_parts(1_048_682, 0).saturating_mul(n.into()))
// Minimum execution time: 11_105_000 picoseconds.
Weight::from_parts(584_850, 1489)
// Standard Error: 1_417
.saturating_add(Weight::from_parts(1_054_988, 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())))
@@ -226,10 +223,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 660_000 picoseconds.
Weight::from_parts(7_814_200, 0)
// Standard Error: 33
.saturating_add(Weight::from_parts(94_390, 0).saturating_mul(i.into()))
// Minimum execution time: 709_000 picoseconds.
Weight::from_parts(7_409_096, 0)
// Standard Error: 23
.saturating_add(Weight::from_parts(95_342, 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)
@@ -238,10 +235,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `119036 + i * (1022 ±0)`
// Estimated: `990 + i * (3016 ±0)`
// Minimum execution time: 712_000 picoseconds.
Weight::from_parts(814_000, 990)
// Standard Error: 1_805
.saturating_add(Weight::from_parts(5_407_690, 0).saturating_mul(i.into()))
// Minimum execution time: 584_000 picoseconds.
Weight::from_parts(674_000, 990)
// Standard Error: 1_802
.saturating_add(Weight::from_parts(5_360_522, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_parts(0, 3016).saturating_mul(i.into()))
}
@@ -254,9 +251,9 @@ impl WeightInfo for () {
fn on_idle_high_proof_waste() -> Weight {
// Proof Size summary in bytes:
// Measured: `1900466`
// Estimated: `5242760`
// Minimum execution time: 54_903_045_000 picoseconds.
Weight::from_parts(55_194_691_000, 5242760)
// Estimated: `5239782`
// Minimum execution time: 57_124_610_000 picoseconds.
Weight::from_parts(57_256_059_000, 5239782)
.saturating_add(RocksDbWeight::get().reads(1739_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -268,9 +265,9 @@ impl WeightInfo for () {
fn on_idle_low_proof_waste() -> Weight {
// Proof Size summary in bytes:
// Measured: `9516`
// Estimated: `19048`
// Minimum execution time: 97_295_331_000 picoseconds.
Weight::from_parts(97_853_502_000, 19048)
// Estimated: `16070`
// Minimum execution time: 101_500_066_000 picoseconds.
Weight::from_parts(101_621_640_000, 16070)
.saturating_add(RocksDbWeight::get().reads(7_u64))
}
/// Storage: Glutton Storage (r:1 w:0)
@@ -280,9 +277,9 @@ impl WeightInfo for () {
fn empty_on_idle() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `2978`
// Minimum execution time: 4_280_000 picoseconds.
Weight::from_parts(4_381_000, 2978)
// Estimated: `1489`
// Minimum execution time: 4_164_000 picoseconds.
Weight::from_parts(4_378_000, 1489)
.saturating_add(RocksDbWeight::get().reads(2_u64))
}
/// Storage: Glutton Compute (r:0 w:1)
@@ -291,8 +288,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_758_000 picoseconds.
Weight::from_parts(8_988_000, 0)
// Minimum execution time: 8_795_000 picoseconds.
Weight::from_parts(9_076_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Glutton Storage (r:0 w:1)
@@ -301,8 +298,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_901_000 picoseconds.
Weight::from_parts(9_291_000, 0)
// Minimum execution time: 8_979_000 picoseconds.
Weight::from_parts(9_195_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}