difftreelog
feature: add benchmarks for scheduler v2
in: master
3 files changed
pallets/scheduler-v2/src/benchmarking.rsdiffbeforeafterbothno changes
pallets/scheduler-v2/src/lib.rsdiffbeforeafterboth143 }143 }144 }144 }145146 /// Returns whether the image will require a lookup to be peeked.147 pub fn lookup_needed(&self) -> bool {148 match self {149 Self::Inline(_) => false,150 Self::PreimageLookup { .. } => true,151 }152 }145153146 fn decode(mut data: &[u8]) -> Result<<T as Config>::Call, DispatchError> {154 fn decode(mut data: &[u8]) -> Result<<T as Config>::Call, DispatchError> {147 <T as Config>::Call::decode(&mut data)155 <T as Config>::Call::decode(&mut data)154162155 fn peek(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError>;163 fn peek(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError>;164165 /// Convert the given scheduled `call` value back into its original instance. If successful,166 /// `drop` any data backing it. This will not break the realisability of independently167 /// created instances of `ScheduledCall` which happen to have identical data.168 fn realize(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError>;156}169}157170158impl<T: Config, PP: PreimageRecipient<T::Hash>> SchedulerPreimages<T> for PP {171impl<T: Config, PP: PreimageRecipient<T::Hash>> SchedulerPreimages<T> for PP {176 }189 }177 }190 }191192 fn realize(call: &ScheduledCall<T>) -> Result<(<T as pallet::Config>::Call, Option<u32>), DispatchError> {193 let r = Self::peek(call)?;194 Self::drop(call);195 Ok(r)196 }178}197}179198180pub type TaskName = [u8; 32];199pub type TaskName = [u8; 32];runtime/opal/Cargo.tomldiffbeforeafterboth42 'pallet-inflation/runtime-benchmarks',42 'pallet-inflation/runtime-benchmarks',43 'pallet-app-promotion/runtime-benchmarks',43 'pallet-app-promotion/runtime-benchmarks',44 'pallet-unique-scheduler/runtime-benchmarks',44 'pallet-unique-scheduler/runtime-benchmarks',45 'pallet-unique-scheduler-v2/runtime-benchmarks',45 'pallet-xcm/runtime-benchmarks',46 'pallet-xcm/runtime-benchmarks',46 'sp-runtime/runtime-benchmarks',47 'sp-runtime/runtime-benchmarks',47 'xcm-builder/runtime-benchmarks',48 'xcm-builder/runtime-benchmarks',