Fix V2 PoV benchmarking (#13485)

* Bump default 'additional_trie_layers' to two

The default here only works for extremely small runtimes, which have
no more than 16 storage prefices. This is changed to a "sane" default
of 2, which is save for runtimes with up to 4096 storage prefices (eg StorageValue).

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

* Update tests and test weights

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

* Fix PoV weights

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

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_message_queue

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_glutton

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_glutton

* Fix sanity check

>0 would also do as a check, but let's try this.

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

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-02-28 14:47:36 +01:00
committed by GitHub
parent 033a0d01a4
commit 1eb0cd31b9
8 changed files with 576 additions and 477 deletions
+97 -97
View File
@@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_message_queue
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-02-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-02-27, 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`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
@@ -70,11 +70,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
fn ready_ring_knit() -> Weight {
// Proof Size summary in bytes:
// Measured: `829`
// Estimated: `5547`
// Minimum execution time: 15_241 nanoseconds.
Weight::from_ref_time(15_603_000)
.saturating_add(Weight::from_proof_size(5547))
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 12_538 nanoseconds.
Weight::from_ref_time(12_799_000)
.saturating_add(Weight::from_proof_size(7527))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -84,11 +84,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
fn ready_ring_unknit() -> Weight {
// Proof Size summary in bytes:
// Measured: `829`
// Estimated: `5547`
// Minimum execution time: 14_652 nanoseconds.
Weight::from_ref_time(14_983_000)
.saturating_add(Weight::from_proof_size(5547))
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 11_727 nanoseconds.
Weight::from_ref_time(12_177_000)
.saturating_add(Weight::from_proof_size(7527))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -96,11 +96,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
fn service_queue_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `576`
// Estimated: `2524`
// Minimum execution time: 5_750 nanoseconds.
Weight::from_ref_time(6_003_000)
.saturating_add(Weight::from_proof_size(2524))
// Measured: `42`
// Estimated: `3514`
// Minimum execution time: 4_983 nanoseconds.
Weight::from_ref_time(5_174_000)
.saturating_add(Weight::from_proof_size(3514))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -108,11 +108,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn service_page_base_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `647`
// Estimated: `68059`
// Minimum execution time: 8_257 nanoseconds.
Weight::from_ref_time(8_506_000)
.saturating_add(Weight::from_proof_size(68059))
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_299 nanoseconds.
Weight::from_ref_time(6_670_000)
.saturating_add(Weight::from_proof_size(69049))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -120,20 +120,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn service_page_base_no_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `647`
// Estimated: `68059`
// Minimum execution time: 8_422 nanoseconds.
Weight::from_ref_time(8_589_000)
.saturating_add(Weight::from_proof_size(68059))
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_762 nanoseconds.
Weight::from_ref_time(7_059_000)
.saturating_add(Weight::from_proof_size(69049))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
fn service_page_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `972`
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 81_929 nanoseconds.
Weight::from_ref_time(82_375_000)
// Minimum execution time: 72_681 nanoseconds.
Weight::from_ref_time(73_147_000)
.saturating_add(Weight::from_proof_size(0))
}
/// Storage: MessageQueue ServiceHead (r:1 w:1)
@@ -142,11 +142,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
fn bump_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `706`
// Estimated: `3023`
// Minimum execution time: 8_992 nanoseconds.
Weight::from_ref_time(9_200_000)
.saturating_add(Weight::from_proof_size(3023))
// Measured: `172`
// Estimated: `5003`
// Minimum execution time: 7_066 nanoseconds.
Weight::from_ref_time(7_214_000)
.saturating_add(Weight::from_proof_size(5003))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -156,11 +156,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn reap_page() -> Weight {
// Proof Size summary in bytes:
// Measured: `66825`
// Estimated: `70583`
// Minimum execution time: 68_292 nanoseconds.
Weight::from_ref_time(69_108_000)
.saturating_add(Weight::from_proof_size(70583))
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 57_778 nanoseconds.
Weight::from_ref_time(58_778_000)
.saturating_add(Weight::from_proof_size(72563))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -170,11 +170,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn execute_overweight_page_removed() -> Weight {
// Proof Size summary in bytes:
// Measured: `66825`
// Estimated: `70583`
// Minimum execution time: 83_855 nanoseconds.
Weight::from_ref_time(84_946_000)
.saturating_add(Weight::from_proof_size(70583))
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 72_144 nanoseconds.
Weight::from_ref_time(72_942_000)
.saturating_add(Weight::from_proof_size(72563))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -184,11 +184,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn execute_overweight_page_updated() -> Weight {
// Proof Size summary in bytes:
// Measured: `66825`
// Estimated: `70583`
// Minimum execution time: 96_997 nanoseconds.
Weight::from_ref_time(98_668_000)
.saturating_add(Weight::from_proof_size(70583))
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 84_890 nanoseconds.
Weight::from_ref_time(86_073_000)
.saturating_add(Weight::from_proof_size(72563))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -202,11 +202,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
fn ready_ring_knit() -> Weight {
// Proof Size summary in bytes:
// Measured: `829`
// Estimated: `5547`
// Minimum execution time: 15_241 nanoseconds.
Weight::from_ref_time(15_603_000)
.saturating_add(Weight::from_proof_size(5547))
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 12_538 nanoseconds.
Weight::from_ref_time(12_799_000)
.saturating_add(Weight::from_proof_size(7527))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -216,11 +216,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
fn ready_ring_unknit() -> Weight {
// Proof Size summary in bytes:
// Measured: `829`
// Estimated: `5547`
// Minimum execution time: 14_652 nanoseconds.
Weight::from_ref_time(14_983_000)
.saturating_add(Weight::from_proof_size(5547))
// Measured: `295`
// Estimated: `7527`
// Minimum execution time: 11_727 nanoseconds.
Weight::from_ref_time(12_177_000)
.saturating_add(Weight::from_proof_size(7527))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -228,11 +228,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
fn service_queue_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `576`
// Estimated: `2524`
// Minimum execution time: 5_750 nanoseconds.
Weight::from_ref_time(6_003_000)
.saturating_add(Weight::from_proof_size(2524))
// Measured: `42`
// Estimated: `3514`
// Minimum execution time: 4_983 nanoseconds.
Weight::from_ref_time(5_174_000)
.saturating_add(Weight::from_proof_size(3514))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -240,11 +240,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn service_page_base_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `647`
// Estimated: `68059`
// Minimum execution time: 8_257 nanoseconds.
Weight::from_ref_time(8_506_000)
.saturating_add(Weight::from_proof_size(68059))
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_299 nanoseconds.
Weight::from_ref_time(6_670_000)
.saturating_add(Weight::from_proof_size(69049))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -252,20 +252,20 @@ impl WeightInfo for () {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn service_page_base_no_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `647`
// Estimated: `68059`
// Minimum execution time: 8_422 nanoseconds.
Weight::from_ref_time(8_589_000)
.saturating_add(Weight::from_proof_size(68059))
// Measured: `113`
// Estimated: `69049`
// Minimum execution time: 6_762 nanoseconds.
Weight::from_ref_time(7_059_000)
.saturating_add(Weight::from_proof_size(69049))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
fn service_page_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `972`
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 81_929 nanoseconds.
Weight::from_ref_time(82_375_000)
// Minimum execution time: 72_681 nanoseconds.
Weight::from_ref_time(73_147_000)
.saturating_add(Weight::from_proof_size(0))
}
/// Storage: MessageQueue ServiceHead (r:1 w:1)
@@ -274,11 +274,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)
fn bump_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `706`
// Estimated: `3023`
// Minimum execution time: 8_992 nanoseconds.
Weight::from_ref_time(9_200_000)
.saturating_add(Weight::from_proof_size(3023))
// Measured: `172`
// Estimated: `5003`
// Minimum execution time: 7_066 nanoseconds.
Weight::from_ref_time(7_214_000)
.saturating_add(Weight::from_proof_size(5003))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -288,11 +288,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn reap_page() -> Weight {
// Proof Size summary in bytes:
// Measured: `66825`
// Estimated: `70583`
// Minimum execution time: 68_292 nanoseconds.
Weight::from_ref_time(69_108_000)
.saturating_add(Weight::from_proof_size(70583))
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 57_778 nanoseconds.
Weight::from_ref_time(58_778_000)
.saturating_add(Weight::from_proof_size(72563))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -302,11 +302,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn execute_overweight_page_removed() -> Weight {
// Proof Size summary in bytes:
// Measured: `66825`
// Estimated: `70583`
// Minimum execution time: 83_855 nanoseconds.
Weight::from_ref_time(84_946_000)
.saturating_add(Weight::from_proof_size(70583))
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 72_144 nanoseconds.
Weight::from_ref_time(72_942_000)
.saturating_add(Weight::from_proof_size(72563))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -316,11 +316,11 @@ impl WeightInfo for () {
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65584), added: 68059, mode: MaxEncodedLen)
fn execute_overweight_page_updated() -> Weight {
// Proof Size summary in bytes:
// Measured: `66825`
// Estimated: `70583`
// Minimum execution time: 96_997 nanoseconds.
Weight::from_ref_time(98_668_000)
.saturating_add(Weight::from_proof_size(70583))
// Measured: `65742`
// Estimated: `72563`
// Minimum execution time: 84_890 nanoseconds.
Weight::from_ref_time(86_073_000)
.saturating_add(Weight::from_proof_size(72563))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}