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
+44 -47
View File
@@ -18,9 +18,9 @@
//! Autogenerated weights for pallet_treasury
//!
//! 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_treasury
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
@@ -71,9 +68,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn spend() -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3376`
// Minimum execution time: 17_010_000 picoseconds.
Weight::from_parts(17_247_000, 3376)
// Estimated: `1887`
// Minimum execution time: 16_592_000 picoseconds.
Weight::from_parts(16_959_000, 1887)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -85,8 +82,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `143`
// Estimated: `1489`
// Minimum execution time: 25_780_000 picoseconds.
Weight::from_parts(41_064_000, 1489)
// Minimum execution time: 29_742_000 picoseconds.
Weight::from_parts(30_359_000, 1489)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -97,9 +94,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn reject_proposal() -> Weight {
// Proof Size summary in bytes:
// Measured: `301`
// Estimated: `7166`
// Minimum execution time: 27_805_000 picoseconds.
Weight::from_parts(28_322_000, 7166)
// Estimated: `3593`
// Minimum execution time: 31_248_000 picoseconds.
Weight::from_parts(31_882_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -111,11 +108,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn approve_proposal(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `470 + p * (8 ±0)`
// Estimated: `5460`
// Minimum execution time: 10_939_000 picoseconds.
Weight::from_parts(13_667_341, 5460)
// Standard Error: 907
.saturating_add(Weight::from_parts(26_648, 0).saturating_mul(p.into()))
// Estimated: `3573`
// Minimum execution time: 10_441_000 picoseconds.
Weight::from_parts(13_061_079, 3573)
// Standard Error: 877
.saturating_add(Weight::from_parts(26_940, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -125,8 +122,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `127`
// Estimated: `1887`
// Minimum execution time: 8_261_000 picoseconds.
Weight::from_parts(8_399_000, 1887)
// Minimum execution time: 7_935_000 picoseconds.
Weight::from_parts(8_153_000, 1887)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -144,16 +141,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn on_initialize_proposals(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `387 + p * (251 ±0)`
// Estimated: `7255 + p * (7789 ±0)`
// Minimum execution time: 43_781_000 picoseconds.
Weight::from_parts(68_521_487, 7255)
// Standard Error: 58_804
.saturating_add(Weight::from_parts(33_271_211, 0).saturating_mul(p.into()))
// Estimated: `1887 + p * (5206 ±0)`
// Minimum execution time: 45_306_000 picoseconds.
Weight::from_parts(53_639_830, 1887)
// Standard Error: 32_330
.saturating_add(Weight::from_parts(38_930_307, 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_parts(0, 7789).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into()))
}
}
@@ -168,9 +165,9 @@ impl WeightInfo for () {
fn spend() -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3376`
// Minimum execution time: 17_010_000 picoseconds.
Weight::from_parts(17_247_000, 3376)
// Estimated: `1887`
// Minimum execution time: 16_592_000 picoseconds.
Weight::from_parts(16_959_000, 1887)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -182,8 +179,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `143`
// Estimated: `1489`
// Minimum execution time: 25_780_000 picoseconds.
Weight::from_parts(41_064_000, 1489)
// Minimum execution time: 29_742_000 picoseconds.
Weight::from_parts(30_359_000, 1489)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -194,9 +191,9 @@ impl WeightInfo for () {
fn reject_proposal() -> Weight {
// Proof Size summary in bytes:
// Measured: `301`
// Estimated: `7166`
// Minimum execution time: 27_805_000 picoseconds.
Weight::from_parts(28_322_000, 7166)
// Estimated: `3593`
// Minimum execution time: 31_248_000 picoseconds.
Weight::from_parts(31_882_000, 3593)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -208,11 +205,11 @@ impl WeightInfo for () {
fn approve_proposal(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `470 + p * (8 ±0)`
// Estimated: `5460`
// Minimum execution time: 10_939_000 picoseconds.
Weight::from_parts(13_667_341, 5460)
// Standard Error: 907
.saturating_add(Weight::from_parts(26_648, 0).saturating_mul(p.into()))
// Estimated: `3573`
// Minimum execution time: 10_441_000 picoseconds.
Weight::from_parts(13_061_079, 3573)
// Standard Error: 877
.saturating_add(Weight::from_parts(26_940, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -222,8 +219,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `127`
// Estimated: `1887`
// Minimum execution time: 8_261_000 picoseconds.
Weight::from_parts(8_399_000, 1887)
// Minimum execution time: 7_935_000 picoseconds.
Weight::from_parts(8_153_000, 1887)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -241,15 +238,15 @@ impl WeightInfo for () {
fn on_initialize_proposals(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `387 + p * (251 ±0)`
// Estimated: `7255 + p * (7789 ±0)`
// Minimum execution time: 43_781_000 picoseconds.
Weight::from_parts(68_521_487, 7255)
// Standard Error: 58_804
.saturating_add(Weight::from_parts(33_271_211, 0).saturating_mul(p.into()))
// Estimated: `1887 + p * (5206 ±0)`
// Minimum execution time: 45_306_000 picoseconds.
Weight::from_parts(53_639_830, 1887)
// Standard Error: 32_330
.saturating_add(Weight::from_parts(38_930_307, 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_parts(0, 7789).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into()))
}
}