Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
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=pallet_lottery --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs
  • Loading branch information
Parity Benchmarking Bot committed Jul 13, 2021
commit ee9aabfe1e713044342ade08ca303be56c788b6e
28 changes: 14 additions & 14 deletions frame/lottery/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,33 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn buy_ticket() -> Weight {
(89_015_000 as Weight)
(72_703_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn set_calls(n: u32, ) -> Weight {
(19_654_000 as Weight)
(15_536_000 as Weight)
// Standard Error: 5_000
.saturating_add((384_000 as Weight).saturating_mul(n as Weight))
.saturating_add((786_000 as Weight).saturating_mul(n as Weight))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the difference with encoding? Double the weight per call

Copy link
Contributor Author

@gui1117 gui1117 Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't say for sure until we compare with the benchmark with the decoding but without the Box, but anyway this seems ok to me

comparing to the benchmark result in this PR #9343 it is indeed from the difference in decoding.

.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn start_lottery() -> Weight {
(72_310_000 as Weight)
(57_937_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn stop_repeat() -> Weight {
(9_068_000 as Weight)
(7_468_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn on_initialize_end() -> Weight {
(140_884_000 as Weight)
(114_880_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn on_initialize_repeat() -> Weight {
(146_739_000 as Weight)
(119_713_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
Expand All @@ -91,33 +91,33 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// For backwards compatibility and tests
impl WeightInfo for () {
fn buy_ticket() -> Weight {
(89_015_000 as Weight)
(72_703_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
fn set_calls(n: u32, ) -> Weight {
(19_654_000 as Weight)
(15_536_000 as Weight)
// Standard Error: 5_000
.saturating_add((384_000 as Weight).saturating_mul(n as Weight))
.saturating_add((786_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn start_lottery() -> Weight {
(72_310_000 as Weight)
(57_937_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
fn stop_repeat() -> Weight {
(9_068_000 as Weight)
(7_468_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
fn on_initialize_end() -> Weight {
(140_884_000 as Weight)
(114_880_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
fn on_initialize_repeat() -> Weight {
(146_739_000 as Weight)
(119_713_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
}
Expand Down