Skip to content

Commit

Permalink
Bench all (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier authored Jul 29, 2023
1 parent 3b4dbf9 commit 8c04578
Show file tree
Hide file tree
Showing 107 changed files with 5,402 additions and 5,079 deletions.
5 changes: 5 additions & 0 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ macro_rules! fast_runtime_or_not {
};
}

#[cfg(not(feature = "runtime-benchmarks"))]
pub const EXISTENTIAL_DEPOSIT: Balance = 0;
#[cfg(feature = "runtime-benchmarks")]
pub const EXISTENTIAL_DEPOSIT: Balance = 1;

/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the
/// node's balance type.
///
Expand Down
2 changes: 1 addition & 1 deletion runtime/crab/src/pallets/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use crate::*;

frame_support::parameter_types! {
pub const ExistentialDeposit:Balance = 0;
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
}

impl pallet_balances::Config for Runtime {
Expand Down
17 changes: 9 additions & 8 deletions runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-local"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-dev"), DB CACHE: 1024

// Executed Command:
// target/release/darwinia
Expand All @@ -35,7 +35,7 @@
// --heap-pages
// 4096
// --chain
// crab-local
// crab-dev
// --output
// runtime/crab/src/weights
// --extrinsic
Expand All @@ -50,9 +50,10 @@
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weight functions for `cumulus_pallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
Expand All @@ -63,8 +64,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `1527`
// Minimum execution time: 4_330_000 picoseconds.
Weight::from_parts(4_622_000, 0)
// Minimum execution time: 4_007_000 picoseconds.
Weight::from_parts(4_196_000, 0)
.saturating_add(Weight::from_parts(0, 1527))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -75,8 +76,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `1527`
// Minimum execution time: 4_327_000 picoseconds.
Weight::from_parts(4_526_000, 0)
// Minimum execution time: 3_970_000 picoseconds.
Weight::from_parts(4_307_000, 0)
.saturating_add(Weight::from_parts(0, 1527))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand Down
65 changes: 27 additions & 38 deletions runtime/crab/src/weights/darwinia_account_migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
//! Autogenerated weights for `darwinia_account_migration`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-local"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-dev"), DB CACHE: 1024

// Executed Command:
// target/release/darwinia
Expand All @@ -35,7 +35,7 @@
// --heap-pages
// 4096
// --chain
// crab-local
// crab-dev
// --output
// runtime/crab/src/weights
// --extrinsic
Expand All @@ -50,9 +50,10 @@
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weight functions for `darwinia_account_migration`.
pub struct WeightInfo<T>(PhantomData<T>);
Expand All @@ -63,10 +64,6 @@ impl<T: frame_system::Config> darwinia_account_migration::WeightInfo for WeightI
/// Proof: AccountMigration KtonAccounts (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(166), added: 2641, mode: MaxEncodedLen)
/// Storage: AccountMigration Vestings (r:1 w:1)
/// Proof Skipped: AccountMigration Vestings (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen)
/// Storage: AccountMigration Identities (r:1 w:1)
/// Proof: AccountMigration Identities (max_values: None, max_size: Some(9219), added: 11694, mode: MaxEncodedLen)
/// Storage: Identity Registrars (r:1 w:1)
Expand All @@ -78,24 +75,22 @@ impl<T: frame_system::Config> darwinia_account_migration::WeightInfo for WeightI
/// Storage: System Account (r:2 w:3)
/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:2)
/// Proof: Assets Account (max_values: None, max_size: Some(94), added: 2569, mode: MaxEncodedLen)
/// Proof: Assets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
/// Storage: DarwiniaStaking Ledgers (r:0 w:1)
/// Proof: DarwiniaStaking Ledgers (max_values: None, max_size: Some(1833), added: 4308, mode: MaxEncodedLen)
/// Storage: Identity IdentityOf (r:0 w:1)
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7526), added: 10001, mode: MaxEncodedLen)
/// Storage: Vesting Vesting (r:0 w:1)
/// Proof: Vesting Vesting (max_values: None, max_size: Some(1045), added: 3520, mode: MaxEncodedLen)
/// Storage: Deposit Deposits (r:0 w:1)
/// Proof: Deposit Deposits (max_values: None, max_size: Some(26150), added: 28625, mode: MaxEncodedLen)
fn migrate() -> Weight {
// Proof Size summary in bytes:
// Measured: `30224`
// Estimated: `113012`
// Minimum execution time: 142_559_000 picoseconds.
Weight::from_parts(147_029_000, 0)
.saturating_add(Weight::from_parts(0, 113012))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().writes(18))
// Measured: `29142`
// Estimated: `32607`
// Minimum execution time: 146_143_000 picoseconds.
Weight::from_parts(149_786_000, 0)
.saturating_add(Weight::from_parts(0, 32607))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(15))
}
/// Storage: AccountMigration Multisigs (r:0 w:1)
/// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured)
Expand All @@ -105,10 +100,6 @@ impl<T: frame_system::Config> darwinia_account_migration::WeightInfo for WeightI
/// Proof: AccountMigration KtonAccounts (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(166), added: 2641, mode: MaxEncodedLen)
/// Storage: AccountMigration Vestings (r:1 w:1)
/// Proof Skipped: AccountMigration Vestings (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen)
/// Storage: AccountMigration Identities (r:1 w:1)
/// Proof: AccountMigration Identities (max_values: None, max_size: Some(9219), added: 11694, mode: MaxEncodedLen)
/// Storage: Identity Registrars (r:1 w:1)
Expand All @@ -120,13 +111,11 @@ impl<T: frame_system::Config> darwinia_account_migration::WeightInfo for WeightI
/// Storage: System Account (r:2 w:3)
/// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:2)
/// Proof: Assets Account (max_values: None, max_size: Some(94), added: 2569, mode: MaxEncodedLen)
/// Proof: Assets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
/// Storage: DarwiniaStaking Ledgers (r:0 w:1)
/// Proof: DarwiniaStaking Ledgers (max_values: None, max_size: Some(1833), added: 4308, mode: MaxEncodedLen)
/// Storage: Identity IdentityOf (r:0 w:1)
/// Proof: Identity IdentityOf (max_values: None, max_size: Some(7526), added: 10001, mode: MaxEncodedLen)
/// Storage: Vesting Vesting (r:0 w:1)
/// Proof: Vesting Vesting (max_values: None, max_size: Some(1045), added: 3520, mode: MaxEncodedLen)
/// Storage: Deposit Deposits (r:0 w:1)
/// Proof: Deposit Deposits (max_values: None, max_size: Some(26150), added: 28625, mode: MaxEncodedLen)
/// The range of component `x` is `[0, 99]`.
Expand All @@ -135,16 +124,16 @@ impl<T: frame_system::Config> darwinia_account_migration::WeightInfo for WeightI
fn migrate_multisig(x: u32, _y: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `5 + x * (570 ±0) + z * (570 ±0)`
// Minimum execution time: 8_138_000 picoseconds.
Weight::from_parts(23_149_624, 0)
.saturating_add(Weight::from_parts(0, 5))
// Standard Error: 12_670
.saturating_add(Weight::from_parts(15_273, 0).saturating_mul(x.into()))
// Estimated: `2 + x * (165 ±0) + z * (165 ±0)`
// Minimum execution time: 6_819_000 picoseconds.
Weight::from_parts(23_005_586, 0)
.saturating_add(Weight::from_parts(0, 2))
// Standard Error: 13_028
.saturating_add(Weight::from_parts(2_801, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 570).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(0, 570).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 165).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(0, 165).saturating_mul(z.into()))
}
/// Storage: AccountMigration Multisigs (r:1 w:1)
/// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured)
Expand All @@ -153,10 +142,10 @@ impl<T: frame_system::Config> darwinia_account_migration::WeightInfo for WeightI
fn complete_multisig_migration() -> Weight {
// Proof Size summary in bytes:
// Measured: `3499`
// Estimated: `10545`
// Minimum execution time: 9_778_000 picoseconds.
Weight::from_parts(10_122_000, 0)
.saturating_add(Weight::from_parts(0, 10545))
// Estimated: `6964`
// Minimum execution time: 8_515_000 picoseconds.
Weight::from_parts(8_883_000, 0)
.saturating_add(Weight::from_parts(0, 6964))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
Expand Down
37 changes: 19 additions & 18 deletions runtime/crab/src/weights/darwinia_deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
//! Autogenerated weights for `darwinia_deposit`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-local"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-dev"), DB CACHE: 1024

// Executed Command:
// target/release/darwinia
Expand All @@ -35,7 +35,7 @@
// --heap-pages
// 4096
// --chain
// crab-local
// crab-dev
// --output
// runtime/crab/src/weights
// --extrinsic
Expand All @@ -50,9 +50,10 @@
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weight functions for `darwinia_deposit`.
pub struct WeightInfo<T>(PhantomData<T>);
Expand All @@ -66,14 +67,14 @@ impl<T: frame_system::Config> darwinia_deposit::WeightInfo for WeightInfo<T> {
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(166), added: 2641, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:1)
/// Proof: Assets Account (max_values: None, max_size: Some(94), added: 2569, mode: MaxEncodedLen)
/// Proof: Assets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
fn lock() -> Weight {
// Proof Size summary in bytes:
// Measured: `26779`
// Estimated: `41879`
// Minimum execution time: 62_153_000 picoseconds.
Weight::from_parts(69_199_000, 0)
.saturating_add(Weight::from_parts(0, 41879))
// Estimated: `29615`
// Minimum execution time: 73_525_000 picoseconds.
Weight::from_parts(79_299_000, 0)
.saturating_add(Weight::from_parts(0, 29615))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
Expand All @@ -86,10 +87,10 @@ impl<T: frame_system::Config> darwinia_deposit::WeightInfo for WeightInfo<T> {
fn claim() -> Weight {
// Proof Size summary in bytes:
// Measured: `26546`
// Estimated: `34689`
// Minimum execution time: 1_413_394_000 picoseconds.
Weight::from_parts(1_439_556_000, 0)
.saturating_add(Weight::from_parts(0, 34689))
// Estimated: `29615`
// Minimum execution time: 1_261_970_000 picoseconds.
Weight::from_parts(1_286_830_000, 0)
.saturating_add(Weight::from_parts(0, 29615))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
Expand All @@ -98,16 +99,16 @@ impl<T: frame_system::Config> darwinia_deposit::WeightInfo for WeightInfo<T> {
/// Storage: Timestamp Now (r:1 w:0)
/// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:1)
/// Proof: Assets Account (max_values: None, max_size: Some(94), added: 2569, mode: MaxEncodedLen)
/// Proof: Assets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(166), added: 2641, mode: MaxEncodedLen)
fn claim_with_penalty() -> Weight {
// Proof Size summary in bytes:
// Measured: `26668`
// Estimated: `38298`
// Minimum execution time: 54_872_000 picoseconds.
Weight::from_parts(65_645_000, 0)
.saturating_add(Weight::from_parts(0, 38298))
// Estimated: `29615`
// Minimum execution time: 49_495_000 picoseconds.
Weight::from_parts(53_007_000, 0)
.saturating_add(Weight::from_parts(0, 29615))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
Expand Down
Loading

0 comments on commit 8c04578

Please sign in to comment.