|
| 1 | +// This file is part of Substrate. |
| 2 | + |
| 3 | +// Copyright (C) 2020 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 | +//! Weights for pallet_indices |
| 19 | +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 |
| 20 | +//! DATE: 2020-10-27, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] |
| 21 | +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 |
| 22 | +
|
| 23 | +// Executed Command: |
| 24 | +// target/release/substrate |
| 25 | +// benchmark |
| 26 | +// --chain=dev |
| 27 | +// --steps=50 |
| 28 | +// --repeat=20 |
| 29 | +// --pallet=pallet_indices |
| 30 | +// --extrinsic=* |
| 31 | +// --execution=wasm |
| 32 | +// --wasm-execution=compiled |
| 33 | +// --heap-pages=4096 |
| 34 | +// --output=./frame/indices/src/weights.rs |
| 35 | +// --template=./.maintain/frame-weight-template.hbs |
| 36 | + |
| 37 | + |
| 38 | +#![allow(unused_parens)] |
| 39 | +#![allow(unused_imports)] |
| 40 | + |
| 41 | +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; |
| 42 | +use sp_std::marker::PhantomData; |
| 43 | + |
| 44 | +/// Weight functions needed for pallet_indices. |
| 45 | +pub trait WeightInfo { |
| 46 | + fn claim() -> Weight; |
| 47 | + fn transfer() -> Weight; |
| 48 | + fn free() -> Weight; |
| 49 | + fn force_transfer() -> Weight; |
| 50 | + fn freeze() -> Weight; |
| 51 | + |
| 52 | +} |
| 53 | + |
| 54 | +/// Weights for pallet_indices using the Substrate node and recommended hardware. |
| 55 | +pub struct SubstrateWeight<T>(PhantomData<T>); |
| 56 | +impl<T: frame_system::Trait> WeightInfo for SubstrateWeight<T> { |
| 57 | + fn claim() -> Weight { |
| 58 | + (53_799_000 as Weight) |
| 59 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 60 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 61 | + |
| 62 | + } |
| 63 | + fn transfer() -> Weight { |
| 64 | + (60_294_000 as Weight) |
| 65 | + .saturating_add(T::DbWeight::get().reads(2 as Weight)) |
| 66 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 67 | + |
| 68 | + } |
| 69 | + fn free() -> Weight { |
| 70 | + (48_625_000 as Weight) |
| 71 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 72 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 73 | + |
| 74 | + } |
| 75 | + fn force_transfer() -> Weight { |
| 76 | + (49_762_000 as Weight) |
| 77 | + .saturating_add(T::DbWeight::get().reads(2 as Weight)) |
| 78 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 79 | + |
| 80 | + } |
| 81 | + fn freeze() -> Weight { |
| 82 | + (44_869_000 as Weight) |
| 83 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 84 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 85 | + |
| 86 | + } |
| 87 | + |
| 88 | +} |
| 89 | + |
| 90 | +// For backwards compatibility and tests |
| 91 | +impl WeightInfo for () { |
| 92 | + fn claim() -> Weight { |
| 93 | + (53_799_000 as Weight) |
| 94 | + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) |
| 95 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 96 | + |
| 97 | + } |
| 98 | + fn transfer() -> Weight { |
| 99 | + (60_294_000 as Weight) |
| 100 | + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) |
| 101 | + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) |
| 102 | + |
| 103 | + } |
| 104 | + fn free() -> Weight { |
| 105 | + (48_625_000 as Weight) |
| 106 | + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) |
| 107 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 108 | + |
| 109 | + } |
| 110 | + fn force_transfer() -> Weight { |
| 111 | + (49_762_000 as Weight) |
| 112 | + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) |
| 113 | + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) |
| 114 | + |
| 115 | + } |
| 116 | + fn freeze() -> Weight { |
| 117 | + (44_869_000 as Weight) |
| 118 | + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) |
| 119 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 120 | + |
| 121 | + } |
| 122 | + |
| 123 | +} |
0 commit comments