Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update lottery weights
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Apr 19, 2022
commit a48233b72197f9c0dbacfd50899f0d0840dfc87f
38 changes: 19 additions & 19 deletions frame/lottery/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
//! Autogenerated weights for pallet_lottery
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-31, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-04-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
Expand All @@ -35,13 +36,12 @@
// --output=./frame/lottery/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=HEADER-APACHE2
// --raw

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use frame_support::{traits::Get, weights::{Weight, constants::{RocksDbWeight, WEIGHT_PER_NANOS}}};
use sp_std::marker::PhantomData;

/// Weight functions needed for pallet_lottery.
Expand All @@ -65,28 +65,28 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System Account (r:1 w:1)
// Storage: Lottery Tickets (r:0 w:1)
fn buy_ticket() -> Weight {
(37_257_000 as Weight)
(38_262 * WEIGHT_PER_NANOS)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Lottery CallIndices (r:0 w:1)
fn set_calls(n: u32, ) -> Weight {
(8_966_000 as Weight)
// Standard Error: 5_000
.saturating_add((302_000 as Weight).saturating_mul(n as Weight))
(9_092 * WEIGHT_PER_NANOS)
// Standard Error: 4 * WEIGHT_PER_NANOS
.saturating_add((298 * WEIGHT_PER_NANOS).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Lottery Lottery (r:1 w:1)
// Storage: Lottery LotteryIndex (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn start_lottery() -> Weight {
(32_282_000 as Weight)
(32_238 * WEIGHT_PER_NANOS)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: Lottery Lottery (r:1 w:1)
fn stop_repeat() -> Weight {
(3_903_000 as Weight)
(4_023 * WEIGHT_PER_NANOS)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand All @@ -96,7 +96,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Lottery TicketsCount (r:1 w:1)
// Storage: Lottery Tickets (r:1 w:0)
fn on_initialize_end() -> Weight {
(51_489_000 as Weight)
(52_404 * WEIGHT_PER_NANOS)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
Expand All @@ -107,7 +107,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Lottery Tickets (r:1 w:0)
// Storage: Lottery LotteryIndex (r:1 w:1)
fn on_initialize_repeat() -> Weight {
(53_046_000 as Weight)
(54_167 * WEIGHT_PER_NANOS)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
Expand All @@ -123,28 +123,28 @@ impl WeightInfo for () {
// Storage: System Account (r:1 w:1)
// Storage: Lottery Tickets (r:0 w:1)
fn buy_ticket() -> Weight {
(37_257_000 as Weight)
(38_262 * WEIGHT_PER_NANOS)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
// Storage: Lottery CallIndices (r:0 w:1)
fn set_calls(n: u32, ) -> Weight {
(8_966_000 as Weight)
// Standard Error: 5_000
.saturating_add((302_000 as Weight).saturating_mul(n as Weight))
(9_092 * WEIGHT_PER_NANOS)
// Standard Error: 4 * WEIGHT_PER_NANOS
.saturating_add((298 * WEIGHT_PER_NANOS).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Lottery Lottery (r:1 w:1)
// Storage: Lottery LotteryIndex (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn start_lottery() -> Weight {
(32_282_000 as Weight)
(32_238 * WEIGHT_PER_NANOS)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Lottery Lottery (r:1 w:1)
fn stop_repeat() -> Weight {
(3_903_000 as Weight)
(4_023 * WEIGHT_PER_NANOS)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
Expand All @@ -154,7 +154,7 @@ impl WeightInfo for () {
// Storage: Lottery TicketsCount (r:1 w:1)
// Storage: Lottery Tickets (r:1 w:0)
fn on_initialize_end() -> Weight {
(51_489_000 as Weight)
(52_404 * WEIGHT_PER_NANOS)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
Expand All @@ -165,7 +165,7 @@ impl WeightInfo for () {
// Storage: Lottery Tickets (r:1 w:0)
// Storage: Lottery LotteryIndex (r:1 w:1)
fn on_initialize_repeat() -> Weight {
(53_046_000 as Weight)
(54_167 * WEIGHT_PER_NANOS)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
}
Expand Down