Skip to content

Commit

Permalink
cargo run --quiet --profile=production --features=runtime-benchmarks …
Browse files Browse the repository at this point in the history
…--manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_offences --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/offences/src/weights.rs --template=./.maintain/frame-weight-template.hbs
  • Loading branch information
Parity Bot committed Feb 2, 2022
1 parent 0fb9dbb commit 73d0cb2
Showing 1 changed file with 229 additions and 0 deletions.
229 changes: 229 additions & 0 deletions frame/offences/src/weights.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
// This file is part of Substrate.

// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for pallet_offences
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-02-02, 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
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_offences
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./frame/offences/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs

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

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

/// Weight functions needed for pallet_offences.
pub trait WeightInfo {
fn report_offence_im_online(r: u32, o: u32, n: u32, ) -> Weight;
fn report_offence_grandpa(n: u32, ) -> Weight;
fn report_offence_babe(n: u32, ) -> Weight;
}

/// Weights for pallet_offences using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Offences ReportsByKindIndex (r:1 w:1)
// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
// Storage: Offences Reports (r:100 w:100)
// Storage: Staking SlashRewardFraction (r:1 w:0)
// Storage: Staking ActiveEra (r:1 w:0)
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
// Storage: Staking EarliestUnappliedSlash (r:1 w:1)
// Storage: Staking Invulnerables (r:1 w:0)
// Storage: Staking ValidatorSlashInEra (r:100 w:100)
// Storage: Staking SlashingSpans (r:1700 w:1700)
// Storage: Staking SpanSlash (r:1700 w:1700)
// Storage: Staking Validators (r:100 w:100)
// Storage: Staking CounterForValidators (r:1 w:1)
// Storage: Staking Nominators (r:100 w:0)
// Storage: Staking OffendingValidators (r:1 w:1)
// Storage: Session Validators (r:1 w:0)
// Storage: Staking NominatorSlashInEra (r:1600 w:1600)
// Storage: Staking UnappliedSlashes (r:1 w:1)
fn report_offence_im_online(r: u32, o: u32, n: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 2_376_000
.saturating_add((317_700_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 2_405_000
.saturating_add((723_761_000 as Weight).saturating_mul(o as Weight))
// Standard Error: 25_392_000
.saturating_add((1_275_519_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads((54 as Weight).saturating_mul(o as Weight)))
.saturating_add(T::DbWeight::get().reads((300 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes((53 as Weight).saturating_mul(o as Weight)))
.saturating_add(T::DbWeight::get().writes((300 as Weight).saturating_mul(n as Weight)))
}
// Storage: Offences ReportsByKindIndex (r:1 w:1)
// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
// Storage: Offences Reports (r:1 w:1)
// Storage: Staking SlashRewardFraction (r:1 w:0)
// Storage: Staking ActiveEra (r:1 w:0)
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
// Storage: Staking EarliestUnappliedSlash (r:1 w:1)
// Storage: Staking Invulnerables (r:1 w:0)
// Storage: Staking ValidatorSlashInEra (r:1 w:1)
// Storage: Staking SlashingSpans (r:1 w:1)
// Storage: Staking SpanSlash (r:1 w:1)
// Storage: Staking Validators (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
// Storage: Staking Nominators (r:1 w:0)
// Storage: Staking OffendingValidators (r:1 w:1)
// Storage: Session Validators (r:1 w:0)
// Storage: Staking UnappliedSlashes (r:1 w:1)
// Storage: Staking NominatorSlashInEra (r:1 w:1)
fn report_offence_grandpa(n: u32, ) -> Weight {
(71_058_000 as Weight)
// Standard Error: 20_000
.saturating_add((10_898_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(17 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(11 as Weight))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
}
// Storage: Offences ReportsByKindIndex (r:1 w:1)
// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
// Storage: Offences Reports (r:1 w:1)
// Storage: Staking SlashRewardFraction (r:1 w:0)
// Storage: Staking ActiveEra (r:1 w:0)
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
// Storage: Staking EarliestUnappliedSlash (r:1 w:1)
// Storage: Staking Invulnerables (r:1 w:0)
// Storage: Staking ValidatorSlashInEra (r:1 w:1)
// Storage: Staking SlashingSpans (r:1 w:1)
// Storage: Staking SpanSlash (r:1 w:1)
// Storage: Staking Validators (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
// Storage: Staking Nominators (r:1 w:0)
// Storage: Staking OffendingValidators (r:1 w:1)
// Storage: Session Validators (r:1 w:0)
// Storage: Staking UnappliedSlashes (r:1 w:1)
// Storage: Staking NominatorSlashInEra (r:1 w:1)
fn report_offence_babe(n: u32, ) -> Weight {
(70_802_000 as Weight)
// Standard Error: 24_000
.saturating_add((10_894_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(17 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(11 as Weight))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
// Storage: Offences ReportsByKindIndex (r:1 w:1)
// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
// Storage: Offences Reports (r:100 w:100)
// Storage: Staking SlashRewardFraction (r:1 w:0)
// Storage: Staking ActiveEra (r:1 w:0)
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
// Storage: Staking EarliestUnappliedSlash (r:1 w:1)
// Storage: Staking Invulnerables (r:1 w:0)
// Storage: Staking ValidatorSlashInEra (r:100 w:100)
// Storage: Staking SlashingSpans (r:1700 w:1700)
// Storage: Staking SpanSlash (r:1700 w:1700)
// Storage: Staking Validators (r:100 w:100)
// Storage: Staking CounterForValidators (r:1 w:1)
// Storage: Staking Nominators (r:100 w:0)
// Storage: Staking OffendingValidators (r:1 w:1)
// Storage: Session Validators (r:1 w:0)
// Storage: Staking NominatorSlashInEra (r:1600 w:1600)
// Storage: Staking UnappliedSlashes (r:1 w:1)
fn report_offence_im_online(r: u32, o: u32, n: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 2_376_000
.saturating_add((317_700_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 2_405_000
.saturating_add((723_761_000 as Weight).saturating_mul(o as Weight))
// Standard Error: 25_392_000
.saturating_add((1_275_519_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads((54 as Weight).saturating_mul(o as Weight)))
.saturating_add(RocksDbWeight::get().reads((300 as Weight).saturating_mul(n as Weight)))
.saturating_add(RocksDbWeight::get().writes((53 as Weight).saturating_mul(o as Weight)))
.saturating_add(RocksDbWeight::get().writes((300 as Weight).saturating_mul(n as Weight)))
}
// Storage: Offences ReportsByKindIndex (r:1 w:1)
// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
// Storage: Offences Reports (r:1 w:1)
// Storage: Staking SlashRewardFraction (r:1 w:0)
// Storage: Staking ActiveEra (r:1 w:0)
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
// Storage: Staking EarliestUnappliedSlash (r:1 w:1)
// Storage: Staking Invulnerables (r:1 w:0)
// Storage: Staking ValidatorSlashInEra (r:1 w:1)
// Storage: Staking SlashingSpans (r:1 w:1)
// Storage: Staking SpanSlash (r:1 w:1)
// Storage: Staking Validators (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
// Storage: Staking Nominators (r:1 w:0)
// Storage: Staking OffendingValidators (r:1 w:1)
// Storage: Session Validators (r:1 w:0)
// Storage: Staking UnappliedSlashes (r:1 w:1)
// Storage: Staking NominatorSlashInEra (r:1 w:1)
fn report_offence_grandpa(n: u32, ) -> Weight {
(71_058_000 as Weight)
// Standard Error: 20_000
.saturating_add((10_898_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads(17 as Weight))
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(RocksDbWeight::get().writes(11 as Weight))
.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
}
// Storage: Offences ReportsByKindIndex (r:1 w:1)
// Storage: Offences ConcurrentReportsIndex (r:1 w:1)
// Storage: Offences Reports (r:1 w:1)
// Storage: Staking SlashRewardFraction (r:1 w:0)
// Storage: Staking ActiveEra (r:1 w:0)
// Storage: Staking ErasStartSessionIndex (r:1 w:0)
// Storage: Staking EarliestUnappliedSlash (r:1 w:1)
// Storage: Staking Invulnerables (r:1 w:0)
// Storage: Staking ValidatorSlashInEra (r:1 w:1)
// Storage: Staking SlashingSpans (r:1 w:1)
// Storage: Staking SpanSlash (r:1 w:1)
// Storage: Staking Validators (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
// Storage: Staking Nominators (r:1 w:0)
// Storage: Staking OffendingValidators (r:1 w:1)
// Storage: Session Validators (r:1 w:0)
// Storage: Staking UnappliedSlashes (r:1 w:1)
// Storage: Staking NominatorSlashInEra (r:1 w:1)
fn report_offence_babe(n: u32, ) -> Weight {
(70_802_000 as Weight)
// Standard Error: 24_000
.saturating_add((10_894_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads(17 as Weight))
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(RocksDbWeight::get().writes(11 as Weight))
.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
}
}

0 comments on commit 73d0cb2

Please sign in to comment.