|
| 1 | +// This file is part of Substrate. |
| 2 | + |
| 3 | +// Copyright (C) 2022 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_weights |
| 19 | +//! |
| 20 | +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev |
| 21 | +//! DATE: 2022-11-04, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` |
| 22 | +//! HOSTNAME: ``, CPU: `` |
| 23 | +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 |
| 24 | +
|
| 25 | +// Executed Command: |
| 26 | +// ./target/release/node-template |
| 27 | +// benchmark |
| 28 | +// pallet |
| 29 | +// --chain |
| 30 | +// dev |
| 31 | +// --execution=wasm |
| 32 | +// --wasm-execution=compiled |
| 33 | +// --pallet |
| 34 | +// pallet_weights |
| 35 | +// --extrinsic |
| 36 | +// * |
| 37 | +// --steps |
| 38 | +// 50 |
| 39 | +// --repeat |
| 40 | +// 20 |
| 41 | +// --template=./.maintain/frame-weight-template.hbs |
| 42 | +// --output |
| 43 | +// pallets/weights/src/weights.rs |
| 44 | + |
| 45 | +#![cfg_attr(rustfmt, rustfmt_skip)] |
| 46 | +#![allow(unused_parens)] |
| 47 | +#![allow(unused_imports)] |
| 48 | + |
| 49 | +use frame_benchmarking::sp_std::marker::PhantomData; |
| 50 | +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; |
| 51 | + |
| 52 | +/// Weight functions needed for pallet_weights. |
| 53 | +pub trait WeightInfo { |
| 54 | + fn duplicate_and_store_benchmark(s: u32, ) -> Weight; |
| 55 | + fn store_maybe_hashed_true() -> Weight; |
| 56 | + fn store_maybe_hashed_false() -> Weight; |
| 57 | +} |
| 58 | + |
| 59 | +/// Weights for pallet_weights using the Substrate node and recommended hardware. |
| 60 | +pub struct SubstrateWeight<T>(PhantomData<T>); |
| 61 | +impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { |
| 62 | + // Storage: WeightsModule VecDup (r:0 w:1) |
| 63 | + fn duplicate_and_store_benchmark(s: u32, ) -> Weight { |
| 64 | + (1_466_000 as Weight) |
| 65 | + // Standard Error: 0 |
| 66 | + .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) |
| 67 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 68 | + } |
| 69 | + // Storage: WeightsModule Data (r:0 w:1) |
| 70 | + fn store_maybe_hashed_true() -> Weight { |
| 71 | + (115_844_000 as Weight) |
| 72 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 73 | + } |
| 74 | + // Storage: WeightsModule Data (r:0 w:1) |
| 75 | + fn store_maybe_hashed_false() -> Weight { |
| 76 | + (41_443_000 as Weight) |
| 77 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +// For backwards compatibility and tests |
| 82 | +impl WeightInfo for () { |
| 83 | + // Storage: WeightsModule VecDup (r:0 w:1) |
| 84 | + fn duplicate_and_store_benchmark(s: u32, ) -> Weight { |
| 85 | + (1_466_000 as Weight) |
| 86 | + // Standard Error: 0 |
| 87 | + .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) |
| 88 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 89 | + } |
| 90 | + // Storage: WeightsModule Data (r:0 w:1) |
| 91 | + fn store_maybe_hashed_true() -> Weight { |
| 92 | + (115_844_000 as Weight) |
| 93 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 94 | + } |
| 95 | + // Storage: WeightsModule Data (r:0 w:1) |
| 96 | + fn store_maybe_hashed_false() -> Weight { |
| 97 | + (41_443_000 as Weight) |
| 98 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 99 | + } |
| 100 | +} |
0 commit comments