Skip to content

Commit

Permalink
feat: re-run pallet_balances benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma committed Sep 26, 2023
1 parent 9fcc5a6 commit 817ea7e
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtime/local/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_balances::SubstrateWeight<Runtime>;
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
Expand Down
1 change: 1 addition & 0 deletions runtime/local/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
// along with Astar. If not, see <http://www.gnu.org/licenses/>.

pub mod pallet_assets;
pub mod pallet_balances;
153 changes: 153 additions & 0 deletions runtime/local/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@

// This file is part of Astar.

// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later

// Astar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Astar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Astar. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-09-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `devserver-01`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024
// Executed Command:
// ./target/release/astar-collator
// benchmark
// pallet
// --chain=shibuya-dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./benchmark-results/balances_weights.rs
// --template=./scripts/templates/weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

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

/// Weights for pallet_balances using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for SubstrateWeight<T> {
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
// Estimated: `3593`
// Minimum execution time: 54_598_000 picoseconds.
Weight::from_parts(55_039_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// 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: `52`
// Estimated: `3593`
// Minimum execution time: 39_626_000 picoseconds.
Weight::from_parts(40_238_000, 3593)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3593`
// Minimum execution time: 16_675_000 picoseconds.
Weight::from_parts(16_939_000, 3593)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `182`
// Estimated: `3593`
// Minimum execution time: 26_023_000 picoseconds.
Weight::from_parts(26_587_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:2 w:2)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `197`
// Estimated: `6196`
// Minimum execution time: 57_231_000 picoseconds.
Weight::from_parts(58_030_000, 6196)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
// Estimated: `3593`
// Minimum execution time: 51_686_000 picoseconds.
Weight::from_parts(52_193_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3593`
// Minimum execution time: 19_416_000 picoseconds.
Weight::from_parts(19_850_000, 3593)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:999 w:999)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 19_161_000 picoseconds.
Weight::from_parts(19_253_000, 990)
// Standard Error: 8_562
.saturating_add(Weight::from_parts(13_649_240, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
}
2 changes: 1 addition & 1 deletion runtime/shibuya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = frame_system::Pallet<Runtime>;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::pallet_balances::SubstrateWeight<Runtime>;
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
Expand Down
1 change: 1 addition & 0 deletions runtime/shibuya/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
// along with Astar. If not, see <http://www.gnu.org/licenses/>.

pub mod pallet_assets;
pub mod pallet_balances;
153 changes: 153 additions & 0 deletions runtime/shibuya/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@

// This file is part of Astar.

// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later

// Astar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Astar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Astar. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-09-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `devserver-01`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024
// Executed Command:
// ./target/release/astar-collator
// benchmark
// pallet
// --chain=shibuya-dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./benchmark-results/balances_weights.rs
// --template=./scripts/templates/weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

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

/// Weights for pallet_balances using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for SubstrateWeight<T> {
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
// Estimated: `3593`
// Minimum execution time: 54_598_000 picoseconds.
Weight::from_parts(55_039_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// 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: `52`
// Estimated: `3593`
// Minimum execution time: 39_626_000 picoseconds.
Weight::from_parts(40_238_000, 3593)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3593`
// Minimum execution time: 16_675_000 picoseconds.
Weight::from_parts(16_939_000, 3593)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `182`
// Estimated: `3593`
// Minimum execution time: 26_023_000 picoseconds.
Weight::from_parts(26_587_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:2 w:2)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `197`
// Estimated: `6196`
// Minimum execution time: 57_231_000 picoseconds.
Weight::from_parts(58_030_000, 6196)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts EvmToNative (r:1 w:0)
/// Proof: UnifiedAccounts EvmToNative (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
// Estimated: `3593`
// Minimum execution time: 51_686_000 picoseconds.
Weight::from_parts(52_193_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3593`
// Minimum execution time: 19_416_000 picoseconds.
Weight::from_parts(19_850_000, 3593)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: System Account (r:999 w:999)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 19_161_000 picoseconds.
Weight::from_parts(19_253_000, 990)
// Standard Error: 8_562
.saturating_add(Weight::from_parts(13_649_240, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
}

0 comments on commit 817ea7e

Please sign in to comment.