mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Add baseline benchmarks (#4777)
* Don't merge this Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * Add baseline benches Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Don't merge this" This reverts commit d0fcc4f9cf83492862618c3b254cb6589f1b1831. * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=frame_benchmarking::baseline --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/frame_benchmarking_baseline.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=frame_benchmarking::baseline --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/frame_benchmarking_baseline.rs * Add weight modules Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1e0984bca6
commit
88a4a748be
@@ -2974,6 +2974,7 @@ mod benches {
|
||||
// Substrate
|
||||
[pallet_balances, Balances]
|
||||
[pallet_bags_list, BagsList]
|
||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||
[pallet_bounties, Bounties]
|
||||
[pallet_collective, Council]
|
||||
[pallet_collective, TechnicalCommittee]
|
||||
@@ -3340,6 +3341,7 @@ sp_api::impl_runtime_apis! {
|
||||
use pallet_session_benchmarking::Pallet as SessionBench;
|
||||
use pallet_offences_benchmarking::Pallet as OffencesBench;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
@@ -3360,10 +3362,12 @@ sp_api::impl_runtime_apis! {
|
||||
use pallet_session_benchmarking::Pallet as SessionBench;
|
||||
use pallet_offences_benchmarking::Pallet as OffencesBench;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||
|
||||
impl pallet_session_benchmarking::Config for Runtime {}
|
||||
impl pallet_offences_benchmarking::Config for Runtime {}
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl frame_benchmarking::baseline::Config for Runtime {}
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
// Block Number
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `frame_benchmarking::baseline`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-01-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=frame_benchmarking::baseline
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/frame_benchmarking_baseline.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `frame_benchmarking::baseline`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for WeightInfo<T> {
|
||||
fn addition(_i: u32, ) -> Weight {
|
||||
(128_000 as Weight)
|
||||
}
|
||||
fn subtraction(_i: u32, ) -> Weight {
|
||||
(128_000 as Weight)
|
||||
}
|
||||
fn multiplication(_i: u32, ) -> Weight {
|
||||
(133_000 as Weight)
|
||||
}
|
||||
fn division(_i: u32, ) -> Weight {
|
||||
(147_000 as Weight)
|
||||
}
|
||||
fn hashing(i: u32, ) -> Weight {
|
||||
(19_711_716_000 as Weight)
|
||||
// Standard Error: 116_000
|
||||
.saturating_add((320_000 as Weight).saturating_mul(i as Weight))
|
||||
}
|
||||
fn sr25519_verification(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((47_625_000 as Weight).saturating_mul(i as Weight))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn storage_read(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((2_027_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
// Storage: Skipped Metadata (r:0 w:0)
|
||||
fn storage_write(i: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((329_000 as Weight).saturating_mul(i as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot is free software: you can redistribute it and/or modify
|
||||
@@ -15,12 +15,12 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-01-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/release/polkadot
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
@@ -33,6 +33,7 @@
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
@@ -42,39 +43,45 @@ use sp_std::marker::PhantomData;
|
||||
/// Weight functions for `pallet_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
(73_559_000 as Weight)
|
||||
(29_999_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
(54_667_000 as Weight)
|
||||
(23_263_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn set_balance_creating() -> Weight {
|
||||
(29_203_000 as Weight)
|
||||
(14_780_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn set_balance_killing() -> Weight {
|
||||
(35_128_000 as Weight)
|
||||
(17_217_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn force_transfer() -> Weight {
|
||||
(72_833_000 as Weight)
|
||||
(30_538_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_all() -> Weight {
|
||||
(67_554_000 as Weight)
|
||||
(27_937_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn force_unreserve() -> Weight {
|
||||
(27_766_000 as Weight)
|
||||
(13_646_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user