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 29.0.06//! DATE: 2023-11-29, STEPS: `50`, REPEAT: `80`, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! WORST CASE MAP SIZE: `1000000`8//! HOSTNAME: `bench-host`, CPU: `Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz`9//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 10241011// Executed Command:12// ./target/production/unique-collator13// benchmark14// pallet15// --pallet16// pallet-fungible17// --wasm-execution18// compiled19// --extrinsic20// *21// --template=.maintain/frame-weight-template.hbs22// --steps=5023// --repeat=8024// --heap-pages=409625// --output=./pallets/fungible/src/weights.rs2627#![cfg_attr(rustfmt, rustfmt_skip)]28#![allow(unused_parens)]29#![allow(unused_imports)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_fungible.35pub trait WeightInfo {36 fn create_item() -> Weight;37 fn create_multiple_items_ex(b: u32, ) -> Weight;38 fn burn_item() -> Weight;39 fn transfer_raw() -> Weight;40 fn approve() -> Weight;41 fn approve_from() -> Weight;42 fn check_allowed_raw() -> Weight;43 fn set_allowance_unchecked_raw() -> Weight;44 fn burn_from() -> Weight;45}4647/// Weights for pallet_fungible using the Substrate node and recommended hardware.48pub struct SubstrateWeight<T>(PhantomData<T>);49impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {50 /// Storage: `Fungible::TotalSupply` (r:1 w:1)51 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)52 /// Storage: `Fungible::Balance` (r:1 w:1)53 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)54 fn create_item() -> Weight {55 // Proof Size summary in bytes:56 // Measured: `42`57 // Estimated: `3542`58 // Minimum execution time: 14_718_000 picoseconds.59 Weight::from_parts(15_060_000, 3542)60 .saturating_add(T::DbWeight::get().reads(2_u64))61 .saturating_add(T::DbWeight::get().writes(2_u64))62 }63 /// Storage: `Fungible::TotalSupply` (r:1 w:1)64 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)65 /// Storage: `Fungible::Balance` (r:120 w:120)66 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)67 /// The range of component `b` is `[0, 120]`.68 fn create_multiple_items_ex(b: u32, ) -> Weight {69 // Proof Size summary in bytes:70 // Measured: `42`71 // Estimated: `3493 + b * (2552 ±0)`72 // Minimum execution time: 4_394_000 picoseconds.73 Weight::from_parts(9_904_314, 3493)74 // Standard Error: 1_59875 .saturating_add(Weight::from_parts(6_616_725, 0).saturating_mul(b.into()))76 .saturating_add(T::DbWeight::get().reads(1_u64))77 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))78 .saturating_add(T::DbWeight::get().writes(1_u64))79 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into())))80 .saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))81 }82 /// Storage: `Fungible::TotalSupply` (r:1 w:1)83 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)84 /// Storage: `Fungible::Balance` (r:1 w:1)85 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)86 fn burn_item() -> Weight {87 // Proof Size summary in bytes:88 // Measured: `197`89 // Estimated: `3542`90 // Minimum execution time: 16_034_000 picoseconds.91 Weight::from_parts(16_450_000, 3542)92 .saturating_add(T::DbWeight::get().reads(2_u64))93 .saturating_add(T::DbWeight::get().writes(2_u64))94 }95 /// Storage: `Fungible::Balance` (r:2 w:2)96 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)97 fn transfer_raw() -> Weight {98 // Proof Size summary in bytes:99 // Measured: `182`100 // Estimated: `6094`101 // Minimum execution time: 18_434_000 picoseconds.102 Weight::from_parts(18_815_000, 6094)103 .saturating_add(T::DbWeight::get().reads(2_u64))104 .saturating_add(T::DbWeight::get().writes(2_u64))105 }106 /// Storage: `Fungible::Balance` (r:1 w:0)107 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)108 /// Storage: `Fungible::Allowance` (r:0 w:1)109 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)110 fn approve() -> Weight {111 // Proof Size summary in bytes:112 // Measured: `182`113 // Estimated: `3542`114 // Minimum execution time: 14_722_000 picoseconds.115 Weight::from_parts(15_009_000, 3542)116 .saturating_add(T::DbWeight::get().reads(1_u64))117 .saturating_add(T::DbWeight::get().writes(1_u64))118 }119 /// Storage: `Fungible::Balance` (r:1 w:0)120 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)121 /// Storage: `Fungible::Allowance` (r:0 w:1)122 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)123 fn approve_from() -> Weight {124 // Proof Size summary in bytes:125 // Measured: `170`126 // Estimated: `3542`127 // Minimum execution time: 14_981_000 picoseconds.128 Weight::from_parts(15_376_000, 3542)129 .saturating_add(T::DbWeight::get().reads(1_u64))130 .saturating_add(T::DbWeight::get().writes(1_u64))131 }132 /// Storage: `Fungible::Allowance` (r:1 w:0)133 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)134 fn check_allowed_raw() -> Weight {135 // Proof Size summary in bytes:136 // Measured: `210`137 // Estimated: `3558`138 // Minimum execution time: 6_799_000 picoseconds.139 Weight::from_parts(7_061_000, 3558)140 .saturating_add(T::DbWeight::get().reads(1_u64))141 }142 /// Storage: `Fungible::Allowance` (r:0 w:1)143 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)144 fn set_allowance_unchecked_raw() -> Weight {145 // Proof Size summary in bytes:146 // Measured: `0`147 // Estimated: `0`148 // Minimum execution time: 8_495_000 picoseconds.149 Weight::from_parts(8_790_000, 0)150 .saturating_add(T::DbWeight::get().writes(1_u64))151 }152 /// Storage: `Fungible::Allowance` (r:1 w:1)153 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)154 /// Storage: `Fungible::TotalSupply` (r:1 w:1)155 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)156 /// Storage: `Fungible::Balance` (r:1 w:1)157 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)158 fn burn_from() -> Weight {159 // Proof Size summary in bytes:160 // Measured: `315`161 // Estimated: `3558`162 // Minimum execution time: 27_302_000 picoseconds.163 Weight::from_parts(27_833_000, 3558)164 .saturating_add(T::DbWeight::get().reads(3_u64))165 .saturating_add(T::DbWeight::get().writes(3_u64))166 }167}168169// For backwards compatibility and tests170impl WeightInfo for () {171 /// Storage: `Fungible::TotalSupply` (r:1 w:1)172 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)173 /// Storage: `Fungible::Balance` (r:1 w:1)174 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)175 fn create_item() -> Weight {176 // Proof Size summary in bytes:177 // Measured: `42`178 // Estimated: `3542`179 // Minimum execution time: 14_718_000 picoseconds.180 Weight::from_parts(15_060_000, 3542)181 .saturating_add(RocksDbWeight::get().reads(2_u64))182 .saturating_add(RocksDbWeight::get().writes(2_u64))183 }184 /// Storage: `Fungible::TotalSupply` (r:1 w:1)185 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)186 /// Storage: `Fungible::Balance` (r:120 w:120)187 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)188 /// The range of component `b` is `[0, 120]`.189 fn create_multiple_items_ex(b: u32, ) -> Weight {190 // Proof Size summary in bytes:191 // Measured: `42`192 // Estimated: `3493 + b * (2552 ±0)`193 // Minimum execution time: 4_394_000 picoseconds.194 Weight::from_parts(9_904_314, 3493)195 // Standard Error: 1_598196 .saturating_add(Weight::from_parts(6_616_725, 0).saturating_mul(b.into()))197 .saturating_add(RocksDbWeight::get().reads(1_u64))198 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b.into())))199 .saturating_add(RocksDbWeight::get().writes(1_u64))200 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(b.into())))201 .saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))202 }203 /// Storage: `Fungible::TotalSupply` (r:1 w:1)204 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)205 /// Storage: `Fungible::Balance` (r:1 w:1)206 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)207 fn burn_item() -> Weight {208 // Proof Size summary in bytes:209 // Measured: `197`210 // Estimated: `3542`211 // Minimum execution time: 16_034_000 picoseconds.212 Weight::from_parts(16_450_000, 3542)213 .saturating_add(RocksDbWeight::get().reads(2_u64))214 .saturating_add(RocksDbWeight::get().writes(2_u64))215 }216 /// Storage: `Fungible::Balance` (r:2 w:2)217 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)218 fn transfer_raw() -> Weight {219 // Proof Size summary in bytes:220 // Measured: `182`221 // Estimated: `6094`222 // Minimum execution time: 18_434_000 picoseconds.223 Weight::from_parts(18_815_000, 6094)224 .saturating_add(RocksDbWeight::get().reads(2_u64))225 .saturating_add(RocksDbWeight::get().writes(2_u64))226 }227 /// Storage: `Fungible::Balance` (r:1 w:0)228 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)229 /// Storage: `Fungible::Allowance` (r:0 w:1)230 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)231 fn approve() -> Weight {232 // Proof Size summary in bytes:233 // Measured: `182`234 // Estimated: `3542`235 // Minimum execution time: 14_722_000 picoseconds.236 Weight::from_parts(15_009_000, 3542)237 .saturating_add(RocksDbWeight::get().reads(1_u64))238 .saturating_add(RocksDbWeight::get().writes(1_u64))239 }240 /// Storage: `Fungible::Balance` (r:1 w:0)241 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)242 /// Storage: `Fungible::Allowance` (r:0 w:1)243 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)244 fn approve_from() -> Weight {245 // Proof Size summary in bytes:246 // Measured: `170`247 // Estimated: `3542`248 // Minimum execution time: 14_981_000 picoseconds.249 Weight::from_parts(15_376_000, 3542)250 .saturating_add(RocksDbWeight::get().reads(1_u64))251 .saturating_add(RocksDbWeight::get().writes(1_u64))252 }253 /// Storage: `Fungible::Allowance` (r:1 w:0)254 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)255 fn check_allowed_raw() -> Weight {256 // Proof Size summary in bytes:257 // Measured: `210`258 // Estimated: `3558`259 // Minimum execution time: 6_799_000 picoseconds.260 Weight::from_parts(7_061_000, 3558)261 .saturating_add(RocksDbWeight::get().reads(1_u64))262 }263 /// Storage: `Fungible::Allowance` (r:0 w:1)264 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)265 fn set_allowance_unchecked_raw() -> Weight {266 // Proof Size summary in bytes:267 // Measured: `0`268 // Estimated: `0`269 // Minimum execution time: 8_495_000 picoseconds.270 Weight::from_parts(8_790_000, 0)271 .saturating_add(RocksDbWeight::get().writes(1_u64))272 }273 /// Storage: `Fungible::Allowance` (r:1 w:1)274 /// Proof: `Fungible::Allowance` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)275 /// Storage: `Fungible::TotalSupply` (r:1 w:1)276 /// Proof: `Fungible::TotalSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)277 /// Storage: `Fungible::Balance` (r:1 w:1)278 /// Proof: `Fungible::Balance` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)279 fn burn_from() -> Weight {280 // Proof Size summary in bytes:281 // Measured: `315`282 // Estimated: `3558`283 // Minimum execution time: 27_302_000 picoseconds.284 Weight::from_parts(27_833_000, 3558)285 .saturating_add(RocksDbWeight::get().reads(3_u64))286 .saturating_add(RocksDbWeight::get().writes(3_u64))287 }288}289difftreelog
source
pallets/fungible/src/weights.rs12.7 KiBsourcehistory