difftreelog
fix bench scheduler v2
in: master
1 file changed
pallets/scheduler-v2/src/weights.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs2// 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.34235//! Autogenerated weights for pallet_scheduler3//! Autogenerated weights for pallet_unique_scheduler_v236//!4//!37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev5//! 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: `[]`6//! DATE: 2022-10-28, STEPS: `50`, REPEAT: 80, 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: 10247//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102441842// Executed Command:9// Executed Command:43// /home/benchbot/cargo_target_dir/production/substrate10// target/release/unique-collator44// benchmark11// benchmark45// pallet12// pallet13// --pallet14// pallet-unique-scheduler-v215// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs46// --steps=5021// --steps=5047// --repeat=2022// --repeat=8048// --extrinsic=*49// --execution=wasm50// --wasm-execution=compiled51// --heap-pages=409623// --heap-pages=409652// --pallet=pallet_scheduler53// --chain=dev54// --output=./frame/scheduler/src/weights.rs24// --output=./pallets/scheduler-v2/src/weights.rs55// --template=./.maintain/frame-weight-template.hbs562557#![cfg_attr(rustfmt, rustfmt_skip)]26#![cfg_attr(rustfmt, rustfmt_skip)]58#![allow(unused_parens)]27#![allow(unused_parens)]59#![allow(unused_imports)]28#![allow(unused_imports)]29#![allow(missing_docs)]30#![allow(clippy::unnecessary_cast)]603161use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};62use sp_std::marker::PhantomData;33use sp_std::marker::PhantomData;633464/// Weight functions needed for pallet_scheduler.35/// Weight functions needed for pallet_unique_scheduler_v2.65pub trait WeightInfo {36pub trait WeightInfo {66 fn service_agendas_base() -> Weight;37 fn service_agendas_base() -> Weight;67 fn service_agenda_base(s: u32, ) -> Weight;38 fn service_agenda_base(s: u32, ) -> Weight;68 fn service_task_base() -> Weight;39 fn service_task_base() -> Weight;69 fn service_task_fetched(s: u32, ) -> Weight;70 fn service_task_named() -> Weight;40 fn service_task_named() -> Weight;71 fn service_task_periodic() -> Weight;41 fn service_task_periodic() -> Weight;72 fn execute_dispatch_signed() -> Weight;42 fn execute_dispatch_signed() -> Weight;78 fn change_named_priority(s: u32, ) -> Weight;48 fn change_named_priority(s: u32, ) -> Weight;79}49}805081/// Weights for pallet_scheduler using the Substrate node and recommended hardware.51/// Weights for pallet_unique_scheduler_v2 using the Substrate node and recommended hardware.82pub struct SubstrateWeight<T>(PhantomData<T>);52pub struct SubstrateWeight<T>(PhantomData<T>);83impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {84 // Storage: Scheduler IncompleteSince (r:1 w:1)54 // Storage: Scheduler IncompleteSince (r:1 w:1)85 fn service_agendas_base() -> Weight {55 fn service_agendas_base() -> Weight {86 Weight::from_ref_time(4_992_000 as u64)56 Weight::from_ref_time(5_253_000 as u64)87 .saturating_add(T::DbWeight::get().reads(1 as u64))57 .saturating_add(T::DbWeight::get().reads(1 as u64))88 .saturating_add(T::DbWeight::get().writes(1 as u64))58 .saturating_add(T::DbWeight::get().writes(1 as u64))89 }59 }90 // Storage: Scheduler Agenda (r:1 w:1)60 // Storage: Scheduler Agenda (r:1 w:1)91 /// The range of component `s` is `[0, 512]`.92 fn service_agenda_base(s: u32, ) -> Weight {61 fn service_agenda_base(s: u32, ) -> Weight {93 Weight::from_ref_time(4_320_000 as u64)62 Weight::from_ref_time(3_858_000 as u64)94 // Standard Error: 61963 // Standard Error: 2_61795 .saturating_add(Weight::from_ref_time(336_713 as u64).saturating_mul(s as u64))64 .saturating_add(Weight::from_ref_time(579_704 as u64).saturating_mul(s as u64))96 .saturating_add(T::DbWeight::get().reads(1 as u64))65 .saturating_add(T::DbWeight::get().reads(1 as u64))97 .saturating_add(T::DbWeight::get().writes(1 as u64))66 .saturating_add(T::DbWeight::get().writes(1 as u64))98 }67 }68 // Storage: System LastRuntimeUpgrade (r:1 w:0)99 fn service_task_base() -> Weight {69 fn service_task_base() -> Weight {100 Weight::from_ref_time(10_864_000 as u64)70 Weight::from_ref_time(10_536_000 as u64)71 .saturating_add(T::DbWeight::get().reads(1 as u64))101 }72 }102 // Storage: Preimage PreimageFor (r:1 w:1)73 // Storage: System LastRuntimeUpgrade (r:1 w:0)103 // Storage: Preimage StatusFor (r:1 w:1)74 // Storage: Scheduler Lookup (r:0 w:1)104 /// The range of component `s` is `[128, 4194304]`.105 fn service_task_fetched(s: u32, ) -> Weight {75 fn service_task_named() -> Weight {106 Weight::from_ref_time(24_586_000 as u64)76 Weight::from_ref_time(12_018_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))77 .saturating_add(T::DbWeight::get().reads(1 as u64))110 .saturating_add(T::DbWeight::get().writes(2 as u64))78 .saturating_add(T::DbWeight::get().writes(1 as u64))111 }79 }112 // Storage: Scheduler Lookup (r:0 w:1)80 // Storage: System LastRuntimeUpgrade (r:1 w:0)113 fn service_task_named() -> Weight {81 fn service_task_periodic() -> Weight {114 Weight::from_ref_time(13_127_000 as u64)82 Weight::from_ref_time(10_669_000 as u64)115 .saturating_add(T::DbWeight::get().writes(1 as u64))83 .saturating_add(T::DbWeight::get().reads(1 as u64))116 }84 }117 fn service_task_periodic() -> Weight {85 // Storage: System Account (r:1 w:1)118 Weight::from_ref_time(11_053_000 as u64)86 // Storage: System AllExtrinsicsLen (r:1 w:1)119 }87 // Storage: System BlockWeight (r:1 w:1)88 // Storage: Configuration WeightToFeeCoefficientOverride (r:1 w:0)89 // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)120 fn execute_dispatch_signed() -> Weight {90 fn execute_dispatch_signed() -> Weight {121 Weight::from_ref_time(4_158_000 as u64)91 Weight::from_ref_time(36_083_000 as u64)92 .saturating_add(T::DbWeight::get().reads(5 as u64))93 .saturating_add(T::DbWeight::get().writes(3 as u64))122 }94 }123 fn execute_dispatch_unsigned() -> Weight {95 fn execute_dispatch_unsigned() -> Weight {124 Weight::from_ref_time(4_104_000 as u64)96 Weight::from_ref_time(4_386_000 as u64)125 }97 }126 // Storage: Scheduler Agenda (r:1 w:1)98 // Storage: Scheduler Agenda (r:1 w:1)127 /// The range of component `s` is `[0, 511]`.128 fn schedule(s: u32, ) -> Weight {99 fn schedule(s: u32, ) -> Weight {129 Weight::from_ref_time(20_074_000 as u64)100 Weight::from_ref_time(17_257_000 as u64)130 // Standard Error: 765101 // Standard Error: 2_791131 .saturating_add(Weight::from_ref_time(343_285 as u64).saturating_mul(s as u64))102 .saturating_add(Weight::from_ref_time(574_832 as u64).saturating_mul(s as u64))132 .saturating_add(T::DbWeight::get().reads(1 as u64))103 .saturating_add(T::DbWeight::get().reads(1 as u64))133 .saturating_add(T::DbWeight::get().writes(1 as u64))104 .saturating_add(T::DbWeight::get().writes(1 as u64))134 }105 }135 // Storage: Scheduler Agenda (r:1 w:1)106 // Storage: Scheduler Agenda (r:1 w:1)136 // Storage: Scheduler Lookup (r:0 w:1)107 // Storage: Scheduler Lookup (r:0 w:1)137 /// The range of component `s` is `[1, 512]`.138 fn cancel(s: u32, ) -> Weight {108 fn cancel(s: u32, ) -> Weight {139 Weight::from_ref_time(21_509_000 as u64)109 Weight::from_ref_time(19_803_000 as u64)140 // Standard Error: 708110 // Standard Error: 1_177141 .saturating_add(Weight::from_ref_time(323_013 as u64).saturating_mul(s as u64))111 .saturating_add(Weight::from_ref_time(475_027 as u64).saturating_mul(s as u64))142 .saturating_add(T::DbWeight::get().reads(1 as u64))112 .saturating_add(T::DbWeight::get().reads(1 as u64))143 .saturating_add(T::DbWeight::get().writes(2 as u64))113 .saturating_add(T::DbWeight::get().writes(2 as u64))144 }114 }145 // Storage: Scheduler Lookup (r:1 w:1)115 // Storage: Scheduler Lookup (r:1 w:1)146 // Storage: Scheduler Agenda (r:1 w:1)116 // Storage: Scheduler Agenda (r:1 w:1)147 /// The range of component `s` is `[0, 511]`.148 fn schedule_named(s: u32, ) -> Weight {117 fn schedule_named(s: u32, ) -> Weight {149 Weight::from_ref_time(22_427_000 as u64)118 Weight::from_ref_time(18_746_000 as u64)150 // Standard Error: 850119 // Standard Error: 2_997151 .saturating_add(Weight::from_ref_time(357_265 as u64).saturating_mul(s as u64))120 .saturating_add(Weight::from_ref_time(635_697 as u64).saturating_mul(s as u64))152 .saturating_add(T::DbWeight::get().reads(2 as u64))121 .saturating_add(T::DbWeight::get().reads(2 as u64))153 .saturating_add(T::DbWeight::get().writes(2 as u64))122 .saturating_add(T::DbWeight::get().writes(2 as u64))154 }123 }155 // Storage: Scheduler Lookup (r:1 w:1)124 // Storage: Scheduler Lookup (r:1 w:1)156 // Storage: Scheduler Agenda (r:1 w:1)125 // Storage: Scheduler Agenda (r:1 w:1)157 /// The range of component `s` is `[1, 512]`.158 fn cancel_named(s: u32, ) -> Weight {126 fn cancel_named(s: u32, ) -> Weight {159 Weight::from_ref_time(22_875_000 as u64)127 Weight::from_ref_time(20_983_000 as u64)160 // Standard Error: 693128 // Standard Error: 1_850161 .saturating_add(Weight::from_ref_time(336_643 as u64).saturating_mul(s as u64))129 .saturating_add(Weight::from_ref_time(518_812 as u64).saturating_mul(s as u64))162 .saturating_add(T::DbWeight::get().reads(2 as u64))130 .saturating_add(T::DbWeight::get().reads(2 as u64))163 .saturating_add(T::DbWeight::get().writes(2 as u64))131 .saturating_add(T::DbWeight::get().writes(2 as u64))164 }132 }165166 // Storage: Scheduler Lookup (r:1 w:1)133 // Storage: Scheduler Lookup (r:1 w:0)167 // Storage: Scheduler Agenda (r:1 w:1)134 // Storage: Scheduler Agenda (r:1 w:1)168 fn change_named_priority(s: u32, ) -> Weight {135 fn change_named_priority(s: u32, ) -> Weight {169 Weight::from_ref_time(8_642_000)136 Weight::from_ref_time(21_591_000 as u64)170 // Standard Error: 0137 // Standard Error: 4_187171 .saturating_add(Weight::from_ref_time(431_000).saturating_mul(s as u64))138 .saturating_add(Weight::from_ref_time(531_231 as u64).saturating_mul(s as u64))172 .saturating_add(T::DbWeight::get().reads(2 as u64))139 .saturating_add(T::DbWeight::get().reads(2 as u64))173 .saturating_add(T::DbWeight::get().writes(2 as u64))140 .saturating_add(T::DbWeight::get().writes(1 as u64))174 }141 }175}142}176143177// For backwards compatibility and tests144// For backwards compatibility and tests178impl WeightInfo for () {145impl WeightInfo for () {179 // Storage: Scheduler IncompleteSince (r:1 w:1)146 // Storage: Scheduler IncompleteSince (r:1 w:1)180 fn service_agendas_base() -> Weight {147 fn service_agendas_base() -> Weight {181 Weight::from_ref_time(4_992_000 as u64)148 Weight::from_ref_time(5_253_000 as u64)182 .saturating_add(RocksDbWeight::get().reads(1 as u64))149 .saturating_add(RocksDbWeight::get().reads(1 as u64))183 .saturating_add(RocksDbWeight::get().writes(1 as u64))150 .saturating_add(RocksDbWeight::get().writes(1 as u64))184 }151 }185 // Storage: Scheduler Agenda (r:1 w:1)152 // Storage: Scheduler Agenda (r:1 w:1)186 /// The range of component `s` is `[0, 512]`.187 fn service_agenda_base(s: u32, ) -> Weight {153 fn service_agenda_base(s: u32, ) -> Weight {188 Weight::from_ref_time(4_320_000 as u64)154 Weight::from_ref_time(3_858_000 as u64)189 // Standard Error: 619155 // Standard Error: 2_617190 .saturating_add(Weight::from_ref_time(336_713 as u64).saturating_mul(s as u64))156 .saturating_add(Weight::from_ref_time(579_704 as u64).saturating_mul(s as u64))191 .saturating_add(RocksDbWeight::get().reads(1 as u64))157 .saturating_add(RocksDbWeight::get().reads(1 as u64))192 .saturating_add(RocksDbWeight::get().writes(1 as u64))158 .saturating_add(RocksDbWeight::get().writes(1 as u64))193 }159 }160 // Storage: System LastRuntimeUpgrade (r:1 w:0)194 fn service_task_base() -> Weight {161 fn service_task_base() -> Weight {195 Weight::from_ref_time(10_864_000 as u64)162 Weight::from_ref_time(10_536_000 as u64)163 .saturating_add(RocksDbWeight::get().reads(1 as u64))196 }164 }197 // Storage: Preimage PreimageFor (r:1 w:1)165 // Storage: System LastRuntimeUpgrade (r:1 w:0)198 // Storage: Preimage StatusFor (r:1 w:1)166 // Storage: Scheduler Lookup (r:0 w:1)199 /// The range of component `s` is `[128, 4194304]`.200 fn service_task_fetched(s: u32, ) -> Weight {167 fn service_task_named() -> Weight {201 Weight::from_ref_time(24_586_000 as u64)168 Weight::from_ref_time(12_018_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))169 .saturating_add(RocksDbWeight::get().reads(1 as u64))205 .saturating_add(RocksDbWeight::get().writes(2 as u64))170 .saturating_add(RocksDbWeight::get().writes(1 as u64))206 }171 }207 // Storage: Scheduler Lookup (r:0 w:1)172 // Storage: System LastRuntimeUpgrade (r:1 w:0)208 fn service_task_named() -> Weight {173 fn service_task_periodic() -> Weight {209 Weight::from_ref_time(13_127_000 as u64)174 Weight::from_ref_time(10_669_000 as u64)210 .saturating_add(RocksDbWeight::get().writes(1 as u64))175 .saturating_add(RocksDbWeight::get().reads(1 as u64))211 }176 }212 fn service_task_periodic() -> Weight {177 // Storage: System Account (r:1 w:1)213 Weight::from_ref_time(11_053_000 as u64)178 // Storage: System AllExtrinsicsLen (r:1 w:1)214 }179 // Storage: System BlockWeight (r:1 w:1)180 // Storage: Configuration WeightToFeeCoefficientOverride (r:1 w:0)181 // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)215 fn execute_dispatch_signed() -> Weight {182 fn execute_dispatch_signed() -> Weight {216 Weight::from_ref_time(4_158_000 as u64)183 Weight::from_ref_time(36_083_000 as u64)184 .saturating_add(RocksDbWeight::get().reads(5 as u64))185 .saturating_add(RocksDbWeight::get().writes(3 as u64))217 }186 }218 fn execute_dispatch_unsigned() -> Weight {187 fn execute_dispatch_unsigned() -> Weight {219 Weight::from_ref_time(4_104_000 as u64)188 Weight::from_ref_time(4_386_000 as u64)220 }189 }221 // Storage: Scheduler Agenda (r:1 w:1)190 // Storage: Scheduler Agenda (r:1 w:1)222 /// The range of component `s` is `[0, 511]`.223 fn schedule(s: u32, ) -> Weight {191 fn schedule(s: u32, ) -> Weight {224 Weight::from_ref_time(20_074_000 as u64)192 Weight::from_ref_time(17_257_000 as u64)225 // Standard Error: 765193 // Standard Error: 2_791226 .saturating_add(Weight::from_ref_time(343_285 as u64).saturating_mul(s as u64))194 .saturating_add(Weight::from_ref_time(574_832 as u64).saturating_mul(s as u64))227 .saturating_add(RocksDbWeight::get().reads(1 as u64))195 .saturating_add(RocksDbWeight::get().reads(1 as u64))228 .saturating_add(RocksDbWeight::get().writes(1 as u64))196 .saturating_add(RocksDbWeight::get().writes(1 as u64))229 }197 }230 // Storage: Scheduler Agenda (r:1 w:1)198 // Storage: Scheduler Agenda (r:1 w:1)231 // Storage: Scheduler Lookup (r:0 w:1)199 // Storage: Scheduler Lookup (r:0 w:1)232 /// The range of component `s` is `[1, 512]`.233 fn cancel(s: u32, ) -> Weight {200 fn cancel(s: u32, ) -> Weight {234 Weight::from_ref_time(21_509_000 as u64)201 Weight::from_ref_time(19_803_000 as u64)235 // Standard Error: 708202 // Standard Error: 1_177236 .saturating_add(Weight::from_ref_time(323_013 as u64).saturating_mul(s as u64))203 .saturating_add(Weight::from_ref_time(475_027 as u64).saturating_mul(s as u64))237 .saturating_add(RocksDbWeight::get().reads(1 as u64))204 .saturating_add(RocksDbWeight::get().reads(1 as u64))238 .saturating_add(RocksDbWeight::get().writes(2 as u64))205 .saturating_add(RocksDbWeight::get().writes(2 as u64))239 }206 }240 // Storage: Scheduler Lookup (r:1 w:1)207 // Storage: Scheduler Lookup (r:1 w:1)241 // Storage: Scheduler Agenda (r:1 w:1)208 // Storage: Scheduler Agenda (r:1 w:1)242 /// The range of component `s` is `[0, 511]`.243 fn schedule_named(s: u32, ) -> Weight {209 fn schedule_named(s: u32, ) -> Weight {244 Weight::from_ref_time(22_427_000 as u64)210 Weight::from_ref_time(18_746_000 as u64)245 // Standard Error: 850211 // Standard Error: 2_997246 .saturating_add(Weight::from_ref_time(357_265 as u64).saturating_mul(s as u64))212 .saturating_add(Weight::from_ref_time(635_697 as u64).saturating_mul(s as u64))247 .saturating_add(RocksDbWeight::get().reads(2 as u64))213 .saturating_add(RocksDbWeight::get().reads(2 as u64))248 .saturating_add(RocksDbWeight::get().writes(2 as u64))214 .saturating_add(RocksDbWeight::get().writes(2 as u64))249 }215 }250 // Storage: Scheduler Lookup (r:1 w:1)216 // Storage: Scheduler Lookup (r:1 w:1)251 // Storage: Scheduler Agenda (r:1 w:1)217 // Storage: Scheduler Agenda (r:1 w:1)252 /// The range of component `s` is `[1, 512]`.253 fn cancel_named(s: u32, ) -> Weight {218 fn cancel_named(s: u32, ) -> Weight {254 Weight::from_ref_time(22_875_000 as u64)219 Weight::from_ref_time(20_983_000 as u64)255 // Standard Error: 693220 // Standard Error: 1_850256 .saturating_add(Weight::from_ref_time(336_643 as u64).saturating_mul(s as u64))221 .saturating_add(Weight::from_ref_time(518_812 as u64).saturating_mul(s as u64))257 .saturating_add(RocksDbWeight::get().reads(2 as u64))222 .saturating_add(RocksDbWeight::get().reads(2 as u64))258 .saturating_add(RocksDbWeight::get().writes(2 as u64))223 .saturating_add(RocksDbWeight::get().writes(2 as u64))259 }224 }260261 // Storage: Scheduler Lookup (r:1 w:1)225 // Storage: Scheduler Lookup (r:1 w:0)262 // Storage: Scheduler Agenda (r:1 w:1)226 // Storage: Scheduler Agenda (r:1 w:1)263 fn change_named_priority(s: u32, ) -> Weight {227 fn change_named_priority(s: u32, ) -> Weight {264 Weight::from_ref_time(8_642_000)228 Weight::from_ref_time(21_591_000 as u64)265 // Standard Error: 0229 // Standard Error: 4_187266 .saturating_add(Weight::from_ref_time(431_000).saturating_mul(s as u64))230 .saturating_add(Weight::from_ref_time(531_231 as u64).saturating_mul(s as u64))267 .saturating_add(RocksDbWeight::get().reads(2 as u64))231 .saturating_add(RocksDbWeight::get().reads(2 as u64))268 .saturating_add(RocksDbWeight::get().writes(2 as u64))232 .saturating_add(RocksDbWeight::get().writes(1 as u64))269 }233 }270}234}271235