Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Benchmark Remark with Event #8222

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
cargo run --release --features=runtime-benchmarks --manifest-path=bin…
…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
  • Loading branch information
Parity Benchmarking Bot committed Feb 27, 2021
commit b83441a8caa68afb9e1939f361aacc6477a9a809
54 changes: 29 additions & 25 deletions frame/system/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Autogenerated weights for frame_system
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-02-23, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: []
//! DATE: 2021-02-27, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: []
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128

// Executed Command:
Expand All @@ -45,85 +45,89 @@ use sp_std::marker::PhantomData;
/// Weight functions needed for frame_system.
pub trait WeightInfo {
fn remark(b: u32, ) -> Weight;
fn remark_with_event(b: u32, ) -> Weight;
fn set_heap_pages() -> Weight;
fn set_changes_trie_config() -> Weight;
fn set_storage(i: u32, ) -> Weight;
fn kill_storage(i: u32, ) -> Weight;
fn kill_prefix(p: u32, ) -> Weight;
fn remark_with_event(b: u32, ) -> Weight;
}

/// Weights for frame_system using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn remark(_b: u32, ) -> Weight {
(1_279_000 as Weight)
(1_296_000 as Weight)
}
fn remark_with_event(b: u32, ) -> Weight {
(13_474_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
}
fn set_heap_pages() -> Weight {
(2_167_000 as Weight)
(2_024_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_changes_trie_config() -> Weight {
(10_117_000 as Weight)
(10_551_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((608_000 as Weight).saturating_mul(i as Weight))
.saturating_add((612_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_storage(i: u32, ) -> Weight {
(3_199_000 as Weight)
(562_000 as Weight)
// Standard Error: 0
.saturating_add((450_000 as Weight).saturating_mul(i as Weight))
.saturating_add((442_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_prefix(p: u32, ) -> Weight {
(8_966_000 as Weight)
(10_499_000 as Weight)
// Standard Error: 1_000
.saturating_add((845_000 as Weight).saturating_mul(p as Weight))
.saturating_add((840_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
fn remark_with_event(_b: u32, ) -> Weight {
(1_973_000 as Weight)
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
fn remark(_b: u32, ) -> Weight {
(1_279_000 as Weight)
(1_296_000 as Weight)
}
fn remark_with_event(b: u32, ) -> Weight {
(13_474_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
}
fn set_heap_pages() -> Weight {
(2_167_000 as Weight)
(2_024_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn set_changes_trie_config() -> Weight {
(10_117_000 as Weight)
(10_551_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((608_000 as Weight).saturating_mul(i as Weight))
.saturating_add((612_000 as Weight).saturating_mul(i as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_storage(i: u32, ) -> Weight {
(3_199_000 as Weight)
(562_000 as Weight)
// Standard Error: 0
.saturating_add((450_000 as Weight).saturating_mul(i as Weight))
.saturating_add((442_000 as Weight).saturating_mul(i as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_prefix(p: u32, ) -> Weight {
(8_966_000 as Weight)
(10_499_000 as Weight)
// Standard Error: 1_000
.saturating_add((845_000 as Weight).saturating_mul(p as Weight))
.saturating_add((840_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
fn remark_with_event(_b: u32, ) -> Weight {
(1_973_000 as Weight)
}
}