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
+77 -62
View File
@@ -18,25 +18,26 @@
//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-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: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// target/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./frame/balances/src/weights.rs
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json
// --pallet=pallet_balances
// --chain=dev
// --header=./HEADER-APACHE2
// --output=./frame/balances/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -64,10 +65,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `1723`
// Estimated: `2603`
// Minimum execution time: 47_557 nanoseconds.
Weight::from_parts(48_314_000, 2603)
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 37_815 nanoseconds.
Weight::from_ref_time(38_109_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -75,10 +77,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `1607`
// Estimated: `2603`
// Minimum execution time: 36_372 nanoseconds.
Weight::from_parts(37_432_000, 2603)
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 28_184 nanoseconds.
Weight::from_ref_time(49_250_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -86,10 +89,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `1757`
// Estimated: `2603`
// Minimum execution time: 26_671 nanoseconds.
Weight::from_parts(28_287_000, 2603)
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 17_474 nanoseconds.
Weight::from_ref_time(17_777_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -97,10 +101,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `1757`
// Estimated: `2603`
// Minimum execution time: 30_122 nanoseconds.
Weight::from_parts(30_615_000, 2603)
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 20_962 nanoseconds.
Weight::from_ref_time(21_419_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -108,10 +113,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `1719`
// Estimated: `5206`
// Minimum execution time: 47_891 nanoseconds.
Weight::from_parts(48_496_000, 5206)
// Measured: `135`
// Estimated: `6196`
// Minimum execution time: 39_713 nanoseconds.
Weight::from_ref_time(40_360_000)
.saturating_add(Weight::from_proof_size(6196))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -119,10 +125,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `1607`
// Estimated: `2603`
// Minimum execution time: 42_470 nanoseconds.
Weight::from_parts(42_950_000, 2603)
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 34_878 nanoseconds.
Weight::from_ref_time(35_121_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -130,10 +137,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `1641`
// Estimated: `2603`
// Minimum execution time: 23_230 nanoseconds.
Weight::from_parts(23_951_000, 2603)
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 16_790 nanoseconds.
Weight::from_ref_time(17_029_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -145,10 +153,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `1723`
// Estimated: `2603`
// Minimum execution time: 47_557 nanoseconds.
Weight::from_parts(48_314_000, 2603)
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 37_815 nanoseconds.
Weight::from_ref_time(38_109_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -156,10 +165,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `1607`
// Estimated: `2603`
// Minimum execution time: 36_372 nanoseconds.
Weight::from_parts(37_432_000, 2603)
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 28_184 nanoseconds.
Weight::from_ref_time(49_250_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -167,10 +177,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `1757`
// Estimated: `2603`
// Minimum execution time: 26_671 nanoseconds.
Weight::from_parts(28_287_000, 2603)
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 17_474 nanoseconds.
Weight::from_ref_time(17_777_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -178,10 +189,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `1757`
// Estimated: `2603`
// Minimum execution time: 30_122 nanoseconds.
Weight::from_parts(30_615_000, 2603)
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 20_962 nanoseconds.
Weight::from_ref_time(21_419_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -189,10 +201,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `1719`
// Estimated: `5206`
// Minimum execution time: 47_891 nanoseconds.
Weight::from_parts(48_496_000, 5206)
// Measured: `135`
// Estimated: `6196`
// Minimum execution time: 39_713 nanoseconds.
Weight::from_ref_time(40_360_000)
.saturating_add(Weight::from_proof_size(6196))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -200,10 +213,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `1607`
// Estimated: `2603`
// Minimum execution time: 42_470 nanoseconds.
Weight::from_parts(42_950_000, 2603)
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 34_878 nanoseconds.
Weight::from_ref_time(35_121_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -211,10 +225,11 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `1641`
// Estimated: `2603`
// Minimum execution time: 23_230 nanoseconds.
Weight::from_parts(23_951_000, 2603)
// Measured: `206`
// Estimated: `3593`
// Minimum execution time: 16_790 nanoseconds.
Weight::from_ref_time(17_029_000)
.saturating_add(Weight::from_proof_size(3593))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}