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
+56 -59
View File
@@ -18,9 +18,9 @@
//! Autogenerated weights for pallet_ranked_collective
//!
//! 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_ranked_collective
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
@@ -73,9 +70,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn add_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `109`
// Estimated: `6986`
// Minimum execution time: 19_174_000 picoseconds.
Weight::from_parts(19_391_000, 6986)
// Estimated: `3507`
// Minimum execution time: 18_480_000 picoseconds.
Weight::from_parts(18_769_000, 3507)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -91,16 +88,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn remove_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `583 + r * (281 ±0)`
// Estimated: `14024 + r * (7547 ±0)`
// Minimum execution time: 30_972_000 picoseconds.
Weight::from_parts(35_526_205, 14024)
// Standard Error: 47_832
.saturating_add(Weight::from_parts(12_838_739, 0).saturating_mul(r.into()))
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 30_087_000 picoseconds.
Weight::from_parts(33_646_239, 3519)
// Standard Error: 22_498
.saturating_add(Weight::from_parts(12_524_289, 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_parts(0, 7547).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2529).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)
@@ -114,11 +111,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn promote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `281 + r * (17 ±0)`
// Estimated: `6986`
// Minimum execution time: 21_573_000 picoseconds.
Weight::from_parts(22_184_210, 6986)
// Standard Error: 10_584
.saturating_add(Weight::from_parts(289_535, 0).saturating_mul(r.into()))
// Estimated: `3507`
// Minimum execution time: 20_974_000 picoseconds.
Weight::from_parts(21_582_135, 3507)
// Standard Error: 4_965
.saturating_add(Weight::from_parts(294_566, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -134,11 +131,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn demote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `599 + r * (72 ±0)`
// Estimated: `14024`
// Minimum execution time: 30_249_000 picoseconds.
Weight::from_parts(32_702_502, 14024)
// Standard Error: 26_725
.saturating_add(Weight::from_parts(651_139, 0).saturating_mul(r.into()))
// Estimated: `3519`
// Minimum execution time: 29_621_000 picoseconds.
Weight::from_parts(32_118_301, 3519)
// Standard Error: 27_596
.saturating_add(Weight::from_parts(647_979, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -153,9 +150,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `595`
// Estimated: `230816`
// Minimum execution time: 46_972_000 picoseconds.
Weight::from_parts(47_617_000, 230816)
// Estimated: `219984`
// Minimum execution time: 46_360_000 picoseconds.
Weight::from_parts(46_793_000, 219984)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -169,11 +166,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn cleanup_poll(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `429 + n * (50 ±0)`
// Estimated: `8364 + n * (2540 ±0)`
// Minimum execution time: 15_301_000 picoseconds.
Weight::from_parts(19_308_613, 8364)
// Standard Error: 1_792
.saturating_add(Weight::from_parts(1_015_251, 0).saturating_mul(n.into()))
// Estimated: `3795 + n * (2540 ±0)`
// Minimum execution time: 14_869_000 picoseconds.
Weight::from_parts(18_545_013, 3795)
// Standard Error: 1_376
.saturating_add(Weight::from_parts(1_005_397, 0).saturating_mul(n.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((1_u64).saturating_mul(n.into())))
@@ -194,9 +191,9 @@ impl WeightInfo for () {
fn add_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `109`
// Estimated: `6986`
// Minimum execution time: 19_174_000 picoseconds.
Weight::from_parts(19_391_000, 6986)
// Estimated: `3507`
// Minimum execution time: 18_480_000 picoseconds.
Weight::from_parts(18_769_000, 3507)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -212,16 +209,16 @@ impl WeightInfo for () {
fn remove_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `583 + r * (281 ±0)`
// Estimated: `14024 + r * (7547 ±0)`
// Minimum execution time: 30_972_000 picoseconds.
Weight::from_parts(35_526_205, 14024)
// Standard Error: 47_832
.saturating_add(Weight::from_parts(12_838_739, 0).saturating_mul(r.into()))
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 30_087_000 picoseconds.
Weight::from_parts(33_646_239, 3519)
// Standard Error: 22_498
.saturating_add(Weight::from_parts(12_524_289, 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_parts(0, 7547).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2529).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)
@@ -235,11 +232,11 @@ impl WeightInfo for () {
fn promote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `281 + r * (17 ±0)`
// Estimated: `6986`
// Minimum execution time: 21_573_000 picoseconds.
Weight::from_parts(22_184_210, 6986)
// Standard Error: 10_584
.saturating_add(Weight::from_parts(289_535, 0).saturating_mul(r.into()))
// Estimated: `3507`
// Minimum execution time: 20_974_000 picoseconds.
Weight::from_parts(21_582_135, 3507)
// Standard Error: 4_965
.saturating_add(Weight::from_parts(294_566, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -255,11 +252,11 @@ impl WeightInfo for () {
fn demote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `599 + r * (72 ±0)`
// Estimated: `14024`
// Minimum execution time: 30_249_000 picoseconds.
Weight::from_parts(32_702_502, 14024)
// Standard Error: 26_725
.saturating_add(Weight::from_parts(651_139, 0).saturating_mul(r.into()))
// Estimated: `3519`
// Minimum execution time: 29_621_000 picoseconds.
Weight::from_parts(32_118_301, 3519)
// Standard Error: 27_596
.saturating_add(Weight::from_parts(647_979, 0).saturating_mul(r.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -274,9 +271,9 @@ impl WeightInfo for () {
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `595`
// Estimated: `230816`
// Minimum execution time: 46_972_000 picoseconds.
Weight::from_parts(47_617_000, 230816)
// Estimated: `219984`
// Minimum execution time: 46_360_000 picoseconds.
Weight::from_parts(46_793_000, 219984)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -290,11 +287,11 @@ impl WeightInfo for () {
fn cleanup_poll(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `429 + n * (50 ±0)`
// Estimated: `8364 + n * (2540 ±0)`
// Minimum execution time: 15_301_000 picoseconds.
Weight::from_parts(19_308_613, 8364)
// Standard Error: 1_792
.saturating_add(Weight::from_parts(1_015_251, 0).saturating_mul(n.into()))
// Estimated: `3795 + n * (2540 ±0)`
// Minimum execution time: 14_869_000 picoseconds.
Weight::from_parts(18_545_013, 3795)
// Standard Error: 1_376
.saturating_add(Weight::from_parts(1_005_397, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))