git.delta.rocks / unique-network / refs/commits / 4e76702c569f

difftreelog

source

pallets/scheduler/src/weights.rs3.6 KiBsourcehistory
1// This file is part of Substrate.23// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.4// SPDX-License-Identifier: Apache-2.056// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.1718//! Weights for pallet_scheduler19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.020//! DATE: 2020-10-27, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: [], HIGH RANGE: []21//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1282223// Executed Command:24// target/release/substrate25// benchmark26// --chain=dev27// --steps=5028// --repeat=2029// --pallet=pallet_scheduler30// --extrinsic=*31// --execution=wasm32// --wasm-execution=compiled33// --heap-pages=409634// --output=./frame/scheduler/src/weights.rs35// --template=./.maintain/frame-weight-template.hbs3637#![allow(unused_parens)]38#![allow(unused_imports)]3940use frame_support::{41	traits::Get,42	weights::{Weight, constants::RocksDbWeight},43};44use sp_std::marker::PhantomData;4546/// Weight functions needed for pallet_scheduler.47pub trait WeightInfo {48	fn schedule(s: u32) -> Weight;49	fn cancel(s: u32) -> Weight;50	fn schedule_named(s: u32) -> Weight;51	fn cancel_named(s: u32) -> Weight;52}5354/// Weights for pallet_scheduler using the Substrate node and recommended hardware.55pub struct SubstrateWeight<T>(PhantomData<T>);56impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {57	fn schedule(s: u32) -> Weight {58		35_029_000_u6459			.saturating_add(77_000_u64.saturating_mul(s as Weight))60			.saturating_add(T::DbWeight::get().reads(1_u64))61			.saturating_add(T::DbWeight::get().writes(1_u64))62	}63	fn cancel(s: u32) -> Weight {64		31_419_000_u6465			.saturating_add(4_015_000_u64.saturating_mul(s as Weight))66			.saturating_add(T::DbWeight::get().reads(1_u64))67			.saturating_add(T::DbWeight::get().writes(2_u64))68	}69	fn schedule_named(s: u32) -> Weight {70		44_752_000_u6471			.saturating_add(123_000_u64.saturating_mul(s as Weight))72			.saturating_add(T::DbWeight::get().reads(2_u64))73			.saturating_add(T::DbWeight::get().writes(2_u64))74	}75	fn cancel_named(s: u32) -> Weight {76		35_712_000_u6477			.saturating_add(4_008_000_u64.saturating_mul(s as Weight))78			.saturating_add(T::DbWeight::get().reads(2_u64))79			.saturating_add(T::DbWeight::get().writes(2_u64))80	}81}8283// For backwards compatibility and tests84impl WeightInfo for () {85	fn schedule(s: u32) -> Weight {86		35_029_000_u6487			.saturating_add(77_000_u64.saturating_mul(s as Weight))88			.saturating_add(RocksDbWeight::get().reads(1_u64))89			.saturating_add(RocksDbWeight::get().writes(1_u64))90	}91	fn cancel(s: u32) -> Weight {92		31_419_000_u6493			.saturating_add(4_015_000_u64.saturating_mul(s as Weight))94			.saturating_add(RocksDbWeight::get().reads(1_u64))95			.saturating_add(RocksDbWeight::get().writes(2_u64))96	}97	fn schedule_named(s: u32) -> Weight {98		44_752_000_u6499			.saturating_add(123_000_u64.saturating_mul(s as Weight))100			.saturating_add(RocksDbWeight::get().reads(2_u64))101			.saturating_add(RocksDbWeight::get().writes(2_u64))102	}103	fn cancel_named(s: u32) -> Weight {104		35_712_000_u64105			.saturating_add(4_008_000_u64.saturating_mul(s as Weight))106			.saturating_add(RocksDbWeight::get().reads(2_u64))107			.saturating_add(RocksDbWeight::get().writes(2_u64))108	}109}