git.delta.rocks / unique-network / refs/commits / fd782c893f4c

difftreelog

source

pallets/scheduler/src/weights.rs4.4 KiBsourcehistory
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// Original license18// This file is part of Substrate.1920// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.21// SPDX-License-Identifier: Apache-2.02223// Licensed under the Apache License, Version 2.0 (the "License");24// you may not use this file except in compliance with the License.25// You may obtain a copy of the License at26//27// http://www.apache.org/licenses/LICENSE-2.028//29// Unless required by applicable law or agreed to in writing, software30// distributed under the License is distributed on an "AS IS" BASIS,31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.32// See the License for the specific language governing permissions and33// limitations under the License.3435//! Weights for pallet_scheduler36//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.037//! DATE: 2020-10-27, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: [], HIGH RANGE: []38//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1283940// Executed Command:41// target/release/substrate42// benchmark43// --chain=dev44// --steps=5045// --repeat=2046// --pallet=pallet_scheduler47// --extrinsic=*48// --execution=wasm49// --wasm-execution=compiled50// --heap-pages=409651// --output=./frame/scheduler/src/weights.rs52// --template=./.maintain/frame-weight-template.hbs5354#![allow(unused_parens)]55#![allow(unused_imports)]5657use frame_support::{58	traits::Get,59	weights::{Weight, constants::RocksDbWeight},60};61use sp_std::marker::PhantomData;6263/// Weight functions needed for pallet_scheduler.64pub trait WeightInfo {65	fn schedule(s: u32) -> Weight;66	fn cancel(s: u32) -> Weight;67	fn schedule_named(s: u32) -> Weight;68	fn cancel_named(s: u32) -> Weight;69}7071/// Weights for pallet_scheduler using the Substrate node and recommended hardware.72pub struct SubstrateWeight<T>(PhantomData<T>);73impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {74	fn schedule(s: u32) -> Weight {75		35_029_000_u6476			.saturating_add(77_000_u64.saturating_mul(s as Weight))77			.saturating_add(T::DbWeight::get().reads(1_u64))78			.saturating_add(T::DbWeight::get().writes(1_u64))79	}80	fn cancel(s: u32) -> Weight {81		31_419_000_u6482			.saturating_add(4_015_000_u64.saturating_mul(s as Weight))83			.saturating_add(T::DbWeight::get().reads(1_u64))84			.saturating_add(T::DbWeight::get().writes(2_u64))85	}86	fn schedule_named(s: u32) -> Weight {87		44_752_000_u6488			.saturating_add(123_000_u64.saturating_mul(s as Weight))89			.saturating_add(T::DbWeight::get().reads(2_u64))90			.saturating_add(T::DbWeight::get().writes(2_u64))91	}92	fn cancel_named(s: u32) -> Weight {93		35_712_000_u6494			.saturating_add(4_008_000_u64.saturating_mul(s as Weight))95			.saturating_add(T::DbWeight::get().reads(2_u64))96			.saturating_add(T::DbWeight::get().writes(2_u64))97	}98}99100// For backwards compatibility and tests101impl WeightInfo for () {102	fn schedule(s: u32) -> Weight {103		35_029_000_u64104			.saturating_add(77_000_u64.saturating_mul(s as Weight))105			.saturating_add(RocksDbWeight::get().reads(1_u64))106			.saturating_add(RocksDbWeight::get().writes(1_u64))107	}108	fn cancel(s: u32) -> Weight {109		31_419_000_u64110			.saturating_add(4_015_000_u64.saturating_mul(s as Weight))111			.saturating_add(RocksDbWeight::get().reads(1_u64))112			.saturating_add(RocksDbWeight::get().writes(2_u64))113	}114	fn schedule_named(s: u32) -> Weight {115		44_752_000_u64116			.saturating_add(123_000_u64.saturating_mul(s as Weight))117			.saturating_add(RocksDbWeight::get().reads(2_u64))118			.saturating_add(RocksDbWeight::get().writes(2_u64))119	}120	fn cancel_named(s: u32) -> Weight {121		35_712_000_u64122			.saturating_add(4_008_000_u64.saturating_mul(s as Weight))123			.saturating_add(RocksDbWeight::get().reads(2_u64))124			.saturating_add(RocksDbWeight::get().writes(2_u64))125	}126}