|
| 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_multisig |
| 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_multisig |
| 30 | +// --extrinsic=* |
| 31 | +// --execution=wasm |
| 32 | +// --wasm-execution=compiled |
| 33 | +// --heap-pages=4096 |
| 34 | +// --output=./frame/multisig/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_multisig. |
| 45 | +pub trait WeightInfo { |
| 46 | + fn as_multi_threshold_1(z: u32, ) -> Weight; |
| 47 | + fn as_multi_create(s: u32, z: u32, ) -> Weight; |
| 48 | + fn as_multi_create_store(s: u32, z: u32, ) -> Weight; |
| 49 | + fn as_multi_approve(s: u32, z: u32, ) -> Weight; |
| 50 | + fn as_multi_approve_store(s: u32, z: u32, ) -> Weight; |
| 51 | + fn as_multi_complete(s: u32, z: u32, ) -> Weight; |
| 52 | + fn approve_as_multi_create(s: u32, ) -> Weight; |
| 53 | + fn approve_as_multi_approve(s: u32, ) -> Weight; |
| 54 | + fn approve_as_multi_complete(s: u32, ) -> Weight; |
| 55 | + fn cancel_as_multi(s: u32, ) -> Weight; |
| 56 | + |
| 57 | +} |
| 58 | + |
| 59 | +/// Weights for pallet_multisig using the Substrate node and recommended hardware. |
| 60 | +pub struct SubstrateWeight<T>(PhantomData<T>); |
| 61 | +impl<T: frame_system::Trait> WeightInfo for SubstrateWeight<T> { |
| 62 | + fn as_multi_threshold_1(z: u32, ) -> Weight { |
| 63 | + (14_183_000 as Weight) |
| 64 | + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) |
| 65 | + |
| 66 | + } |
| 67 | + fn as_multi_create(s: u32, z: u32, ) -> Weight { |
| 68 | + (72_350_000 as Weight) |
| 69 | + .saturating_add((64_000 as Weight).saturating_mul(s as Weight)) |
| 70 | + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) |
| 71 | + .saturating_add(T::DbWeight::get().reads(2 as Weight)) |
| 72 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 73 | + |
| 74 | + } |
| 75 | + fn as_multi_create_store(s: u32, z: u32, ) -> Weight { |
| 76 | + (83_175_000 as Weight) |
| 77 | + .saturating_add((72_000 as Weight).saturating_mul(s as Weight)) |
| 78 | + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) |
| 79 | + .saturating_add(T::DbWeight::get().reads(3 as Weight)) |
| 80 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 81 | + |
| 82 | + } |
| 83 | + fn as_multi_approve(s: u32, z: u32, ) -> Weight { |
| 84 | + (43_035_000 as Weight) |
| 85 | + .saturating_add((140_000 as Weight).saturating_mul(s as Weight)) |
| 86 | + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) |
| 87 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 88 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 89 | + |
| 90 | + } |
| 91 | + fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { |
| 92 | + (75_190_000 as Weight) |
| 93 | + .saturating_add((127_000 as Weight).saturating_mul(s as Weight)) |
| 94 | + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) |
| 95 | + .saturating_add(T::DbWeight::get().reads(2 as Weight)) |
| 96 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 97 | + |
| 98 | + } |
| 99 | + fn as_multi_complete(s: u32, z: u32, ) -> Weight { |
| 100 | + (92_751_000 as Weight) |
| 101 | + .saturating_add((282_000 as Weight).saturating_mul(s as Weight)) |
| 102 | + .saturating_add((5_000 as Weight).saturating_mul(z as Weight)) |
| 103 | + .saturating_add(T::DbWeight::get().reads(3 as Weight)) |
| 104 | + .saturating_add(T::DbWeight::get().writes(3 as Weight)) |
| 105 | + |
| 106 | + } |
| 107 | + fn approve_as_multi_create(s: u32, ) -> Weight { |
| 108 | + (71_937_000 as Weight) |
| 109 | + .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) |
| 110 | + .saturating_add(T::DbWeight::get().reads(2 as Weight)) |
| 111 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 112 | + |
| 113 | + } |
| 114 | + fn approve_as_multi_approve(s: u32, ) -> Weight { |
| 115 | + (44_294_000 as Weight) |
| 116 | + .saturating_add((89_000 as Weight).saturating_mul(s as Weight)) |
| 117 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 118 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 119 | + |
| 120 | + } |
| 121 | + fn approve_as_multi_complete(s: u32, ) -> Weight { |
| 122 | + (163_098_000 as Weight) |
| 123 | + .saturating_add((276_000 as Weight).saturating_mul(s as Weight)) |
| 124 | + .saturating_add(T::DbWeight::get().reads(3 as Weight)) |
| 125 | + .saturating_add(T::DbWeight::get().writes(3 as Weight)) |
| 126 | + |
| 127 | + } |
| 128 | + fn cancel_as_multi(s: u32, ) -> Weight { |
| 129 | + (115_731_000 as Weight) |
| 130 | + .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) |
| 131 | + .saturating_add(T::DbWeight::get().reads(2 as Weight)) |
| 132 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 133 | + |
| 134 | + } |
| 135 | + |
| 136 | +} |
| 137 | + |
| 138 | +// For backwards compatibility and tests |
| 139 | +impl WeightInfo for () { |
| 140 | + fn as_multi_threshold_1(z: u32, ) -> Weight { |
| 141 | + (14_183_000 as Weight) |
| 142 | + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) |
| 143 | + |
| 144 | + } |
| 145 | + fn as_multi_create(s: u32, z: u32, ) -> Weight { |
| 146 | + (72_350_000 as Weight) |
| 147 | + .saturating_add((64_000 as Weight).saturating_mul(s as Weight)) |
| 148 | + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) |
| 149 | + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) |
| 150 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 151 | + |
| 152 | + } |
| 153 | + fn as_multi_create_store(s: u32, z: u32, ) -> Weight { |
| 154 | + (83_175_000 as Weight) |
| 155 | + .saturating_add((72_000 as Weight).saturating_mul(s as Weight)) |
| 156 | + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) |
| 157 | + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) |
| 158 | + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) |
| 159 | + |
| 160 | + } |
| 161 | + fn as_multi_approve(s: u32, z: u32, ) -> Weight { |
| 162 | + (43_035_000 as Weight) |
| 163 | + .saturating_add((140_000 as Weight).saturating_mul(s as Weight)) |
| 164 | + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) |
| 165 | + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) |
| 166 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 167 | + |
| 168 | + } |
| 169 | + fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { |
| 170 | + (75_190_000 as Weight) |
| 171 | + .saturating_add((127_000 as Weight).saturating_mul(s as Weight)) |
| 172 | + .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) |
| 173 | + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) |
| 174 | + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) |
| 175 | + |
| 176 | + } |
| 177 | + fn as_multi_complete(s: u32, z: u32, ) -> Weight { |
| 178 | + (92_751_000 as Weight) |
| 179 | + .saturating_add((282_000 as Weight).saturating_mul(s as Weight)) |
| 180 | + .saturating_add((5_000 as Weight).saturating_mul(z as Weight)) |
| 181 | + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) |
| 182 | + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) |
| 183 | + |
| 184 | + } |
| 185 | + fn approve_as_multi_create(s: u32, ) -> Weight { |
| 186 | + (71_937_000 as Weight) |
| 187 | + .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) |
| 188 | + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) |
| 189 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 190 | + |
| 191 | + } |
| 192 | + fn approve_as_multi_approve(s: u32, ) -> Weight { |
| 193 | + (44_294_000 as Weight) |
| 194 | + .saturating_add((89_000 as Weight).saturating_mul(s as Weight)) |
| 195 | + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) |
| 196 | + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) |
| 197 | + |
| 198 | + } |
| 199 | + fn approve_as_multi_complete(s: u32, ) -> Weight { |
| 200 | + (163_098_000 as Weight) |
| 201 | + .saturating_add((276_000 as Weight).saturating_mul(s as Weight)) |
| 202 | + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) |
| 203 | + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) |
| 204 | + |
| 205 | + } |
| 206 | + fn cancel_as_multi(s: u32, ) -> Weight { |
| 207 | + (115_731_000 as Weight) |
| 208 | + .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) |
| 209 | + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) |
| 210 | + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) |
| 211 | + |
| 212 | + } |
| 213 | + |
| 214 | +} |
0 commit comments