pallet_example_mbm/migrations/v1/weights.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// 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 at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// 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 and
16// limitations under the License.
17
18//! Autogenerated weights for `pallet_example_mbm`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2024-03-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `Olivers-MBP`, CPU: `<UNKNOWN>`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
25
26// Executed Command:
27// polkadot-omni-bencher
28// v1
29// benchmark
30// pallet
31// --runtime
32// target/release/wbuild/kitchensink-runtime/kitchensink_runtime.compact.compressed.wasm
33// --pallet
34// pallet_example_mbm
35// --extrinsic
36//
37// --template
38// substrate/.maintain/frame-weight-template.hbs
39// --output
40// substrate/frame/examples/multi-block-migrations/src/migrations/weights.rs
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use core::marker::PhantomData;
49
50/// Weight functions needed for `pallet_example_mbm`.
51pub trait WeightInfo {
52 fn step() -> Weight;
53}
54
55/// Weights for `pallet_example_mbm` using the Substrate node and recommended hardware.
56pub struct SubstrateWeight<T>(PhantomData<T>);
57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
58 /// Storage: `PalletExampleMbms::MyMap` (r:2 w:1)
59 /// Proof: `PalletExampleMbms::MyMap` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
60 fn step() -> Weight {
61 // Proof Size summary in bytes:
62 // Measured: `28`
63 // Estimated: `5996`
64 // Minimum execution time: 6_000_000 picoseconds.
65 Weight::from_parts(8_000_000, 5996)
66 .saturating_add(T::DbWeight::get().reads(2_u64))
67 .saturating_add(T::DbWeight::get().writes(1_u64))
68 }
69}
70
71// For backwards compatibility and tests.
72impl WeightInfo for () {
73 /// Storage: `PalletExampleMbms::MyMap` (r:2 w:1)
74 /// Proof: `PalletExampleMbms::MyMap` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
75 fn step() -> Weight {
76 // Proof Size summary in bytes:
77 // Measured: `28`
78 // Estimated: `5996`
79 // Minimum execution time: 6_000_000 picoseconds.
80 Weight::from_parts(8_000_000, 5996)
81 .saturating_add(RocksDbWeight::get().reads(2_u64))
82 .saturating_add(RocksDbWeight::get().writes(1_u64))
83 }
84}