difftreelog
Benchmark completed
in: master
8 files changed
Makefilediffbeforeafterboth65 --template .maintain/frame-weight-template.hbs --steps=50 --repeat=200 --heap-pages=4096 \65 --template .maintain/frame-weight-template.hbs --steps=50 --repeat=200 --heap-pages=4096 \66 --output=./pallets/$(PALLET)/src/weights.rs66 --output=./pallets/$(PALLET)/src/weights.rs6768.PHONY: _bench269_bench2:70 cargo run --release --features runtime-benchmarks,unique-runtime -- \71 benchmark pallet --pallet pallet-$(PALLET) \72 --wasm-execution compiled --extrinsic '*' \73 --template .maintain/frame-weight-template.hbs --steps=50 --repeat=200 --heap-pages=4096 \74 --output=./pallets/$(PALLET_DIR)/src/weights.rs677568.PHONY: bench-evm-migration76.PHONY: bench-evm-migration69bench-evm-migration:77bench-evm-migration:9510396.PHONY: bench-scheduler104.PHONY: bench-scheduler97bench-scheduler:105bench-scheduler:98 make _bench PALLET=unq-scheduler 106 make _bench2 PALLET=unq-scheduler PALLET_DIR=scheduler99107100.PHONY: bench108.PHONY: bench101bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-scheduler109bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-schedulerpallets/scheduler/src/benchmarking.rsdiffbeforeafterboth35//! Scheduler pallet benchmarking.35//! Scheduler pallet benchmarking.363637use super::*;37use super::*;38use frame_benchmarking::benchmarks;38use frame_benchmarking::{benchmarks, account};39use frame_support::{39use frame_support::{40 ensure,40 ensure,41 traits::{OnInitialize, PreimageProvider, PreimageRecipient},41 traits::{OnInitialize},42};42};43use frame_system::RawOrigin;43use frame_system::RawOrigin;44use sp_runtime::traits::Hash;44use sp_runtime::traits::Hash;45use sp_std::{prelude::*, vec};45use sp_std::{prelude::*, vec};464647use crate::Pallet as Scheduler;47use crate::Pallet as Scheduler;48use frame_system::Pallet as System;48use frame_system::Pallet as System;49use frame_support::traits::Currency;495050const BLOCK_NUMBER: u32 = 2;51const BLOCK_NUMBER: u32 = 2;515259 when: T::BlockNumber,60 when: T::BlockNumber,60 n: u32,61 n: u32,61 periodic: bool,62 periodic: bool,62 named: bool,63 resolved: Option<bool>,63 resolved: Option<bool>,64) -> Result<(), &'static str> {64) -> Result<(), &'static str> {6566 let t = DispatchTime::At(when);67 let caller = account("user", 0, 1);68 69 // Give the sender account max funds for transfer (their account will never reasonably be killed).70 T::Currency::make_free_balance_be(&caller, T::Currency::minimum_balance());7165 for i in 0..n {72 for i in 0..n {66 // Named schedule is strictly heavier than anonymous67 let (call, hash) = call_and_hash::<T>(i);73 let (call, hash) = call_and_hash::<T>(i);68 let call_or_hash = match resolved {74 let call_or_hash = match resolved {69 Some(true) => {70 T::PreimageProvider::note_preimage(call.encode().try_into().unwrap());71 if T::PreimageProvider::have_preimage(&hash) {72 CallOrHashOf::<T>::Hash(hash)73 } else {74 call.into()75 }76 }77 Some(false) => call.into(),75 Some(_) => call.into(),78 None => CallOrHashOf::<T>::Hash(hash),76 None => CallOrHashOf::<T>::Hash(hash),79 };77 };80 let period = match periodic {78 let period = match periodic {81 true => Some(((i + 100).into(), 100)),79 true => Some(((i + 100).into(), 100)),82 false => None,80 false => None,83 };81 };8284 let t = DispatchTime::At(when);83 let slice_id: [u8; 4] = i.encode().try_into().unwrap();84 let mut id: [u8; 16] = [0; 16];85 id[..4].clone_from_slice(&slice_id);8685 let origin = frame_system::RawOrigin::Root.into();87 let origin = frame_system::RawOrigin::Signed(caller.clone()).into();86 if named {87 Scheduler::<T>::do_schedule_named(88 Scheduler::<T>::do_schedule_named(88 i.encode()89 .try_into()90 .unwrap_or([0; MAX_TASK_ID_LENGTH_IN_BYTES as usize]),89 id,91 t,90 t,92 period,91 period,93 0,92 0,94 origin,93 origin,95 call_or_hash,94 call_or_hash,96 )?;95 )?;97 } else {98 Scheduler::<T>::do_schedule(t, period, 0, origin, call_or_hash)?;99 }100 }96 }101 ensure!(97 ensure!(102 Agenda::<T>::get(when).len() == n as usize,98 Agenda::<T>::get(when).len() == n as usize,116 on_initialize_periodic_named_resolved {112 on_initialize_periodic_named_resolved {117 let s in 1 .. T::MaxScheduledPerBlock::get();113 let s in 1 .. T::MaxScheduledPerBlock::get();118 let when = BLOCK_NUMBER.into();114 let when = BLOCK_NUMBER.into();119 fill_schedule::<T>(when, s, true, true, Some(true))?;115 fill_schedule::<T>(when, s, true, Some(true))?;120 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }116 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }121 verify {117 verify {122 assert_eq!(System::<T>::event_count(), s * 2);118 assert_eq!(System::<T>::event_count(), s);123 for i in 0..s {119 for i in 0..s {124 assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);120 assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);125 }121 }128 on_initialize_named_resolved {124 on_initialize_named_resolved {129 let s in 1 .. T::MaxScheduledPerBlock::get();125 let s in 1 .. T::MaxScheduledPerBlock::get();130 let when = BLOCK_NUMBER.into();126 let when = BLOCK_NUMBER.into();131 fill_schedule::<T>(when, s, false, true, Some(true))?;127 fill_schedule::<T>(when, s, false, Some(true))?;132 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }128 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }133 verify {129 verify {134 assert_eq!(System::<T>::event_count(), s * 2);130 assert_eq!(System::<T>::event_count(), s);135 assert!(Agenda::<T>::iter().count() == 0);131 assert!(Agenda::<T>::iter().count() == 0);136 }132 }137133138 on_initialize_periodic_resolved {134 on_initialize_periodic_resolved {139 let s in 1 .. T::MaxScheduledPerBlock::get();135 let s in 1 .. T::MaxScheduledPerBlock::get();140 let when = BLOCK_NUMBER.into();136 let when = BLOCK_NUMBER.into();141 fill_schedule::<T>(when, s, true, false, Some(true))?;137 fill_schedule::<T>(when, s, true, Some(true))?;142 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }138 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }143 verify {139 verify {144 assert_eq!(System::<T>::event_count(), s * 2);140 assert_eq!(System::<T>::event_count(), s );145 for i in 0..s {141 for i in 0..s {146 assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);142 assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);147 }143 }150 on_initialize_resolved {146 on_initialize_resolved {151 let s in 1 .. T::MaxScheduledPerBlock::get();147 let s in 1 .. T::MaxScheduledPerBlock::get();152 let when = BLOCK_NUMBER.into();148 let when = BLOCK_NUMBER.into();153 fill_schedule::<T>(when, s, false, false, Some(true))?;149 fill_schedule::<T>(when, s, false, Some(true))?;154 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }150 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }155 verify {156 assert_eq!(System::<T>::event_count(), s * 2);157 assert!(Agenda::<T>::iter().count() == 0);158 }159160 on_initialize_named_aborted {161 let s in 1 .. T::MaxScheduledPerBlock::get();162 let when = BLOCK_NUMBER.into();163 fill_schedule::<T>(when, s, false, true, None)?;164 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }165 verify {166 assert_eq!(System::<T>::event_count(), 0);167 if let Some(delay) = T::NoPreimagePostponement::get() {168 assert_eq!(Agenda::<T>::get(when + delay).len(), s as usize);169 } else {170 assert!(Agenda::<T>::iter().count() == 0);171 }172 }173174 on_initialize_aborted {175 let s in 1 .. T::MaxScheduledPerBlock::get();176 let when = BLOCK_NUMBER.into();177 fill_schedule::<T>(when, s, false, false, None)?;178 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }179 verify {180 assert_eq!(System::<T>::event_count(), 0);181 if let Some(delay) = T::NoPreimagePostponement::get() {182 assert_eq!(Agenda::<T>::get(when + delay).len(), s as usize);183 } else {184 assert!(Agenda::<T>::iter().count() == 0);185 }186 }187188 on_initialize_periodic_named {189 let s in 1 .. T::MaxScheduledPerBlock::get();190 let when = BLOCK_NUMBER.into();191 fill_schedule::<T>(when, s, true, true, Some(false))?;192 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }193 verify {194 assert_eq!(System::<T>::event_count(), s);195 for i in 0..s {196 assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);197 }198 }199200 on_initialize_periodic {201 let s in 1 .. T::MaxScheduledPerBlock::get();202 let when = BLOCK_NUMBER.into();203 fill_schedule::<T>(when, s, true, false, Some(false))?;204 }: { Scheduler::<T>::on_initialize(when); }205 verify {206 assert_eq!(System::<T>::event_count(), s);207 for i in 0..s {208 assert_eq!(Agenda::<T>::get(when + (i + 100).into()).len(), 1 as usize);209 }210 }211212 on_initialize_named {213 let s in 1 .. T::MaxScheduledPerBlock::get();214 let when = BLOCK_NUMBER.into();215 fill_schedule::<T>(when, s, false, true, Some(false))?;216 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }217 verify {151 verify {218 assert_eq!(System::<T>::event_count(), s);152 assert_eq!(System::<T>::event_count(), s);219 assert!(Agenda::<T>::iter().count() == 0);153 assert!(Agenda::<T>::iter().count() == 0);220 }154 }221155222 on_initialize {156 schedule_named {223 let s in 1 .. T::MaxScheduledPerBlock::get();157 let caller: T::AccountId = account("user", 0, 1);224 let when = BLOCK_NUMBER.into();225 fill_schedule::<T>(when, s, false, false, Some(false))?;226 }: { Scheduler::<T>::on_initialize(BLOCK_NUMBER.into()); }158 let origin: RawOrigin<T::AccountId> = frame_system::RawOrigin::Signed(caller.clone());227 verify {228 assert_eq!(System::<T>::event_count(), s);229 assert!(Agenda::<T>::iter().count() == 0);230 }231232 schedule_named {233 let s in 0 .. T::MaxScheduledPerBlock::get();159 let s in 0 .. T::MaxScheduledPerBlock::get();234 let id = s.encode().try_into().unwrap_or([0; MAX_TASK_ID_LENGTH_IN_BYTES as usize]);160 let slice_id: [u8; 4] = s.encode().try_into().unwrap();161 let mut id: [u8; 16] = [0; 16];162 id[..4].clone_from_slice(&slice_id);235 let when = BLOCK_NUMBER.into();163 let when = BLOCK_NUMBER.into();236 let periodic = Some((T::BlockNumber::one(), 100));164 let periodic = Some((T::BlockNumber::one(), 100));237 let priority = 0;165 let priority = 0;238 // Essentially a no-op call.166 // Essentially a no-op call.239 let inner_call = frame_system::Call::set_storage { items: vec![] }.into();167 let inner_call = frame_system::Call::set_storage { items: vec![] }.into();240 let call = Box::new(CallOrHashOf::<T>::Value(inner_call));168 let call = Box::new(CallOrHashOf::<T>::Value(inner_call));241242 fill_schedule::<T>(when, s, true, true, Some(false))?;169 fill_schedule::<T>(when, s, true, Some(false))?;243 }: _(RawOrigin::Root, id, when, periodic, priority, call)170 }: _(origin, id, when, periodic, priority, call)244 verify {171 verify {245 ensure!(172 ensure!(246 Agenda::<T>::get(when).len() == (s + 1) as usize,173 Agenda::<T>::get(when).len() == (s + 1) as usize,249 }176 }250177251 cancel_named {178 cancel_named {179 let caller: T::AccountId = account("user", 0, 1);180 let origin: RawOrigin<T::AccountId> = frame_system::RawOrigin::Signed(caller.clone());252 let s in 1 .. T::MaxScheduledPerBlock::get();181 let s in 1 .. T::MaxScheduledPerBlock::get();253 let when = BLOCK_NUMBER.into();182 let when = BLOCK_NUMBER.into();254 let id = 0.encode().try_into().unwrap_or([0; MAX_TASK_ID_LENGTH_IN_BYTES as usize]);183 let id = 0.encode().try_into().unwrap_or([0; MAX_TASK_ID_LENGTH_IN_BYTES as usize]);255256 fill_schedule::<T>(when, s, true, true, Some(false))?;184 fill_schedule::<T>(when, s, true, Some(false))?;257 }: _(RawOrigin::Root, id)185 }: _(origin, id)258 verify {186 verify {259 ensure!(187 ensure!(260 Lookup::<T>::get(id).is_none(),188 Lookup::<T>::get(id).is_none(),pallets/scheduler/src/weights.rsdiffbeforeafterboth1// This file is part of Substrate.1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs223// Copyright (C) 2022 Parity Technologies (UK) Ltd.3//! Autogenerated weights for pallet_unq_scheduler4// 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//! Autogenerated weights for pallet_scheduler19//!4//!20//! 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-dev21//! DATE: 2022-01-31, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2022-06-09, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`22//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 10247//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102423824// Executed Command:9// Executed Command:25// ./target/production/substrate10// target/release/unique-collator26// benchmark11// benchmark27// --chain=dev12// pallet13// --pallet14// pallet-unq-scheduler15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs28// --steps=5021// --steps=5029// --repeat=2022// --repeat=20030// --pallet=pallet_scheduler31// --extrinsic=*32// --execution=wasm33// --wasm-execution=compiled34// --heap-pages=409623// --heap-pages=409635// --output=./frame/scheduler/src/weights.rs24// --output=./pallets/scheduler/src/weights.rs36// --template=.maintain/frame-weight-template.hbs37// --header=HEADER-APACHE238// --raw392540#![cfg_attr(rustfmt, rustfmt_skip)]26#![cfg_attr(rustfmt, rustfmt_skip)]41#![allow(unused_parens)]27#![allow(unused_parens)]42#![allow(unused_imports)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]433044use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};45use sp_std::marker::PhantomData;32use sp_std::marker::PhantomData;463347/// Weight functions needed for pallet_scheduler.34/// Weight functions needed for pallet_unq_scheduler.48pub trait WeightInfo {35pub trait WeightInfo {49 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight;36 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight;50 fn on_initialize_named_resolved(s: u32, ) -> Weight;37 fn on_initialize_named_resolved(s: u32, ) -> Weight;51 fn on_initialize_periodic_resolved(s: u32, ) -> Weight;38 fn on_initialize_periodic_resolved(s: u32, ) -> Weight;52 fn on_initialize_resolved(s: u32, ) -> Weight;39 fn on_initialize_resolved(s: u32, ) -> Weight;53 fn on_initialize_named_aborted(s: u32, ) -> Weight;54 fn on_initialize_aborted(s: u32, ) -> Weight;55 fn on_initialize_periodic_named(s: u32, ) -> Weight;56 fn on_initialize_periodic(s: u32, ) -> Weight;57 fn on_initialize_named(s: u32, ) -> Weight;58 fn on_initialize(s: u32, ) -> Weight;59 fn schedule(s: u32, ) -> Weight;60 fn cancel(s: u32, ) -> Weight;61 fn schedule_named(s: u32, ) -> Weight;40 fn schedule_named(s: u32, ) -> Weight;62 fn cancel_named(s: u32, ) -> Weight;41 fn cancel_named(s: u32, ) -> Weight;63}42}644365/// Weights for pallet_scheduler using the Substrate node and recommended hardware.44/// Weights for pallet_unq_scheduler using the Substrate node and recommended hardware.66pub struct SubstrateWeight<T>(PhantomData<T>);45pub struct SubstrateWeight<T>(PhantomData<T>);67impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {46impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {68 // Storage: Scheduler Agenda (r:2 w:2)47 // Storage: Scheduler Agenda (r:2 w:2)69 // Storage: Preimage PreimageFor (r:1 w:1)48 // Storage: System Account (r:1 w:1)70 // Storage: Preimage StatusFor (r:1 w:1)49 // Storage: System AllExtrinsicsLen (r:1 w:1)50 // Storage: System BlockWeight (r:1 w:1)71 // Storage: Scheduler Lookup (r:0 w:1)51 // Storage: Scheduler Lookup (r:0 w:1)72 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {52 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {73 (11_587_000 as Weight)53 (39_822_000 as Weight)74 // Standard Error: 17_00054 // Standard Error: 4_00075 .saturating_add((17_428_000 as Weight).saturating_mul(s as Weight))55 .saturating_add((31_823_000 as Weight).saturating_mul(s as Weight))76 .saturating_add(T::DbWeight::get().reads(1 as Weight))56 .saturating_add(T::DbWeight::get().reads(4 as Weight))77 .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))57 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))78 .saturating_add(T::DbWeight::get().writes(1 as Weight))58 .saturating_add(T::DbWeight::get().writes(4 as Weight))79 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight)))59 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))80 }60 }81 // Storage: Scheduler Agenda (r:1 w:1)61 // Storage: Scheduler Agenda (r:1 w:1)82 // Storage: Preimage PreimageFor (r:1 w:1)62 // Storage: System Account (r:1 w:1)83 // Storage: Preimage StatusFor (r:1 w:1)63 // Storage: System AllExtrinsicsLen (r:1 w:1)64 // Storage: System BlockWeight (r:1 w:1)84 // Storage: Scheduler Lookup (r:0 w:1)65 // Storage: Scheduler Lookup (r:0 w:1)85 fn on_initialize_named_resolved(s: u32, ) -> Weight {66 fn on_initialize_named_resolved(s: u32, ) -> Weight {86 (8_965_000 as Weight)67 (36_019_000 as Weight)87 // Standard Error: 11_00088 .saturating_add((13_410_000 as Weight).saturating_mul(s as Weight))89 .saturating_add(T::DbWeight::get().reads(1 as Weight))90 .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))91 .saturating_add(T::DbWeight::get().writes(1 as Weight))92 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))93 }94 // Storage: Scheduler Agenda (r:2 w:2)95 // Storage: Preimage PreimageFor (r:1 w:1)96 // Storage: Preimage StatusFor (r:1 w:1)97 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {98 (8_654_000 as Weight)99 // Standard Error: 17_000100 .saturating_add((14_990_000 as Weight).saturating_mul(s as Weight))101 .saturating_add(T::DbWeight::get().reads(1 as Weight))102 .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))103 .saturating_add(T::DbWeight::get().writes(1 as Weight))104 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))105 }106 // Storage: Scheduler Agenda (r:1 w:1)107 // Storage: Preimage PreimageFor (r:1 w:1)108 // Storage: Preimage StatusFor (r:1 w:1)109 fn on_initialize_resolved(s: u32, ) -> Weight {110 (9_303_000 as Weight)111 // Standard Error: 10_000112 .saturating_add((12_244_000 as Weight).saturating_mul(s as Weight))113 .saturating_add(T::DbWeight::get().reads(1 as Weight))114 .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))115 .saturating_add(T::DbWeight::get().writes(1 as Weight))116 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))117 }118 // Storage: Scheduler Agenda (r:2 w:2)119 // Storage: Preimage PreimageFor (r:1 w:0)120 // Storage: Scheduler Lookup (r:0 w:1)121 fn on_initialize_named_aborted(s: u32, ) -> Weight {122 (7_506_000 as Weight)123 // Standard Error: 3_00068 // Standard Error: 3_000124 .saturating_add((5_208_000 as Weight).saturating_mul(s as Weight))69 .saturating_add((22_660_000 as Weight).saturating_mul(s as Weight))125 .saturating_add(T::DbWeight::get().reads(2 as Weight))70 .saturating_add(T::DbWeight::get().reads(4 as Weight))126 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))71 .saturating_add(T::DbWeight::get().writes(4 as Weight))127 .saturating_add(T::DbWeight::get().writes(2 as Weight))128 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))72 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))129 }73 }130 // Storage: Scheduler Agenda (r:2 w:2)74 // Storage: Scheduler Agenda (r:2 w:2)131 // Storage: Preimage PreimageFor (r:1 w:0)75 // Storage: System Account (r:1 w:1)76 // Storage: System AllExtrinsicsLen (r:1 w:1)77 // Storage: System BlockWeight (r:1 w:1)78 // Storage: Scheduler Lookup (r:0 w:1)132 fn on_initialize_aborted(s: u32, ) -> Weight {79 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {133 (8_046_000 as Weight)80 (36_613_000 as Weight)134 // Standard Error: 3_00081 // Standard Error: 3_000135 .saturating_add((2_914_000 as Weight).saturating_mul(s as Weight))82 .saturating_add((31_895_000 as Weight).saturating_mul(s as Weight))136 .saturating_add(T::DbWeight::get().reads(2 as Weight))83 .saturating_add(T::DbWeight::get().reads(4 as Weight))137 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))84 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))138 .saturating_add(T::DbWeight::get().writes(2 as Weight))85 .saturating_add(T::DbWeight::get().writes(4 as Weight))139 }140 // Storage: Scheduler Agenda (r:2 w:2)141 // Storage: Scheduler Lookup (r:0 w:1)142 fn on_initialize_periodic_named(s: u32, ) -> Weight {143 (13_704_000 as Weight)144 // Standard Error: 4_000145 .saturating_add((8_186_000 as Weight).saturating_mul(s as Weight))146 .saturating_add(T::DbWeight::get().reads(1 as Weight))147 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))148 .saturating_add(T::DbWeight::get().writes(1 as Weight))149 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))86 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))150 }87 }151 // Storage: Scheduler Agenda (r:2 w:2)152 fn on_initialize_periodic(s: u32, ) -> Weight {153 (12_668_000 as Weight)154 // Standard Error: 5_000155 .saturating_add((5_868_000 as Weight).saturating_mul(s as Weight))156 .saturating_add(T::DbWeight::get().reads(1 as Weight))157 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))158 .saturating_add(T::DbWeight::get().writes(1 as Weight))159 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))160 }161 // Storage: Scheduler Agenda (r:1 w:1)88 // Storage: Scheduler Agenda (r:1 w:1)89 // Storage: System Account (r:1 w:1)90 // Storage: System AllExtrinsicsLen (r:1 w:1)91 // Storage: System BlockWeight (r:1 w:1)162 // Storage: Scheduler Lookup (r:0 w:1)92 // Storage: Scheduler Lookup (r:0 w:1)163 fn on_initialize_named(s: u32, ) -> Weight {93 fn on_initialize_resolved(s: u32, ) -> Weight {164 (13_946_000 as Weight)94 (36_252_000 as Weight)165 // Standard Error: 4_00095 // Standard Error: 3_000166 .saturating_add((4_367_000 as Weight).saturating_mul(s as Weight))96 .saturating_add((22_662_000 as Weight).saturating_mul(s as Weight))167 .saturating_add(T::DbWeight::get().reads(1 as Weight))97 .saturating_add(T::DbWeight::get().reads(4 as Weight))168 .saturating_add(T::DbWeight::get().writes(1 as Weight))98 .saturating_add(T::DbWeight::get().writes(4 as Weight))169 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))99 .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))170 }100 }171 // Storage: Scheduler Agenda (r:1 w:1)172 fn on_initialize(s: u32, ) -> Weight {173 (13_151_000 as Weight)174 // Standard Error: 4_000175 .saturating_add((3_455_000 as Weight).saturating_mul(s as Weight))176 .saturating_add(T::DbWeight::get().reads(1 as Weight))177 .saturating_add(T::DbWeight::get().writes(1 as Weight))178 }179 // Storage: Scheduler Agenda (r:1 w:1)180 fn schedule(s: u32, ) -> Weight {181 (14_040_000 as Weight)182 // Standard Error: 1_000183 .saturating_add((89_000 as Weight).saturating_mul(s as Weight))184 .saturating_add(T::DbWeight::get().reads(1 as Weight))185 .saturating_add(T::DbWeight::get().writes(1 as Weight))186 }187 // Storage: Scheduler Agenda (r:1 w:1)188 // Storage: Scheduler Lookup (r:0 w:1)189 fn cancel(s: u32, ) -> Weight {190 (14_376_000 as Weight)191 // Standard Error: 1_000192 .saturating_add((576_000 as Weight).saturating_mul(s as Weight))193 .saturating_add(T::DbWeight::get().reads(1 as Weight))194 .saturating_add(T::DbWeight::get().writes(2 as Weight))195 }196 // Storage: Scheduler Lookup (r:1 w:1)101 // Storage: Scheduler Lookup (r:1 w:1)197 // Storage: Scheduler Agenda (r:1 w:1)102 // Storage: Scheduler Agenda (r:1 w:1)198 fn schedule_named(s: u32, ) -> Weight {103 fn schedule_named(s: u32, ) -> Weight {199 (16_806_000 as Weight)104 (34_561_000 as Weight)200 // Standard Error: 1_000105 // Standard Error: 0201 .saturating_add((102_000 as Weight).saturating_mul(s as Weight))106 .saturating_add((161_000 as Weight).saturating_mul(s as Weight))202 .saturating_add(T::DbWeight::get().reads(2 as Weight))107 .saturating_add(T::DbWeight::get().reads(2 as Weight))203 .saturating_add(T::DbWeight::get().writes(2 as Weight))108 .saturating_add(T::DbWeight::get().writes(2 as Weight))204 }109 }205 // Storage: Scheduler Lookup (r:1 w:1)110 // Storage: Scheduler Lookup (r:1 w:1)206 // Storage: Scheduler Agenda (r:1 w:1)111 // Storage: Scheduler Agenda (r:1 w:1)207 fn cancel_named(s: u32, ) -> Weight {112 fn cancel_named(s: u32, ) -> Weight {208 (15_852_000 as Weight)113 (30_932_000 as Weight)209 // Standard Error: 2_000114 // Standard Error: 1_000210 .saturating_add((590_000 as Weight).saturating_mul(s as Weight))115 .saturating_add((1_537_000 as Weight).saturating_mul(s as Weight))211 .saturating_add(T::DbWeight::get().reads(2 as Weight))116 .saturating_add(T::DbWeight::get().reads(2 as Weight))212 .saturating_add(T::DbWeight::get().writes(2 as Weight))117 .saturating_add(T::DbWeight::get().writes(2 as Weight))213 }118 }216// For backwards compatibility and tests121// For backwards compatibility and tests217impl WeightInfo for () {122impl WeightInfo for () {218 // Storage: Scheduler Agenda (r:2 w:2)123 // Storage: Scheduler Agenda (r:2 w:2)219 // Storage: Preimage PreimageFor (r:1 w:1)124 // Storage: System Account (r:1 w:1)220 // Storage: Preimage StatusFor (r:1 w:1)125 // Storage: System AllExtrinsicsLen (r:1 w:1)126 // Storage: System BlockWeight (r:1 w:1)221 // Storage: Scheduler Lookup (r:0 w:1)127 // Storage: Scheduler Lookup (r:0 w:1)222 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {128 fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {223 (11_587_000 as Weight)129 (39_822_000 as Weight)224 // Standard Error: 17_000130 // Standard Error: 4_000225 .saturating_add((17_428_000 as Weight).saturating_mul(s as Weight))131 .saturating_add((31_823_000 as Weight).saturating_mul(s as Weight))226 .saturating_add(RocksDbWeight::get().reads(1 as Weight))132 .saturating_add(RocksDbWeight::get().reads(4 as Weight))227 .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))133 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))228 .saturating_add(RocksDbWeight::get().writes(1 as Weight))134 .saturating_add(RocksDbWeight::get().writes(4 as Weight))229 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(s as Weight)))135 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))230 }136 }231 // Storage: Scheduler Agenda (r:1 w:1)137 // Storage: Scheduler Agenda (r:1 w:1)232 // Storage: Preimage PreimageFor (r:1 w:1)138 // Storage: System Account (r:1 w:1)233 // Storage: Preimage StatusFor (r:1 w:1)139 // Storage: System AllExtrinsicsLen (r:1 w:1)140 // Storage: System BlockWeight (r:1 w:1)234 // Storage: Scheduler Lookup (r:0 w:1)141 // Storage: Scheduler Lookup (r:0 w:1)235 fn on_initialize_named_resolved(s: u32, ) -> Weight {142 fn on_initialize_named_resolved(s: u32, ) -> Weight {236 (8_965_000 as Weight)143 (36_019_000 as Weight)237 // Standard Error: 11_000238 .saturating_add((13_410_000 as Weight).saturating_mul(s as Weight))239 .saturating_add(RocksDbWeight::get().reads(1 as Weight))240 .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))241 .saturating_add(RocksDbWeight::get().writes(1 as Weight))242 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))243 }244 // Storage: Scheduler Agenda (r:2 w:2)245 // Storage: Preimage PreimageFor (r:1 w:1)246 // Storage: Preimage StatusFor (r:1 w:1)247 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {248 (8_654_000 as Weight)249 // Standard Error: 17_000250 .saturating_add((14_990_000 as Weight).saturating_mul(s as Weight))251 .saturating_add(RocksDbWeight::get().reads(1 as Weight))252 .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))253 .saturating_add(RocksDbWeight::get().writes(1 as Weight))254 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))255 }256 // Storage: Scheduler Agenda (r:1 w:1)257 // Storage: Preimage PreimageFor (r:1 w:1)258 // Storage: Preimage StatusFor (r:1 w:1)259 fn on_initialize_resolved(s: u32, ) -> Weight {260 (9_303_000 as Weight)261 // Standard Error: 10_000262 .saturating_add((12_244_000 as Weight).saturating_mul(s as Weight))263 .saturating_add(RocksDbWeight::get().reads(1 as Weight))264 .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))265 .saturating_add(RocksDbWeight::get().writes(1 as Weight))266 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))267 }268 // Storage: Scheduler Agenda (r:2 w:2)269 // Storage: Preimage PreimageFor (r:1 w:0)270 // Storage: Scheduler Lookup (r:0 w:1)271 fn on_initialize_named_aborted(s: u32, ) -> Weight {272 (7_506_000 as Weight)273 // Standard Error: 3_000144 // Standard Error: 3_000274 .saturating_add((5_208_000 as Weight).saturating_mul(s as Weight))145 .saturating_add((22_660_000 as Weight).saturating_mul(s as Weight))275 .saturating_add(RocksDbWeight::get().reads(2 as Weight))146 .saturating_add(RocksDbWeight::get().reads(4 as Weight))276 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))147 .saturating_add(RocksDbWeight::get().writes(4 as Weight))277 .saturating_add(RocksDbWeight::get().writes(2 as Weight))278 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))148 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))279 }149 }280 // Storage: Scheduler Agenda (r:2 w:2)150 // Storage: Scheduler Agenda (r:2 w:2)281 // Storage: Preimage PreimageFor (r:1 w:0)151 // Storage: System Account (r:1 w:1)152 // Storage: System AllExtrinsicsLen (r:1 w:1)153 // Storage: System BlockWeight (r:1 w:1)154 // Storage: Scheduler Lookup (r:0 w:1)282 fn on_initialize_aborted(s: u32, ) -> Weight {155 fn on_initialize_periodic_resolved(s: u32, ) -> Weight {283 (8_046_000 as Weight)156 (36_613_000 as Weight)284 // Standard Error: 3_000157 // Standard Error: 3_000285 .saturating_add((2_914_000 as Weight).saturating_mul(s as Weight))158 .saturating_add((31_895_000 as Weight).saturating_mul(s as Weight))286 .saturating_add(RocksDbWeight::get().reads(2 as Weight))159 .saturating_add(RocksDbWeight::get().reads(4 as Weight))287 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))160 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))288 .saturating_add(RocksDbWeight::get().writes(2 as Weight))161 .saturating_add(RocksDbWeight::get().writes(4 as Weight))289 }290 // Storage: Scheduler Agenda (r:2 w:2)291 // Storage: Scheduler Lookup (r:0 w:1)292 fn on_initialize_periodic_named(s: u32, ) -> Weight {293 (13_704_000 as Weight)294 // Standard Error: 4_000295 .saturating_add((8_186_000 as Weight).saturating_mul(s as Weight))296 .saturating_add(RocksDbWeight::get().reads(1 as Weight))297 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))298 .saturating_add(RocksDbWeight::get().writes(1 as Weight))299 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))162 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))300 }163 }301 // Storage: Scheduler Agenda (r:2 w:2)302 fn on_initialize_periodic(s: u32, ) -> Weight {303 (12_668_000 as Weight)304 // Standard Error: 5_000305 .saturating_add((5_868_000 as Weight).saturating_mul(s as Weight))306 .saturating_add(RocksDbWeight::get().reads(1 as Weight))307 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))308 .saturating_add(RocksDbWeight::get().writes(1 as Weight))309 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))310 }311 // Storage: Scheduler Agenda (r:1 w:1)164 // Storage: Scheduler Agenda (r:1 w:1)165 // Storage: System Account (r:1 w:1)166 // Storage: System AllExtrinsicsLen (r:1 w:1)167 // Storage: System BlockWeight (r:1 w:1)312 // Storage: Scheduler Lookup (r:0 w:1)168 // Storage: Scheduler Lookup (r:0 w:1)313 fn on_initialize_named(s: u32, ) -> Weight {169 fn on_initialize_resolved(s: u32, ) -> Weight {314 (13_946_000 as Weight)170 (36_252_000 as Weight)315 // Standard Error: 4_000171 // Standard Error: 3_000316 .saturating_add((4_367_000 as Weight).saturating_mul(s as Weight))172 .saturating_add((22_662_000 as Weight).saturating_mul(s as Weight))317 .saturating_add(RocksDbWeight::get().reads(1 as Weight))173 .saturating_add(RocksDbWeight::get().reads(4 as Weight))318 .saturating_add(RocksDbWeight::get().writes(1 as Weight))174 .saturating_add(RocksDbWeight::get().writes(4 as Weight))319 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))175 .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))320 }176 }321 // Storage: Scheduler Agenda (r:1 w:1)322 fn on_initialize(s: u32, ) -> Weight {323 (13_151_000 as Weight)324 // Standard Error: 4_000325 .saturating_add((3_455_000 as Weight).saturating_mul(s as Weight))326 .saturating_add(RocksDbWeight::get().reads(1 as Weight))327 .saturating_add(RocksDbWeight::get().writes(1 as Weight))328 }329 // Storage: Scheduler Agenda (r:1 w:1)330 fn schedule(s: u32, ) -> Weight {331 (14_040_000 as Weight)332 // Standard Error: 1_000333 .saturating_add((89_000 as Weight).saturating_mul(s as Weight))334 .saturating_add(RocksDbWeight::get().reads(1 as Weight))335 .saturating_add(RocksDbWeight::get().writes(1 as Weight))336 }337 // Storage: Scheduler Agenda (r:1 w:1)338 // Storage: Scheduler Lookup (r:0 w:1)339 fn cancel(s: u32, ) -> Weight {340 (14_376_000 as Weight)341 // Standard Error: 1_000342 .saturating_add((576_000 as Weight).saturating_mul(s as Weight))343 .saturating_add(RocksDbWeight::get().reads(1 as Weight))344 .saturating_add(RocksDbWeight::get().writes(2 as Weight))345 }346 // Storage: Scheduler Lookup (r:1 w:1)177 // Storage: Scheduler Lookup (r:1 w:1)347 // Storage: Scheduler Agenda (r:1 w:1)178 // Storage: Scheduler Agenda (r:1 w:1)348 fn schedule_named(s: u32, ) -> Weight {179 fn schedule_named(s: u32, ) -> Weight {349 (16_806_000 as Weight)180 (34_561_000 as Weight)350 // Standard Error: 1_000181 // Standard Error: 0351 .saturating_add((102_000 as Weight).saturating_mul(s as Weight))182 .saturating_add((161_000 as Weight).saturating_mul(s as Weight))352 .saturating_add(RocksDbWeight::get().reads(2 as Weight))183 .saturating_add(RocksDbWeight::get().reads(2 as Weight))353 .saturating_add(RocksDbWeight::get().writes(2 as Weight))184 .saturating_add(RocksDbWeight::get().writes(2 as Weight))354 }185 }355 // Storage: Scheduler Lookup (r:1 w:1)186 // Storage: Scheduler Lookup (r:1 w:1)356 // Storage: Scheduler Agenda (r:1 w:1)187 // Storage: Scheduler Agenda (r:1 w:1)357 fn cancel_named(s: u32, ) -> Weight {188 fn cancel_named(s: u32, ) -> Weight {358 (15_852_000 as Weight)189 (30_932_000 as Weight)359 // Standard Error: 2_000190 // Standard Error: 1_000360 .saturating_add((590_000 as Weight).saturating_mul(s as Weight))191 .saturating_add((1_537_000 as Weight).saturating_mul(s as Weight))361 .saturating_add(RocksDbWeight::get().reads(2 as Weight))192 .saturating_add(RocksDbWeight::get().reads(2 as Weight))362 .saturating_add(RocksDbWeight::get().writes(2 as Weight))193 .saturating_add(RocksDbWeight::get().writes(2 as Weight))363 }194 }runtime/common/Cargo.tomldiffbeforeafterboth89default-features = false89default-features = false90path = "../../pallets/refungible"90path = "../../pallets/refungible"9192[dependencies.pallet-unq-scheduler]93default-features = false94path = "../../pallets/scheduler"919592[dependencies.up-data-structs]96[dependencies.up-data-structs]93default-features = false97default-features = falseruntime/common/src/runtime_apis.rsdiffbeforeafterboth774 list_benchmark!(list, extra, pallet_fungible, Fungible);774 list_benchmark!(list, extra, pallet_fungible, Fungible);775 list_benchmark!(list, extra, pallet_refungible, Refungible);775 list_benchmark!(list, extra, pallet_refungible, Refungible);776 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);776 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);777 list_benchmark!(list, extra, pallet_unq_scheduler, Scheduler);777 // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);778 // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);778779779 let storage_info = AllPalletsReversedWithSystemFirst::storage_info();780 let storage_info = AllPalletsReversedWithSystemFirst::storage_info();817 add_benchmark!(params, batches, pallet_fungible, Fungible);818 add_benchmark!(params, batches, pallet_fungible, Fungible);818 add_benchmark!(params, batches, pallet_refungible, Refungible);819 add_benchmark!(params, batches, pallet_refungible, Refungible);819 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);820 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);821 add_benchmark!(params, batches, pallet_unq_scheduler, Scheduler);822820 // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);823 // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);821824runtime/opal/Cargo.tomldiffbeforeafterboth36 'pallet-proxy-rmrk-core/runtime-benchmarks',36 'pallet-proxy-rmrk-core/runtime-benchmarks',37 'pallet-unique/runtime-benchmarks',37 'pallet-unique/runtime-benchmarks',38 'pallet-inflation/runtime-benchmarks',38 'pallet-inflation/runtime-benchmarks',39 'pallet-unq-scheduler/runtime-benchmarks',39 'pallet-xcm/runtime-benchmarks',40 'pallet-xcm/runtime-benchmarks',40 'sp-runtime/runtime-benchmarks',41 'sp-runtime/runtime-benchmarks',41 'xcm-builder/runtime-benchmarks',42 'xcm-builder/runtime-benchmarks',runtime/quartz/Cargo.tomldiffbeforeafterboth36 'pallet-proxy-rmrk-core/runtime-benchmarks',36 'pallet-proxy-rmrk-core/runtime-benchmarks',37 'pallet-unique/runtime-benchmarks',37 'pallet-unique/runtime-benchmarks',38 'pallet-inflation/runtime-benchmarks',38 'pallet-inflation/runtime-benchmarks',39 'pallet-unq-scheduler/runtime-benchmarks',39 'pallet-xcm/runtime-benchmarks',40 'pallet-xcm/runtime-benchmarks',40 'sp-runtime/runtime-benchmarks',41 'sp-runtime/runtime-benchmarks',41 'xcm-builder/runtime-benchmarks',42 'xcm-builder/runtime-benchmarks',runtime/unique/Cargo.tomldiffbeforeafterboth36 'pallet-proxy-rmrk-core/runtime-benchmarks',36 'pallet-proxy-rmrk-core/runtime-benchmarks',37 'pallet-unique/runtime-benchmarks',37 'pallet-unique/runtime-benchmarks',38 'pallet-inflation/runtime-benchmarks',38 'pallet-inflation/runtime-benchmarks',39 'pallet-unq-scheduler/runtime-benchmarks',39 'pallet-xcm/runtime-benchmarks',40 'pallet-xcm/runtime-benchmarks',40 'sp-runtime/runtime-benchmarks',41 'sp-runtime/runtime-benchmarks',41 'xcm-builder/runtime-benchmarks',42 'xcm-builder/runtime-benchmarks',