mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +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_elections_phragmen
|
||||
//!
|
||||
//! 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-19, 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/optimized/substrate
|
||||
// benchmark
|
||||
// --chain=dev
|
||||
// --steps=50
|
||||
@@ -32,9 +32,10 @@
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --output=./frame/elections-phragmen/src/weights.rs
|
||||
// --template=./.maintain/frame-weight-template.hbs
|
||||
|
||||
// --output=./weights-optimized/frame/elections-phragmen/src//weights.rs
|
||||
// --template=.maintain/frame-weight-template.hbs
|
||||
// --header=HEADER-APACHE2
|
||||
// --raw
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -53,8 +54,8 @@ pub trait WeightInfo {
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight;
|
||||
fn renounce_candidacy_members() -> Weight;
|
||||
fn renounce_candidacy_runners_up() -> Weight;
|
||||
fn remove_member_with_replacement() -> Weight;
|
||||
fn remove_member_without_replacement() -> Weight;
|
||||
fn remove_member_with_replacement() -> Weight;
|
||||
fn remove_member_wrong_refund() -> Weight;
|
||||
fn clean_defunct_voters(v: u32, d: u32, ) -> Weight;
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight;
|
||||
@@ -69,9 +70,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_equal(v: u32, ) -> Weight {
|
||||
(42_509_000 as Weight)
|
||||
(24_231_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((372_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((305_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -81,9 +82,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_more(v: u32, ) -> Weight {
|
||||
(65_311_000 as Weight)
|
||||
(37_524_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((419_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((285_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -93,16 +94,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_less(v: u32, ) -> Weight {
|
||||
(65_444_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((376_000 as Weight).saturating_mul(v as Weight))
|
||||
(37_350_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((311_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn remove_voter() -> Weight {
|
||||
(61_585_000 as Weight)
|
||||
(35_119_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -110,53 +111,54 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn submit_candidacy(c: u32, ) -> Weight {
|
||||
(53_333_000 as Weight)
|
||||
(36_110_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((267_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((193_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
||||
(49_128_000 as Weight)
|
||||
(30_976_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((144_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((129_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Council Prime (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:0)
|
||||
// Storage: Council Members (r:0 w:1)
|
||||
fn renounce_candidacy_members() -> Weight {
|
||||
(70_685_000 as Weight)
|
||||
(44_456_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
fn renounce_candidacy_runners_up() -> Weight {
|
||||
(49_766_000 as Weight)
|
||||
(31_990_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Benchmark Override (r:0 w:0)
|
||||
fn remove_member_without_replacement() -> Weight {
|
||||
(2_000_000_000_000 as Weight)
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Council Prime (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:0)
|
||||
// Storage: Council Members (r:0 w:1)
|
||||
fn remove_member_with_replacement() -> Weight {
|
||||
(76_153_000 as Weight)
|
||||
(51_221_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
fn remove_member_without_replacement() -> Weight {
|
||||
T::BlockWeights::get().max_block
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn remove_member_wrong_refund() -> Weight {
|
||||
(6_697_000 as Weight)
|
||||
(4_773_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:251 w:250)
|
||||
@@ -167,8 +169,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: System Account (r:250 w:250)
|
||||
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 60_000
|
||||
.saturating_add((107_467_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 31_000
|
||||
.saturating_add((51_744_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
||||
@@ -177,19 +179,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Voting (r:502 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Council Proposals (r:1 w:0)
|
||||
// Storage: Elections ElectionRounds (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Instance1Collective Prime (r:0 w:1)
|
||||
// Storage: Council Members (r:0 w:1)
|
||||
// Storage: Council Prime (r:0 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_846_000
|
||||
.saturating_add((39_843_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 768_000
|
||||
.saturating_add((60_623_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 52_000
|
||||
.saturating_add((3_884_000 as Weight).saturating_mul(e as Weight))
|
||||
// Standard Error: 1_744_000
|
||||
.saturating_add((29_677_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 725_000
|
||||
.saturating_add((51_480_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 49_000
|
||||
.saturating_add((3_491_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
|
||||
@@ -204,9 +206,9 @@ impl WeightInfo for () {
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_equal(v: u32, ) -> Weight {
|
||||
(42_509_000 as Weight)
|
||||
(24_231_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((372_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((305_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -216,9 +218,9 @@ impl WeightInfo for () {
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_more(v: u32, ) -> Weight {
|
||||
(65_311_000 as Weight)
|
||||
(37_524_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((419_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((285_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -228,16 +230,16 @@ impl WeightInfo for () {
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn vote_less(v: u32, ) -> Weight {
|
||||
(65_444_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((376_000 as Weight).saturating_mul(v as Weight))
|
||||
(37_350_000 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((311_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:1 w:1)
|
||||
// Storage: Balances Locks (r:1 w:1)
|
||||
fn remove_voter() -> Weight {
|
||||
(61_585_000 as Weight)
|
||||
(35_119_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
@@ -245,55 +247,54 @@ impl WeightInfo for () {
|
||||
// Storage: Elections Members (r:1 w:0)
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn submit_candidacy(c: u32, ) -> Weight {
|
||||
(53_333_000 as Weight)
|
||||
(36_110_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((267_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((193_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Candidates (r:1 w:1)
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
||||
(49_128_000 as Weight)
|
||||
(30_976_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((144_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((129_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Council Prime (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:0)
|
||||
// Storage: Council Members (r:0 w:1)
|
||||
fn renounce_candidacy_members() -> Weight {
|
||||
(70_685_000 as Weight)
|
||||
(44_456_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
fn renounce_candidacy_runners_up() -> Weight {
|
||||
(49_766_000 as Weight)
|
||||
(31_990_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Benchmark Override (r:0 w:0)
|
||||
fn remove_member_without_replacement() -> Weight {
|
||||
(2_000_000_000_000 as Weight)
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Instance1Collective Prime (r:1 w:1)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Council Prime (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:0)
|
||||
// Storage: Council Members (r:0 w:1)
|
||||
fn remove_member_with_replacement() -> Weight {
|
||||
(76_153_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
fn remove_member_without_replacement() -> Weight {
|
||||
(76_153_000 as Weight)
|
||||
(51_221_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Elections RunnersUp (r:1 w:0)
|
||||
fn remove_member_wrong_refund() -> Weight {
|
||||
(6_697_000 as Weight)
|
||||
(4_773_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
// Storage: Elections Voting (r:251 w:250)
|
||||
@@ -304,8 +305,8 @@ impl WeightInfo for () {
|
||||
// Storage: System Account (r:250 w:250)
|
||||
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 60_000
|
||||
.saturating_add((107_467_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 31_000
|
||||
.saturating_add((51_744_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
||||
@@ -314,19 +315,19 @@ impl WeightInfo for () {
|
||||
// Storage: Elections Members (r:1 w:1)
|
||||
// Storage: Elections RunnersUp (r:1 w:1)
|
||||
// Storage: Elections Voting (r:502 w:0)
|
||||
// Storage: Instance1Collective Proposals (r:1 w:0)
|
||||
// Storage: Council Proposals (r:1 w:0)
|
||||
// Storage: Elections ElectionRounds (r:1 w:1)
|
||||
// Storage: Instance1Collective Members (r:0 w:1)
|
||||
// Storage: Instance1Collective Prime (r:0 w:1)
|
||||
// Storage: Council Members (r:0 w:1)
|
||||
// Storage: Council Prime (r:0 w:1)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_846_000
|
||||
.saturating_add((39_843_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 768_000
|
||||
.saturating_add((60_623_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 52_000
|
||||
.saturating_add((3_884_000 as Weight).saturating_mul(e as Weight))
|
||||
// Standard Error: 1_744_000
|
||||
.saturating_add((29_677_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 725_000
|
||||
.saturating_add((51_480_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 49_000
|
||||
.saturating_add((3_491_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
|
||||
|
||||
Reference in New Issue
Block a user