WeightInfo for Session Pallet (#7136)

* whitelist caller in benchmarks

* remove unused component

* Add benchmark weights

* Remove `weightinfo` for `offences`
This commit is contained in:
Shawn Tabrizi
2020-09-21 11:13:31 +02:00
committed by GitHub
parent ae52587f41
commit 9e9e34fad8
11 changed files with 93 additions and 24 deletions
@@ -25,6 +25,7 @@ pub mod pallet_indices;
pub mod pallet_im_online;
pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_staking;
pub mod pallet_timestamp;
pub mod pallet_utility;
@@ -0,0 +1,37 @@
// This file is part of Substrate.
// Copyright (C) 2017-2020 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.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
pub struct WeightInfo;
impl pallet_session::WeightInfo for WeightInfo {
fn set_keys() -> Weight {
(88_411_000 as Weight)
.saturating_add(DbWeight::get().reads(6 as Weight))
.saturating_add(DbWeight::get().writes(5 as Weight))
}
fn purge_keys() -> Weight {
(51_843_000 as Weight)
.saturating_add(DbWeight::get().reads(2 as Weight))
.saturating_add(DbWeight::get().writes(5 as Weight))
}
}