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

difftreelog

source

pallets/scheduler-v2/src/weights.rs10.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 license:18// This file is part of Substrate.1920// Copyright (C) 2022 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//! Autogenerated weights for pallet_scheduler36//!37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev38//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`39//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`40//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 10244142// Executed Command:43// /home/benchbot/cargo_target_dir/production/substrate44// benchmark45// pallet46// --steps=5047// --repeat=2048// --extrinsic=*49// --execution=wasm50// --wasm-execution=compiled51// --heap-pages=409652// --pallet=pallet_scheduler53// --chain=dev54// --output=./frame/scheduler/src/weights.rs55// --template=./.maintain/frame-weight-template.hbs5657#![cfg_attr(rustfmt, rustfmt_skip)]58#![allow(unused_parens)]59#![allow(unused_imports)]6061use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};62use sp_std::marker::PhantomData;6364/// Weight functions needed for pallet_scheduler.65pub trait WeightInfo {66	fn service_agendas_base() -> Weight;67	fn service_agenda_base(s: u32, ) -> Weight;68	fn service_task_base() -> Weight;69	fn service_task_fetched(s: u32, ) -> Weight;70	fn service_task_named() -> Weight;71	fn service_task_periodic() -> Weight;72	fn execute_dispatch_signed() -> Weight;73	fn execute_dispatch_unsigned() -> Weight;74	fn schedule(s: u32, ) -> Weight;75	fn cancel(s: u32, ) -> Weight;76	fn schedule_named(s: u32, ) -> Weight;77	fn cancel_named(s: u32, ) -> Weight;78	fn change_named_priority(s: u32, ) -> Weight;79}8081/// Weights for pallet_scheduler using the Substrate node and recommended hardware.82pub struct SubstrateWeight<T>(PhantomData<T>);83impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {84	// Storage: Scheduler IncompleteSince (r:1 w:1)85	fn service_agendas_base() -> Weight {86		Weight::from_ref_time(4_992_000 as u64)87			.saturating_add(T::DbWeight::get().reads(1 as u64))88			.saturating_add(T::DbWeight::get().writes(1 as u64))89	}90	// Storage: Scheduler Agenda (r:1 w:1)91	/// The range of component `s` is `[0, 512]`.92	fn service_agenda_base(s: u32, ) -> Weight {93		Weight::from_ref_time(4_320_000 as u64)94			// Standard Error: 61995			.saturating_add(Weight::from_ref_time(336_713 as u64).saturating_mul(s as u64))96			.saturating_add(T::DbWeight::get().reads(1 as u64))97			.saturating_add(T::DbWeight::get().writes(1 as u64))98	}99	fn service_task_base() -> Weight {100		Weight::from_ref_time(10_864_000 as u64)101	}102	// Storage: Preimage PreimageFor (r:1 w:1)103	// Storage: Preimage StatusFor (r:1 w:1)104	/// The range of component `s` is `[128, 4194304]`.105	fn service_task_fetched(s: u32, ) -> Weight {106		Weight::from_ref_time(24_586_000 as u64)107			// Standard Error: 1108			.saturating_add(Weight::from_ref_time(1_138 as u64).saturating_mul(s as u64))109			.saturating_add(T::DbWeight::get().reads(2 as u64))110			.saturating_add(T::DbWeight::get().writes(2 as u64))111	}112	// Storage: Scheduler Lookup (r:0 w:1)113	fn service_task_named() -> Weight {114		Weight::from_ref_time(13_127_000 as u64)115			.saturating_add(T::DbWeight::get().writes(1 as u64))116	}117	fn service_task_periodic() -> Weight {118		Weight::from_ref_time(11_053_000 as u64)119	}120	fn execute_dispatch_signed() -> Weight {121		Weight::from_ref_time(4_158_000 as u64)122	}123	fn execute_dispatch_unsigned() -> Weight {124		Weight::from_ref_time(4_104_000 as u64)125	}126	// Storage: Scheduler Agenda (r:1 w:1)127	/// The range of component `s` is `[0, 511]`.128	fn schedule(s: u32, ) -> Weight {129		Weight::from_ref_time(20_074_000 as u64)130			// Standard Error: 765131			.saturating_add(Weight::from_ref_time(343_285 as u64).saturating_mul(s as u64))132			.saturating_add(T::DbWeight::get().reads(1 as u64))133			.saturating_add(T::DbWeight::get().writes(1 as u64))134	}135	// Storage: Scheduler Agenda (r:1 w:1)136	// Storage: Scheduler Lookup (r:0 w:1)137	/// The range of component `s` is `[1, 512]`.138	fn cancel(s: u32, ) -> Weight {139		Weight::from_ref_time(21_509_000 as u64)140			// Standard Error: 708141			.saturating_add(Weight::from_ref_time(323_013 as u64).saturating_mul(s as u64))142			.saturating_add(T::DbWeight::get().reads(1 as u64))143			.saturating_add(T::DbWeight::get().writes(2 as u64))144	}145	// Storage: Scheduler Lookup (r:1 w:1)146	// Storage: Scheduler Agenda (r:1 w:1)147	/// The range of component `s` is `[0, 511]`.148	fn schedule_named(s: u32, ) -> Weight {149		Weight::from_ref_time(22_427_000 as u64)150			// Standard Error: 850151			.saturating_add(Weight::from_ref_time(357_265 as u64).saturating_mul(s as u64))152			.saturating_add(T::DbWeight::get().reads(2 as u64))153			.saturating_add(T::DbWeight::get().writes(2 as u64))154	}155	// Storage: Scheduler Lookup (r:1 w:1)156	// Storage: Scheduler Agenda (r:1 w:1)157	/// The range of component `s` is `[1, 512]`.158	fn cancel_named(s: u32, ) -> Weight {159		Weight::from_ref_time(22_875_000 as u64)160			// Standard Error: 693161			.saturating_add(Weight::from_ref_time(336_643 as u64).saturating_mul(s as u64))162			.saturating_add(T::DbWeight::get().reads(2 as u64))163			.saturating_add(T::DbWeight::get().writes(2 as u64))164	}165166	// Storage: Scheduler Lookup (r:1 w:1)167	// Storage: Scheduler Agenda (r:1 w:1)168	fn change_named_priority(s: u32, ) -> Weight {169		Weight::from_ref_time(8_642_000)170			// Standard Error: 0171			.saturating_add(Weight::from_ref_time(431_000).saturating_mul(s as u64))172			.saturating_add(T::DbWeight::get().reads(2 as u64))173			.saturating_add(T::DbWeight::get().writes(2 as u64))174	}175}176177// For backwards compatibility and tests178impl WeightInfo for () {179	// Storage: Scheduler IncompleteSince (r:1 w:1)180	fn service_agendas_base() -> Weight {181		Weight::from_ref_time(4_992_000 as u64)182			.saturating_add(RocksDbWeight::get().reads(1 as u64))183			.saturating_add(RocksDbWeight::get().writes(1 as u64))184	}185	// Storage: Scheduler Agenda (r:1 w:1)186	/// The range of component `s` is `[0, 512]`.187	fn service_agenda_base(s: u32, ) -> Weight {188		Weight::from_ref_time(4_320_000 as u64)189			// Standard Error: 619190			.saturating_add(Weight::from_ref_time(336_713 as u64).saturating_mul(s as u64))191			.saturating_add(RocksDbWeight::get().reads(1 as u64))192			.saturating_add(RocksDbWeight::get().writes(1 as u64))193	}194	fn service_task_base() -> Weight {195		Weight::from_ref_time(10_864_000 as u64)196	}197	// Storage: Preimage PreimageFor (r:1 w:1)198	// Storage: Preimage StatusFor (r:1 w:1)199	/// The range of component `s` is `[128, 4194304]`.200	fn service_task_fetched(s: u32, ) -> Weight {201		Weight::from_ref_time(24_586_000 as u64)202			// Standard Error: 1203			.saturating_add(Weight::from_ref_time(1_138 as u64).saturating_mul(s as u64))204			.saturating_add(RocksDbWeight::get().reads(2 as u64))205			.saturating_add(RocksDbWeight::get().writes(2 as u64))206	}207	// Storage: Scheduler Lookup (r:0 w:1)208	fn service_task_named() -> Weight {209		Weight::from_ref_time(13_127_000 as u64)210			.saturating_add(RocksDbWeight::get().writes(1 as u64))211	}212	fn service_task_periodic() -> Weight {213		Weight::from_ref_time(11_053_000 as u64)214	}215	fn execute_dispatch_signed() -> Weight {216		Weight::from_ref_time(4_158_000 as u64)217	}218	fn execute_dispatch_unsigned() -> Weight {219		Weight::from_ref_time(4_104_000 as u64)220	}221	// Storage: Scheduler Agenda (r:1 w:1)222	/// The range of component `s` is `[0, 511]`.223	fn schedule(s: u32, ) -> Weight {224		Weight::from_ref_time(20_074_000 as u64)225			// Standard Error: 765226			.saturating_add(Weight::from_ref_time(343_285 as u64).saturating_mul(s as u64))227			.saturating_add(RocksDbWeight::get().reads(1 as u64))228			.saturating_add(RocksDbWeight::get().writes(1 as u64))229	}230	// Storage: Scheduler Agenda (r:1 w:1)231	// Storage: Scheduler Lookup (r:0 w:1)232	/// The range of component `s` is `[1, 512]`.233	fn cancel(s: u32, ) -> Weight {234		Weight::from_ref_time(21_509_000 as u64)235			// Standard Error: 708236			.saturating_add(Weight::from_ref_time(323_013 as u64).saturating_mul(s as u64))237			.saturating_add(RocksDbWeight::get().reads(1 as u64))238			.saturating_add(RocksDbWeight::get().writes(2 as u64))239	}240	// Storage: Scheduler Lookup (r:1 w:1)241	// Storage: Scheduler Agenda (r:1 w:1)242	/// The range of component `s` is `[0, 511]`.243	fn schedule_named(s: u32, ) -> Weight {244		Weight::from_ref_time(22_427_000 as u64)245			// Standard Error: 850246			.saturating_add(Weight::from_ref_time(357_265 as u64).saturating_mul(s as u64))247			.saturating_add(RocksDbWeight::get().reads(2 as u64))248			.saturating_add(RocksDbWeight::get().writes(2 as u64))249	}250	// Storage: Scheduler Lookup (r:1 w:1)251	// Storage: Scheduler Agenda (r:1 w:1)252	/// The range of component `s` is `[1, 512]`.253	fn cancel_named(s: u32, ) -> Weight {254		Weight::from_ref_time(22_875_000 as u64)255			// Standard Error: 693256			.saturating_add(Weight::from_ref_time(336_643 as u64).saturating_mul(s as u64))257			.saturating_add(RocksDbWeight::get().reads(2 as u64))258			.saturating_add(RocksDbWeight::get().writes(2 as u64))259	}260261	// Storage: Scheduler Lookup (r:1 w:1)262	// Storage: Scheduler Agenda (r:1 w:1)263	fn change_named_priority(s: u32, ) -> Weight {264		Weight::from_ref_time(8_642_000)265			// Standard Error: 0266			.saturating_add(Weight::from_ref_time(431_000).saturating_mul(s as u64))267			.saturating_add(RocksDbWeight::get().reads(2 as u64))268			.saturating_add(RocksDbWeight::get().writes(2 as u64))269	}270}