mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 04:05:41 +00:00
ff5d56fb76
* cargo +nightly fmt * add cargo-fmt check to ci * update ci * fmt * fmt * skip macro * ignore bridges
224 lines
9.2 KiB
Rust
224 lines
9.2 KiB
Rust
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
|
|
// This file is part of Polkadot.
|
|
|
|
// Polkadot is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// Polkadot is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
|
//! Autogenerated weights for `pallet_staking`
|
|
//!
|
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
|
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
|
|
|
// Executed Command:
|
|
// target/release/polkadot
|
|
// benchmark
|
|
// --chain=kusama-dev
|
|
// --steps=50
|
|
// --repeat=20
|
|
// --pallet=pallet_staking
|
|
// --extrinsic=*
|
|
// --execution=wasm
|
|
// --wasm-execution=compiled
|
|
// --heap-pages=4096
|
|
// --header=./file_header.txt
|
|
// --output=./runtime/kusama/src/weights/
|
|
|
|
#![allow(unused_parens)]
|
|
#![allow(unused_imports)]
|
|
|
|
use frame_support::{traits::Get, weights::Weight};
|
|
use sp_std::marker::PhantomData;
|
|
|
|
/// Weight functions for `pallet_staking`.
|
|
pub struct WeightInfo<T>(PhantomData<T>);
|
|
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|
fn bond() -> Weight {
|
|
(70_648_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
|
}
|
|
fn bond_extra() -> Weight {
|
|
(54_235_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
}
|
|
fn unbond() -> Weight {
|
|
(57_950_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn withdraw_unbonded_update(s: u32) -> Weight {
|
|
(49_532_000 as Weight)
|
|
// Standard Error: 0
|
|
.saturating_add((29_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn withdraw_unbonded_kill(s: u32) -> Weight {
|
|
(81_722_000 as Weight)
|
|
// Standard Error: 1_000
|
|
.saturating_add((2_331_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn validate() -> Weight {
|
|
(31_838_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
}
|
|
fn kick(k: u32) -> Weight {
|
|
(10_120_000 as Weight)
|
|
// Standard Error: 6_000
|
|
.saturating_add((18_142_000 as Weight).saturating_mul(k as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
|
}
|
|
fn nominate(n: u32) -> Weight {
|
|
(37_716_000 as Weight)
|
|
// Standard Error: 6_000
|
|
.saturating_add((5_240_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
}
|
|
fn chill() -> Weight {
|
|
(16_594_000 as Weight).saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
}
|
|
fn set_payee() -> Weight {
|
|
(11_260_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn set_controller() -> Weight {
|
|
(24_156_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn set_validator_count() -> Weight {
|
|
(2_123_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_no_eras() -> Weight {
|
|
(2_458_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_new_era() -> Weight {
|
|
(2_428_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_new_era_always() -> Weight {
|
|
(2_435_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn set_invulnerables(v: u32) -> Weight {
|
|
(2_524_000 as Weight)
|
|
// Standard Error: 0
|
|
.saturating_add((23_000 as Weight).saturating_mul(v as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_unstake(s: u32) -> Weight {
|
|
(57_861_000 as Weight)
|
|
// Standard Error: 1_000
|
|
.saturating_add((2_315_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn cancel_deferred_slash(s: u32) -> Weight {
|
|
(3_460_645_000 as Weight)
|
|
// Standard Error: 221_000
|
|
.saturating_add((19_673_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn payout_stakers_dead_controller(n: u32) -> Weight {
|
|
(108_055_000 as Weight)
|
|
// Standard Error: 15_000
|
|
.saturating_add((47_913_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
|
}
|
|
fn payout_stakers_alive_staked(n: u32) -> Weight {
|
|
(122_624_000 as Weight)
|
|
// Standard Error: 22_000
|
|
.saturating_add((60_815_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
|
}
|
|
fn rebond(l: u32) -> Weight {
|
|
(46_725_000 as Weight)
|
|
// Standard Error: 1_000
|
|
.saturating_add((62_000 as Weight).saturating_mul(l as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn set_history_depth(e: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 68_000
|
|
.saturating_add((32_190_000 as Weight).saturating_mul(e as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
|
}
|
|
fn reap_stash(s: u32) -> Weight {
|
|
(68_887_000 as Weight)
|
|
// Standard Error: 0
|
|
.saturating_add((2_318_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn new_era(v: u32, n: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 734_000
|
|
.saturating_add((296_342_000 as Weight).saturating_mul(v as Weight))
|
|
// Standard Error: 36_000
|
|
.saturating_add((46_481_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
|
}
|
|
fn get_npos_voters(v: u32, n: u32, s: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 92_000
|
|
.saturating_add((24_187_000 as Weight).saturating_mul(v as Weight))
|
|
// Standard Error: 92_000
|
|
.saturating_add((27_771_000 as Weight).saturating_mul(n as Weight))
|
|
// Standard Error: 3_152_000
|
|
.saturating_add((40_493_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn get_npos_targets(v: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 27_000
|
|
.saturating_add((10_233_000 as Weight).saturating_mul(v as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
|
}
|
|
fn set_staking_limits() -> Weight {
|
|
(5_708_000 as Weight).saturating_add(T::DbWeight::get().writes(5 as Weight))
|
|
}
|
|
fn chill_other() -> Weight {
|
|
(39_559_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
}
|
|
}
|