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
+38 -41
View File
@@ -18,9 +18,9 @@
//! Autogenerated weights for pallet_lottery
//!
//! 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_lottery
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
@@ -79,9 +76,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn buy_ticket() -> Weight {
// Proof Size summary in bytes:
// Measured: `452`
// Estimated: `13121`
// Minimum execution time: 43_076_000 picoseconds.
Weight::from_parts(43_902_000, 13121)
// Estimated: `3593`
// Minimum execution time: 61_502_000 picoseconds.
Weight::from_parts(62_578_000, 3593)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -92,10 +89,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_222_000 picoseconds.
Weight::from_parts(9_166_238, 0)
// Standard Error: 3_489
.saturating_add(Weight::from_parts(328_564, 0).saturating_mul(n.into()))
// Minimum execution time: 8_282_000 picoseconds.
Weight::from_parts(9_271_031, 0)
// Standard Error: 3_756
.saturating_add(Weight::from_parts(349_990, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: Lottery Lottery (r:1 w:1)
@@ -107,9 +104,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn start_lottery() -> Weight {
// Proof Size summary in bytes:
// Measured: `161`
// Estimated: `6596`
// Minimum execution time: 36_555_000 picoseconds.
Weight::from_parts(37_008_000, 6596)
// Estimated: `3593`
// Minimum execution time: 38_975_000 picoseconds.
Weight::from_parts(39_552_000, 3593)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -119,8 +116,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `219`
// Estimated: `1514`
// Minimum execution time: 8_230_000 picoseconds.
Weight::from_parts(8_355_000, 1514)
// Minimum execution time: 8_243_000 picoseconds.
Weight::from_parts(8_359_000, 1514)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -137,9 +134,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn on_initialize_end() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `16787`
// Minimum execution time: 60_097_000 picoseconds.
Weight::from_parts(62_055_000, 16787)
// Estimated: `6196`
// Minimum execution time: 76_062_000 picoseconds.
Weight::from_parts(76_547_000, 6196)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -158,9 +155,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn on_initialize_repeat() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `18276`
// Minimum execution time: 61_354_000 picoseconds.
Weight::from_parts(62_429_000, 18276)
// Estimated: `6196`
// Minimum execution time: 78_089_000 picoseconds.
Weight::from_parts(78_632_000, 6196)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -185,9 +182,9 @@ impl WeightInfo for () {
fn buy_ticket() -> Weight {
// Proof Size summary in bytes:
// Measured: `452`
// Estimated: `13121`
// Minimum execution time: 43_076_000 picoseconds.
Weight::from_parts(43_902_000, 13121)
// Estimated: `3593`
// Minimum execution time: 61_502_000 picoseconds.
Weight::from_parts(62_578_000, 3593)
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -198,10 +195,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_222_000 picoseconds.
Weight::from_parts(9_166_238, 0)
// Standard Error: 3_489
.saturating_add(Weight::from_parts(328_564, 0).saturating_mul(n.into()))
// Minimum execution time: 8_282_000 picoseconds.
Weight::from_parts(9_271_031, 0)
// Standard Error: 3_756
.saturating_add(Weight::from_parts(349_990, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: Lottery Lottery (r:1 w:1)
@@ -213,9 +210,9 @@ impl WeightInfo for () {
fn start_lottery() -> Weight {
// Proof Size summary in bytes:
// Measured: `161`
// Estimated: `6596`
// Minimum execution time: 36_555_000 picoseconds.
Weight::from_parts(37_008_000, 6596)
// Estimated: `3593`
// Minimum execution time: 38_975_000 picoseconds.
Weight::from_parts(39_552_000, 3593)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -225,8 +222,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `219`
// Estimated: `1514`
// Minimum execution time: 8_230_000 picoseconds.
Weight::from_parts(8_355_000, 1514)
// Minimum execution time: 8_243_000 picoseconds.
Weight::from_parts(8_359_000, 1514)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -243,9 +240,9 @@ impl WeightInfo for () {
fn on_initialize_end() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `16787`
// Minimum execution time: 60_097_000 picoseconds.
Weight::from_parts(62_055_000, 16787)
// Estimated: `6196`
// Minimum execution time: 76_062_000 picoseconds.
Weight::from_parts(76_547_000, 6196)
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -264,9 +261,9 @@ impl WeightInfo for () {
fn on_initialize_repeat() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `18276`
// Minimum execution time: 61_354_000 picoseconds.
Weight::from_parts(62_429_000, 18276)
// Estimated: `6196`
// Minimum execution time: 78_089_000 picoseconds.
Weight::from_parts(78_632_000, 6196)
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}