|
| 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_contracts |
| 19 | +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 |
| 20 | +//! DATE: 2020-10-06, STEPS: [50], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] |
| 21 | +
|
| 22 | +#![allow(unused_parens)] |
| 23 | +#![allow(unused_imports)] |
| 24 | + |
| 25 | +use frame_support::{traits::Get, weights::Weight}; |
| 26 | +use sp_std::marker::PhantomData; |
| 27 | + |
| 28 | +pub struct WeightInfo<T>(PhantomData<T>); |
| 29 | +impl<T: frame_system::Trait> pallet_contracts::WeightInfo for WeightInfo<T> { |
| 30 | + fn update_schedule() -> Weight { |
| 31 | + (33_207_000 as Weight) |
| 32 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 33 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 34 | + } |
| 35 | + fn put_code(n: u32, ) -> Weight { |
| 36 | + (0 as Weight) |
| 37 | + .saturating_add((144_833_000 as Weight).saturating_mul(n as Weight)) |
| 38 | + .saturating_add(T::DbWeight::get().reads(1 as Weight)) |
| 39 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 40 | + } |
| 41 | + fn instantiate(n: u32, ) -> Weight { |
| 42 | + (223_974_000 as Weight) |
| 43 | + .saturating_add((1_007_000 as Weight).saturating_mul(n as Weight)) |
| 44 | + .saturating_add(T::DbWeight::get().reads(6 as Weight)) |
| 45 | + .saturating_add(T::DbWeight::get().writes(3 as Weight)) |
| 46 | + } |
| 47 | + fn call() -> Weight { |
| 48 | + (210_638_000 as Weight) |
| 49 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 50 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 51 | + } |
| 52 | + fn claim_surcharge() -> Weight { |
| 53 | + (508_079_000 as Weight) |
| 54 | + .saturating_add(T::DbWeight::get().reads(3 as Weight)) |
| 55 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 56 | + } |
| 57 | + fn seal_caller(r: u32, ) -> Weight { |
| 58 | + (143_336_000 as Weight) |
| 59 | + .saturating_add((397_788_000 as Weight).saturating_mul(r as Weight)) |
| 60 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 61 | + } |
| 62 | + fn seal_address(r: u32, ) -> Weight { |
| 63 | + (147_296_000 as Weight) |
| 64 | + .saturating_add((396_962_000 as Weight).saturating_mul(r as Weight)) |
| 65 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 66 | + } |
| 67 | + fn seal_gas_left(r: u32, ) -> Weight { |
| 68 | + (141_677_000 as Weight) |
| 69 | + .saturating_add((393_308_000 as Weight).saturating_mul(r as Weight)) |
| 70 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 71 | + } |
| 72 | + fn seal_balance(r: u32, ) -> Weight { |
| 73 | + (157_556_000 as Weight) |
| 74 | + .saturating_add((879_861_000 as Weight).saturating_mul(r as Weight)) |
| 75 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 76 | + } |
| 77 | + fn seal_value_transferred(r: u32, ) -> Weight { |
| 78 | + (148_867_000 as Weight) |
| 79 | + .saturating_add((391_678_000 as Weight).saturating_mul(r as Weight)) |
| 80 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 81 | + } |
| 82 | + fn seal_minimum_balance(r: u32, ) -> Weight { |
| 83 | + (147_252_000 as Weight) |
| 84 | + .saturating_add((393_977_000 as Weight).saturating_mul(r as Weight)) |
| 85 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 86 | + } |
| 87 | + fn seal_tombstone_deposit(r: u32, ) -> Weight { |
| 88 | + (144_208_000 as Weight) |
| 89 | + .saturating_add((394_625_000 as Weight).saturating_mul(r as Weight)) |
| 90 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 91 | + } |
| 92 | + fn seal_rent_allowance(r: u32, ) -> Weight { |
| 93 | + (135_320_000 as Weight) |
| 94 | + .saturating_add((925_541_000 as Weight).saturating_mul(r as Weight)) |
| 95 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 96 | + } |
| 97 | + fn seal_block_number(r: u32, ) -> Weight { |
| 98 | + (145_849_000 as Weight) |
| 99 | + .saturating_add((390_065_000 as Weight).saturating_mul(r as Weight)) |
| 100 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 101 | + } |
| 102 | + fn seal_now(r: u32, ) -> Weight { |
| 103 | + (146_363_000 as Weight) |
| 104 | + .saturating_add((391_772_000 as Weight).saturating_mul(r as Weight)) |
| 105 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 106 | + } |
| 107 | + fn seal_weight_to_fee(r: u32, ) -> Weight { |
| 108 | + (129_872_000 as Weight) |
| 109 | + .saturating_add((670_744_000 as Weight).saturating_mul(r as Weight)) |
| 110 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 111 | + } |
| 112 | + fn seal_gas(r: u32, ) -> Weight { |
| 113 | + (130_985_000 as Weight) |
| 114 | + .saturating_add((198_427_000 as Weight).saturating_mul(r as Weight)) |
| 115 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 116 | + } |
| 117 | + fn seal_input(r: u32, ) -> Weight { |
| 118 | + (138_647_000 as Weight) |
| 119 | + .saturating_add((8_363_000 as Weight).saturating_mul(r as Weight)) |
| 120 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 121 | + } |
| 122 | + fn seal_input_per_kb(n: u32, ) -> Weight { |
| 123 | + (149_418_000 as Weight) |
| 124 | + .saturating_add((272_000 as Weight).saturating_mul(n as Weight)) |
| 125 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 126 | + } |
| 127 | + fn seal_return(r: u32, ) -> Weight { |
| 128 | + (129_116_000 as Weight) |
| 129 | + .saturating_add((5_745_000 as Weight).saturating_mul(r as Weight)) |
| 130 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 131 | + } |
| 132 | + fn seal_return_per_kb(n: u32, ) -> Weight { |
| 133 | + (139_601_000 as Weight) |
| 134 | + .saturating_add((680_000 as Weight).saturating_mul(n as Weight)) |
| 135 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 136 | + } |
| 137 | + fn seal_terminate(r: u32, ) -> Weight { |
| 138 | + (138_548_000 as Weight) |
| 139 | + .saturating_add((355_473_000 as Weight).saturating_mul(r as Weight)) |
| 140 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 141 | + .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(r as Weight))) |
| 142 | + .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(r as Weight))) |
| 143 | + } |
| 144 | + fn seal_restore_to(r: u32, ) -> Weight { |
| 145 | + (239_880_000 as Weight) |
| 146 | + .saturating_add((138_305_000 as Weight).saturating_mul(r as Weight)) |
| 147 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 148 | + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(r as Weight))) |
| 149 | + .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(r as Weight))) |
| 150 | + } |
| 151 | + fn seal_restore_to_per_delta(d: u32, ) -> Weight { |
| 152 | + (40_572_000 as Weight) |
| 153 | + .saturating_add((3_748_632_000 as Weight).saturating_mul(d as Weight)) |
| 154 | + .saturating_add(T::DbWeight::get().reads(7 as Weight)) |
| 155 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(d as Weight))) |
| 156 | + .saturating_add(T::DbWeight::get().writes(5 as Weight)) |
| 157 | + .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(d as Weight))) |
| 158 | + } |
| 159 | + fn seal_random(r: u32, ) -> Weight { |
| 160 | + (148_156_000 as Weight) |
| 161 | + .saturating_add((1_036_452_000 as Weight).saturating_mul(r as Weight)) |
| 162 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 163 | + } |
| 164 | + fn seal_deposit_event(r: u32, ) -> Weight { |
| 165 | + (176_039_000 as Weight) |
| 166 | + .saturating_add((1_497_705_000 as Weight).saturating_mul(r as Weight)) |
| 167 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 168 | + } |
| 169 | + fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { |
| 170 | + (1_923_547_000 as Weight) |
| 171 | + .saturating_add((783_354_000 as Weight).saturating_mul(t as Weight)) |
| 172 | + .saturating_add((240_600_000 as Weight).saturating_mul(n as Weight)) |
| 173 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 174 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(t as Weight))) |
| 175 | + .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(t as Weight))) |
| 176 | + } |
| 177 | + fn seal_set_rent_allowance(r: u32, ) -> Weight { |
| 178 | + (151_095_000 as Weight) |
| 179 | + .saturating_add((1_104_696_000 as Weight).saturating_mul(r as Weight)) |
| 180 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 181 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 182 | + } |
| 183 | + fn seal_set_storage(r: u32, ) -> Weight { |
| 184 | + (0 as Weight) |
| 185 | + .saturating_add((14_975_467_000 as Weight).saturating_mul(r as Weight)) |
| 186 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 187 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) |
| 188 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 189 | + .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) |
| 190 | + } |
| 191 | + fn seal_set_storage_per_kb(n: u32, ) -> Weight { |
| 192 | + (2_465_724_000 as Weight) |
| 193 | + .saturating_add((203_125_000 as Weight).saturating_mul(n as Weight)) |
| 194 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 195 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 196 | + } |
| 197 | + fn seal_clear_storage(r: u32, ) -> Weight { |
| 198 | + (0 as Weight) |
| 199 | + .saturating_add((5_254_595_000 as Weight).saturating_mul(r as Weight)) |
| 200 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 201 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) |
| 202 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 203 | + .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) |
| 204 | + } |
| 205 | + fn seal_get_storage(r: u32, ) -> Weight { |
| 206 | + (60_303_000 as Weight) |
| 207 | + .saturating_add((1_135_486_000 as Weight).saturating_mul(r as Weight)) |
| 208 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 209 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) |
| 210 | + } |
| 211 | + fn seal_get_storage_per_kb(n: u32, ) -> Weight { |
| 212 | + (931_900_000 as Weight) |
| 213 | + .saturating_add((144_572_000 as Weight).saturating_mul(n as Weight)) |
| 214 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 215 | + } |
| 216 | + fn seal_transfer(r: u32, ) -> Weight { |
| 217 | + (50_722_000 as Weight) |
| 218 | + .saturating_add((6_701_164_000 as Weight).saturating_mul(r as Weight)) |
| 219 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 220 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) |
| 221 | + .saturating_add(T::DbWeight::get().writes(1 as Weight)) |
| 222 | + .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) |
| 223 | + } |
| 224 | + fn seal_call(r: u32, ) -> Weight { |
| 225 | + (0 as Weight) |
| 226 | + .saturating_add((10_589_747_000 as Weight).saturating_mul(r as Weight)) |
| 227 | + .saturating_add(T::DbWeight::get().reads(5 as Weight)) |
| 228 | + .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) |
| 229 | + } |
| 230 | + fn seal_call_per_transfer_input_output_kb(t: u32, i: u32, o: u32, ) -> Weight { |
| 231 | + (11_223_388_000 as Weight) |
| 232 | + .saturating_add((4_965_182_000 as Weight).saturating_mul(t as Weight)) |
| 233 | + .saturating_add((50_603_000 as Weight).saturating_mul(i as Weight)) |
| 234 | + .saturating_add((72_972_000 as Weight).saturating_mul(o as Weight)) |
| 235 | + .saturating_add(T::DbWeight::get().reads(105 as Weight)) |
| 236 | + .saturating_add(T::DbWeight::get().reads((101 as Weight).saturating_mul(t as Weight))) |
| 237 | + .saturating_add(T::DbWeight::get().writes((101 as Weight).saturating_mul(t as Weight))) |
| 238 | + } |
| 239 | + fn seal_instantiate(r: u32, ) -> Weight { |
| 240 | + (0 as Weight) |
| 241 | + .saturating_add((22_933_938_000 as Weight).saturating_mul(r as Weight)) |
| 242 | + .saturating_add(T::DbWeight::get().reads(6 as Weight)) |
| 243 | + .saturating_add(T::DbWeight::get().reads((300 as Weight).saturating_mul(r as Weight))) |
| 244 | + .saturating_add(T::DbWeight::get().writes(2 as Weight)) |
| 245 | + .saturating_add(T::DbWeight::get().writes((200 as Weight).saturating_mul(r as Weight))) |
| 246 | + } |
| 247 | + fn seal_instantiate_per_input_output_kb(i: u32, o: u32, ) -> Weight { |
| 248 | + (20_986_307_000 as Weight) |
| 249 | + .saturating_add((152_611_000 as Weight).saturating_mul(i as Weight)) |
| 250 | + .saturating_add((73_457_000 as Weight).saturating_mul(o as Weight)) |
| 251 | + .saturating_add(T::DbWeight::get().reads(207 as Weight)) |
| 252 | + .saturating_add(T::DbWeight::get().writes(202 as Weight)) |
| 253 | + } |
| 254 | + fn seal_hash_sha2_256(r: u32, ) -> Weight { |
| 255 | + (145_988_000 as Weight) |
| 256 | + .saturating_add((343_540_000 as Weight).saturating_mul(r as Weight)) |
| 257 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 258 | + } |
| 259 | + fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { |
| 260 | + (719_758_000 as Weight) |
| 261 | + .saturating_add((420_306_000 as Weight).saturating_mul(n as Weight)) |
| 262 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 263 | + } |
| 264 | + fn seal_hash_keccak_256(r: u32, ) -> Weight { |
| 265 | + (116_261_000 as Weight) |
| 266 | + .saturating_add((360_601_000 as Weight).saturating_mul(r as Weight)) |
| 267 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 268 | + } |
| 269 | + fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { |
| 270 | + (583_726_000 as Weight) |
| 271 | + .saturating_add((333_091_000 as Weight).saturating_mul(n as Weight)) |
| 272 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 273 | + } |
| 274 | + fn seal_hash_blake2_256(r: u32, ) -> Weight { |
| 275 | + (144_609_000 as Weight) |
| 276 | + .saturating_add((332_388_000 as Weight).saturating_mul(r as Weight)) |
| 277 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 278 | + } |
| 279 | + fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { |
| 280 | + (612_987_000 as Weight) |
| 281 | + .saturating_add((150_030_000 as Weight).saturating_mul(n as Weight)) |
| 282 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 283 | + } |
| 284 | + fn seal_hash_blake2_128(r: u32, ) -> Weight { |
| 285 | + (142_085_000 as Weight) |
| 286 | + .saturating_add((329_426_000 as Weight).saturating_mul(r as Weight)) |
| 287 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 288 | + } |
| 289 | + fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { |
| 290 | + (632_517_000 as Weight) |
| 291 | + .saturating_add((149_974_000 as Weight).saturating_mul(n as Weight)) |
| 292 | + .saturating_add(T::DbWeight::get().reads(4 as Weight)) |
| 293 | + } |
| 294 | +} |
0 commit comments