mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 06:21:11 +00:00
Optimized weights (#10692)
* Add optimization flags to 'release' profile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Optimized weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add missing pallets Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add `production` profile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * pallet-collective: fix tests the weight of System.remark went to 0, the collective test uses a remark call to trigger an out-of-gas condition so I replaced it with a `remark_with_event` call. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
8c6301a6e6
commit
9daea28085
@@ -1,6 +1,6 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2021-2022 Parity Technologies (UK) Ltd.
|
||||
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -18,11 +18,11 @@
|
||||
//! Autogenerated weights for pallet_membership
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/release/substrate
|
||||
// ./target/lto-fat-cg1/substrate
|
||||
// benchmark
|
||||
// --chain=dev
|
||||
// --steps=50
|
||||
@@ -33,8 +33,9 @@
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --output=./frame/membership/src/weights.rs
|
||||
// --template=./.maintain/frame-weight-template.hbs
|
||||
|
||||
// --template=.maintain/frame-weight-template.hbs
|
||||
// --header=LICENSE-APACHE2
|
||||
// --raw
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -57,79 +58,79 @@ pub trait WeightInfo {
|
||||
/// Weights for pallet_membership using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
(23_668_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((142_000 as Weight).saturating_mul(m as Weight))
|
||||
(14_403_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((94_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
(29_149_000 as Weight)
|
||||
(17_005_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((111_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((90_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
(29_289_000 as Weight)
|
||||
(17_210_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((126_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((98_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
(30_178_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(m as Weight))
|
||||
(17_425_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((194_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:1)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
(31_049_000 as Weight)
|
||||
(17_948_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((121_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((95_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
(8_006_000 as Weight)
|
||||
(4_579_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((89_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((71_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn clear_prime(m: u32, ) -> Weight {
|
||||
(3_452_000 as Weight)
|
||||
(1_481_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
@@ -138,79 +139,79 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
(23_668_000 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((142_000 as Weight).saturating_mul(m as Weight))
|
||||
(14_403_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((94_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
(29_149_000 as Weight)
|
||||
(17_005_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((111_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((90_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
(29_289_000 as Weight)
|
||||
(17_210_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((126_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((98_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:0)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:0)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
(30_178_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((286_000 as Weight).saturating_mul(m as Weight))
|
||||
(17_425_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((194_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:1)
|
||||
// Storage: Instance2Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:1 w:1)
|
||||
// Storage: Instance2Collective Members (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Proposals (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:1 w:1)
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
(31_049_000 as Weight)
|
||||
(17_948_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((121_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((95_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Members (r:1 w:0)
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Members (r:1 w:0)
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
(8_006_000 as Weight)
|
||||
(4_579_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((89_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((71_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Instance1Membership Prime (r:0 w:1)
|
||||
// Storage: Instance2Collective Prime (r:0 w:1)
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn clear_prime(m: u32, ) -> Weight {
|
||||
(3_452_000 as Weight)
|
||||
(1_481_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
|
||||
Reference in New Issue
Block a user