mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Make election benchmarks more *memory-aware* (#9286)
* Make benchmarks a bit better with mem * Make election benchmarks more *memory-aware* * Fix a few errors * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Manually fix the weights * Update lock file * remove dupe * Fix tests * cargo update pwasm Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_election_provider_multi_phase
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-20, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-07-07, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -50,7 +50,7 @@ pub trait WeightInfo {
|
||||
fn finalize_signed_phase_accept_solution() -> Weight;
|
||||
fn finalize_signed_phase_reject_solution() -> Weight;
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight;
|
||||
fn elect_queued() -> Weight;
|
||||
fn elect_queued(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
|
||||
fn submit(c: u32, ) -> Weight;
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
|
||||
@@ -60,69 +60,75 @@ pub trait WeightInfo {
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
(33_392_000 as Weight)
|
||||
(33_170_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||
}
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
(115_659_000 as Weight)
|
||||
(113_680_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn on_initialize_open_unsigned_with_snapshot() -> Weight {
|
||||
(114_970_000 as Weight)
|
||||
(113_619_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(51_442_000 as Weight)
|
||||
(60_184_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(23_160_000 as Weight)
|
||||
(40_151_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight {
|
||||
(24_101_000 as Weight)
|
||||
(23_833_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn elect_queued() -> Weight {
|
||||
(6_153_604_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
fn elect_queued(v: u32, _t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(51_573_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((9_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_957_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((588_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||
}
|
||||
fn submit(c: u32, ) -> Weight {
|
||||
(78_972_000 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((308_000 as Weight).saturating_mul(c as Weight))
|
||||
(77_469_000 as Weight)
|
||||
// Standard Error: 17_000
|
||||
.saturating_add((281_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((3_572_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 42_000
|
||||
.saturating_add((23_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((11_529_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 63_000
|
||||
.saturating_add((3_333_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((3_667_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 29_000
|
||||
.saturating_add((497_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((11_228_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 73_000
|
||||
.saturating_add((4_432_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((3_647_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((3_613_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 23_000
|
||||
.saturating_add((390_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((286_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((9_614_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 35_000
|
||||
.saturating_add((3_405_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((9_677_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 58_000
|
||||
.saturating_add((4_178_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
}
|
||||
@@ -130,69 +136,73 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
(33_392_000 as Weight)
|
||||
(33_564_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(8 as Weight))
|
||||
}
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
(115_659_000 as Weight)
|
||||
(114_561_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn on_initialize_open_unsigned_with_snapshot() -> Weight {
|
||||
(114_970_000 as Weight)
|
||||
(114_070_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(51_442_000 as Weight)
|
||||
(59_765_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(23_160_000 as Weight)
|
||||
(39_894_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_initialize_open_unsigned_without_snapshot() -> Weight {
|
||||
(24_101_000 as Weight)
|
||||
(23_591_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn elect_queued() -> Weight {
|
||||
(6_153_604_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
fn elect_queued(v: u32, _t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((19_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((1_959_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((392_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
|
||||
}
|
||||
fn submit(c: u32, ) -> Weight {
|
||||
(78_972_000 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((308_000 as Weight).saturating_mul(c as Weight))
|
||||
(77_616_000 as Weight)
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((213_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((3_572_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((3_701_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 42_000
|
||||
.saturating_add((23_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((11_529_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 63_000
|
||||
.saturating_add((3_333_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((75_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((11_268_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 107_000
|
||||
.saturating_add((5_019_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
fn feasibility_check(v: u32, _t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((3_647_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 23_000
|
||||
.saturating_add((390_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((9_614_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 35_000
|
||||
.saturating_add((3_405_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((3_632_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((9_664_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 95_000
|
||||
.saturating_add((4_264_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user