1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_fungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2023-03-30, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! WORST CASE MAP SIZE: `1000000`8//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024910// Executed Command:11// target/release/unique-collator12// benchmark13// pallet14// --pallet15// pallet-fungible16// --wasm-execution17// compiled18// --extrinsic19// *20// --template=.maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/fungible/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(missing_docs)]30#![allow(clippy::unnecessary_cast)]3132use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};33use sp_std::marker::PhantomData;3435/// Weight functions needed for pallet_fungible.36pub trait WeightInfo {37 fn create_item() -> Weight;38 fn create_multiple_items_ex(b: u32, ) -> Weight;39 fn burn_item() -> Weight;40 fn transfer() -> Weight;41 fn approve() -> Weight;42 fn approve_from() -> Weight;43 fn check_allowed_raw() -> Weight;44 fn set_allowance_unchecked_raw() -> Weight;45 fn burn_from() -> Weight;46}4748/// Weights for pallet_fungible using the Substrate node and recommended hardware.49pub struct SubstrateWeight<T>(PhantomData<T>);50impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {51 /// Storage: Fungible TotalSupply (r:1 w:1)52 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)53 /// Storage: Fungible Balance (r:1 w:1)54 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)55 fn create_item() -> Weight {56 // Proof Size summary in bytes:57 // Measured: `42`58 // Estimated: `5055`59 // Minimum execution time: 10_152_000 picoseconds.60 Weight::from_parts(10_520_000, 5055)61 .saturating_add(T::DbWeight::get().reads(2_u64))62 .saturating_add(T::DbWeight::get().writes(2_u64))63 }64 /// Storage: Fungible TotalSupply (r:1 w:1)65 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)66 /// Storage: Fungible Balance (r:200 w:200)67 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)68 /// The range of component `b` is `[0, 200]`.69 fn create_multiple_items_ex(b: u32, ) -> Weight {70 // Proof Size summary in bytes:71 // Measured: `42`72 // Estimated: `2503 + b * (2552 ±0)`73 // Minimum execution time: 3_437_000 picoseconds.74 Weight::from_parts(13_322_752, 2503)75 // Standard Error: 1_72876 .saturating_add(Weight::from_parts(3_605_522, 0).saturating_mul(b.into()))77 .saturating_add(T::DbWeight::get().reads(1_u64))78 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))79 .saturating_add(T::DbWeight::get().writes(1_u64))80 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into())))81 .saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))82 }83 /// Storage: Fungible TotalSupply (r:1 w:1)84 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)85 /// Storage: Fungible Balance (r:1 w:1)86 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)87 fn burn_item() -> Weight {88 // Proof Size summary in bytes:89 // Measured: `197`90 // Estimated: `5055`91 // Minimum execution time: 12_894_000 picoseconds.92 Weight::from_parts(13_347_000, 5055)93 .saturating_add(T::DbWeight::get().reads(2_u64))94 .saturating_add(T::DbWeight::get().writes(2_u64))95 }96 /// Storage: Fungible Balance (r:2 w:2)97 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)98 fn transfer() -> Weight {99 // Proof Size summary in bytes:100 // Measured: `182`101 // Estimated: `5104`102 // Minimum execution time: 13_832_000 picoseconds.103 Weight::from_parts(14_064_000, 5104)104 .saturating_add(T::DbWeight::get().reads(2_u64))105 .saturating_add(T::DbWeight::get().writes(2_u64))106 }107 /// Storage: Fungible Balance (r:1 w:0)108 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)109 /// Storage: Fungible Allowance (r:0 w:1)110 /// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)111 fn approve() -> Weight {112 // Proof Size summary in bytes:113 // Measured: `182`114 // Estimated: `2552`115 // Minimum execution time: 12_417_000 picoseconds.116 Weight::from_parts(12_658_000, 2552)117 .saturating_add(T::DbWeight::get().reads(1_u64))118 .saturating_add(T::DbWeight::get().writes(1_u64))119 }120 /// Storage: Fungible Balance (r:1 w:0)121 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)122 /// Storage: Fungible Allowance (r:0 w:1)123 /// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)124 fn approve_from() -> Weight {125 // Proof Size summary in bytes:126 // Measured: `170`127 // Estimated: `2552`128 // Minimum execution time: 12_322_000 picoseconds.129 Weight::from_parts(12_629_000, 2552)130 .saturating_add(T::DbWeight::get().reads(1_u64))131 .saturating_add(T::DbWeight::get().writes(1_u64))132 }133 // Storage: Fungible Allowance (r:1 w:0)134 fn check_allowed_raw() -> Weight {135 Weight::from_ref_time(3_550_000 as u64)136 .saturating_add(T::DbWeight::get().reads(1 as u64))137 }138 // Storage: Fungible Allowance (r:1 w:1)139 fn set_allowance_unchecked_raw() -> Weight {140 Weight::from_ref_time(10_682_000 as u64)141 .saturating_add(T::DbWeight::get().reads(1 as u64))142 .saturating_add(T::DbWeight::get().writes(1 as u64))143 }144 /// Storage: Fungible Allowance (r:1 w:1)145 /// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)146 /// Storage: Fungible TotalSupply (r:1 w:1)147 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)148 /// Storage: Fungible Balance (r:1 w:1)149 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)150 fn burn_from() -> Weight {151 // Proof Size summary in bytes:152 // Measured: `315`153 // Estimated: `7623`154 // Minimum execution time: 21_271_000 picoseconds.155 Weight::from_parts(21_709_000, 7623)156 .saturating_add(T::DbWeight::get().reads(3_u64))157 .saturating_add(T::DbWeight::get().writes(3_u64))158 }159}160161// For backwards compatibility and tests162impl WeightInfo for () {163 /// Storage: Fungible TotalSupply (r:1 w:1)164 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)165 /// Storage: Fungible Balance (r:1 w:1)166 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)167 fn create_item() -> Weight {168 // Proof Size summary in bytes:169 // Measured: `42`170 // Estimated: `5055`171 // Minimum execution time: 10_152_000 picoseconds.172 Weight::from_parts(10_520_000, 5055)173 .saturating_add(RocksDbWeight::get().reads(2_u64))174 .saturating_add(RocksDbWeight::get().writes(2_u64))175 }176 /// Storage: Fungible TotalSupply (r:1 w:1)177 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)178 /// Storage: Fungible Balance (r:200 w:200)179 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)180 /// The range of component `b` is `[0, 200]`.181 fn create_multiple_items_ex(b: u32, ) -> Weight {182 // Proof Size summary in bytes:183 // Measured: `42`184 // Estimated: `2503 + b * (2552 ±0)`185 // Minimum execution time: 3_437_000 picoseconds.186 Weight::from_parts(13_322_752, 2503)187 // Standard Error: 1_728188 .saturating_add(Weight::from_parts(3_605_522, 0).saturating_mul(b.into()))189 .saturating_add(RocksDbWeight::get().reads(1_u64))190 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b.into())))191 .saturating_add(RocksDbWeight::get().writes(1_u64))192 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(b.into())))193 .saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))194 }195 /// Storage: Fungible TotalSupply (r:1 w:1)196 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)197 /// Storage: Fungible Balance (r:1 w:1)198 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)199 fn burn_item() -> Weight {200 // Proof Size summary in bytes:201 // Measured: `197`202 // Estimated: `5055`203 // Minimum execution time: 12_894_000 picoseconds.204 Weight::from_parts(13_347_000, 5055)205 .saturating_add(RocksDbWeight::get().reads(2_u64))206 .saturating_add(RocksDbWeight::get().writes(2_u64))207 }208 /// Storage: Fungible Balance (r:2 w:2)209 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)210 fn transfer() -> Weight {211 // Proof Size summary in bytes:212 // Measured: `182`213 // Estimated: `5104`214 // Minimum execution time: 13_832_000 picoseconds.215 Weight::from_parts(14_064_000, 5104)216 .saturating_add(RocksDbWeight::get().reads(2_u64))217 .saturating_add(RocksDbWeight::get().writes(2_u64))218 }219 /// Storage: Fungible Balance (r:1 w:0)220 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)221 /// Storage: Fungible Allowance (r:0 w:1)222 /// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)223 fn approve() -> Weight {224 // Proof Size summary in bytes:225 // Measured: `182`226 // Estimated: `2552`227 // Minimum execution time: 12_417_000 picoseconds.228 Weight::from_parts(12_658_000, 2552)229 .saturating_add(RocksDbWeight::get().reads(1_u64))230 .saturating_add(RocksDbWeight::get().writes(1_u64))231 }232 /// Storage: Fungible Balance (r:1 w:0)233 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)234 /// Storage: Fungible Allowance (r:0 w:1)235 /// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)236 fn approve_from() -> Weight {237 // Proof Size summary in bytes:238 // Measured: `170`239 // Estimated: `2552`240 // Minimum execution time: 12_322_000 picoseconds.241 Weight::from_parts(12_629_000, 2552)242 .saturating_add(RocksDbWeight::get().reads(1_u64))243 .saturating_add(RocksDbWeight::get().writes(1_u64))244 }245 // Storage: Fungible Allowance (r:1 w:0)246 fn check_allowed_raw() -> Weight {247 Weight::from_ref_time(3_550_000 as u64)248 .saturating_add(RocksDbWeight::get().reads(1 as u64))249 }250 // Storage: Fungible Allowance (r:1 w:1)251 fn set_allowance_unchecked_raw() -> Weight {252 Weight::from_ref_time(10_682_000 as u64)253 .saturating_add(RocksDbWeight::get().reads(1 as u64))254 .saturating_add(RocksDbWeight::get().writes(1 as u64))255 }256 /// Storage: Fungible Allowance (r:1 w:1)257 /// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)258 /// Storage: Fungible TotalSupply (r:1 w:1)259 /// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)260 /// Storage: Fungible Balance (r:1 w:1)261 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)262 fn burn_from() -> Weight {263 // Proof Size summary in bytes:264 // Measured: `315`265 // Estimated: `7623`266 // Minimum execution time: 21_271_000 picoseconds.267 Weight::from_parts(21_709_000, 7623)268 .saturating_add(RocksDbWeight::get().reads(3_u64))269 .saturating_add(RocksDbWeight::get().writes(3_u64))270 }271}272difftreelog
source
pallets/fungible/src/weights.rs11.5 KiBsourcehistory