difftreelog
refactor(weight) bench rename `transfer` to `transfer_raw`
in: master
8 files changed
pallets/fungible/src/benchmarking.rsdiffbeforeafterboth66 <Pallet<T>>::create_item(&collection, &owner, (burner.clone(), 200), &Unlimited)?;66 <Pallet<T>>::create_item(&collection, &owner, (burner.clone(), 200), &Unlimited)?;67 }: {<Pallet<T>>::burn(&collection, &burner, 100)?}67 }: {<Pallet<T>>::burn(&collection, &burner, 100)?}686869 transfer {69 transfer_raw {70 bench_init!{70 bench_init!{71 owner: sub; collection: collection(owner);71 owner: sub; collection: collection(owner);72 owner: cross_from_sub; sender: cross_sub; to: cross_sub;72 owner: cross_from_sub; sender: cross_sub; to: cross_sub;pallets/fungible/src/common.rsdiffbeforeafterboth78 }78 }797980 fn transfer() -> Weight {80 fn transfer() -> Weight {81 <SelfWeightOf<T>>::transfer() + <PalletCommonWeightOf<T>>::check_accesslist() * 281 <SelfWeightOf<T>>::transfer_raw() + <PalletCommonWeightOf<T>>::check_accesslist() * 282 }82 }838384 fn approve() -> Weight {84 fn approve() -> Weight {pallets/fungible/src/lib.rsdiffbeforeafterboth400 <CommonError<T>>::TransferNotAllowed,400 <CommonError<T>>::TransferNotAllowed,401 );401 );402402403 let mut actual_weight = <SelfWeightOf<T>>::transfer();403 let mut actual_weight = <SelfWeightOf<T>>::transfer_raw();404404405 if collection.permissions.access() == AccessMode::AllowList {405 if collection.permissions.access() == AccessMode::AllowList {406 collection.check_allowlist(from)?;406 collection.check_allowlist(from)?;pallets/fungible/src/weights.rsdiffbeforeafterboth37 fn create_item() -> Weight;37 fn create_item() -> Weight;38 fn create_multiple_items_ex(b: u32, ) -> Weight;38 fn create_multiple_items_ex(b: u32, ) -> Weight;39 fn burn_item() -> Weight;39 fn burn_item() -> Weight;40 fn transfer() -> Weight;40 fn transfer_raw() -> Weight;41 fn approve() -> Weight;41 fn approve() -> Weight;42 fn approve_from() -> Weight;42 fn approve_from() -> Weight;43 fn check_allowed_raw() -> Weight;43 fn check_allowed_raw() -> Weight;93 .saturating_add(T::DbWeight::get().reads(2_u64))93 .saturating_add(T::DbWeight::get().reads(2_u64))94 .saturating_add(T::DbWeight::get().writes(2_u64))94 .saturating_add(T::DbWeight::get().writes(2_u64))95 }95 }96 /// Storage: Fungible Balance (r:2 w:2)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 {97 fn transfer_raw() -> 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)98 Weight::from_ref_time(12_041_000 as u64)104 .saturating_add(T::DbWeight::get().reads(2_u64))99 .saturating_add(T::DbWeight::get().reads(2 as u64))105 .saturating_add(T::DbWeight::get().writes(2_u64))100 .saturating_add(T::DbWeight::get().writes(2 as u64))106 }101 }107 /// Storage: Fungible Balance (r:1 w:0)102 /// Storage: Fungible Balance (r:1 w:0)108 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)103 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)205 .saturating_add(RocksDbWeight::get().reads(2_u64))200 .saturating_add(RocksDbWeight::get().reads(2_u64))206 .saturating_add(RocksDbWeight::get().writes(2_u64))201 .saturating_add(RocksDbWeight::get().writes(2_u64))207 }202 }208 /// Storage: Fungible Balance (r:2 w:2)203 // 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 {204 fn transfer_raw() -> 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)205 Weight::from_ref_time(12_041_000 as u64)216 .saturating_add(RocksDbWeight::get().reads(2_u64))206 .saturating_add(RocksDbWeight::get().reads(2 as u64))217 .saturating_add(RocksDbWeight::get().writes(2_u64))207 .saturating_add(RocksDbWeight::get().writes(2 as u64))218 }208 }219 /// Storage: Fungible Balance (r:1 w:0)209 /// Storage: Fungible Balance (r:1 w:0)220 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)210 /// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth121 }121 }122 }: {<Pallet<T>>::burn_recursively(&collection, &burner, item, &Unlimited, &Unlimited)?}122 }: {<Pallet<T>>::burn_recursively(&collection, &burner, item, &Unlimited, &Unlimited)?}123123124 transfer {124 transfer_raw {125 bench_init!{125 bench_init!{126 owner: sub; collection: collection(owner);126 owner: sub; collection: collection(owner);127 owner: cross_from_sub; sender: cross_sub; receiver: cross_sub;127 owner: cross_from_sub; sender: cross_sub; receiver: cross_sub;pallets/nonfungible/src/common.rsdiffbeforeafterboth91 }91 }929293 fn transfer() -> Weight {93 fn transfer() -> Weight {94 <SelfWeightOf<T>>::transfer() + <PalletCommonWeightOf<T>>::check_accesslist() * 294 <SelfWeightOf<T>>::transfer_raw() + <PalletCommonWeightOf<T>>::check_accesslist() * 295 }95 }969697 fn approve() -> Weight {97 fn approve() -> Weight {pallets/nonfungible/src/lib.rsdiffbeforeafterboth809 <CommonError<T>>::TransferNotAllowed809 <CommonError<T>>::TransferNotAllowed810 );810 );811811812 let mut actual_weight = <SelfWeightOf<T>>::transfer();812 let mut actual_weight = <SelfWeightOf<T>>::transfer_raw();813 let token_data =813 let token_data =814 <TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;814 <TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;815 ensure!(&token_data.owner == from, <CommonError<T>>::NoPermission);815 ensure!(&token_data.owner == from, <CommonError<T>>::NoPermission);pallets/nonfungible/src/weights.rsdiffbeforeafterboth40 fn burn_item() -> Weight;40 fn burn_item() -> Weight;41 fn burn_recursively_self_raw() -> Weight;41 fn burn_recursively_self_raw() -> Weight;42 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;42 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;43 fn transfer() -> Weight;43 fn transfer_raw() -> Weight;44 fn approve() -> Weight;44 fn approve() -> Weight;45 fn approve_from() -> Weight;45 fn approve_from() -> Weight;46 fn checks_allowed_raw() -> Weight;46 fn checks_allowed_raw() -> Weight;209 .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(b.into())))209 .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(b.into())))210 .saturating_add(Weight::from_parts(0, 10097).saturating_mul(b.into()))210 .saturating_add(Weight::from_parts(0, 10097).saturating_mul(b.into()))211 }211 }212 /// Storage: Nonfungible TokenData (r:1 w:1)212 // Storage: Nonfungible TokenData (r:1 w:1)213 /// Proof: Nonfungible TokenData (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)213 // Storage: Nonfungible AccountBalance (r:2 w:2)214 /// Storage: Nonfungible AccountBalance (r:2 w:2)214 // Storage: Nonfungible Allowance (r:1 w:0)215 /// Proof: Nonfungible AccountBalance (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen)215 // Storage: Nonfungible Owned (r:0 w:2)216 /// Storage: Nonfungible Allowance (r:1 w:0)217 /// Proof: Nonfungible Allowance (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)218 /// Storage: Nonfungible Owned (r:0 w:2)219 /// Proof: Nonfungible Owned (max_values: None, max_size: Some(74), added: 2549, mode: MaxEncodedLen)220 fn transfer() -> Weight {216 fn transfer_raw() -> Weight {221 // Proof Size summary in bytes:222 // Measured: `412`223 // Estimated: `10144`224 // Minimum execution time: 18_629_000 picoseconds.225 Weight::from_parts(18_997_000, 10144)217 Weight::from_ref_time(14_909_000 as u64)226 .saturating_add(T::DbWeight::get().reads(4_u64))218 .saturating_add(T::DbWeight::get().reads(4 as u64))227 .saturating_add(T::DbWeight::get().writes(5_u64))219 .saturating_add(T::DbWeight::get().writes(5 as u64))228 }220 }229 /// Storage: Nonfungible TokenData (r:1 w:0)221 /// Storage: Nonfungible TokenData (r:1 w:0)230 /// Proof: Nonfungible TokenData (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)222 /// Proof: Nonfungible TokenData (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)523 .saturating_add(RocksDbWeight::get().writes((4_u64).saturating_mul(b.into())))515 .saturating_add(RocksDbWeight::get().writes((4_u64).saturating_mul(b.into())))524 .saturating_add(Weight::from_parts(0, 10097).saturating_mul(b.into()))516 .saturating_add(Weight::from_parts(0, 10097).saturating_mul(b.into()))525 }517 }526 /// Storage: Nonfungible TokenData (r:1 w:1)518 // Storage: Nonfungible TokenData (r:1 w:1)527 /// Proof: Nonfungible TokenData (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)519 // Storage: Nonfungible AccountBalance (r:2 w:2)528 /// Storage: Nonfungible AccountBalance (r:2 w:2)520 // Storage: Nonfungible Allowance (r:1 w:0)529 /// Proof: Nonfungible AccountBalance (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen)521 // Storage: Nonfungible Owned (r:0 w:2)530 /// Storage: Nonfungible Allowance (r:1 w:0)531 /// Proof: Nonfungible Allowance (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)532 /// Storage: Nonfungible Owned (r:0 w:2)533 /// Proof: Nonfungible Owned (max_values: None, max_size: Some(74), added: 2549, mode: MaxEncodedLen)534 fn transfer() -> Weight {522 fn transfer_raw() -> Weight {535 // Proof Size summary in bytes:536 // Measured: `412`537 // Estimated: `10144`538 // Minimum execution time: 18_629_000 picoseconds.539 Weight::from_parts(18_997_000, 10144)523 Weight::from_ref_time(14_909_000 as u64)540 .saturating_add(RocksDbWeight::get().reads(4_u64))524 .saturating_add(RocksDbWeight::get().reads(4 as u64))541 .saturating_add(RocksDbWeight::get().writes(5_u64))525 .saturating_add(RocksDbWeight::get().writes(5 as u64))542 }526 }543 /// Storage: Nonfungible TokenData (r:1 w:0)527 /// Storage: Nonfungible TokenData (r:1 w:0)544 /// Proof: Nonfungible TokenData (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)528 /// Proof: Nonfungible TokenData (max_values: None, max_size: Some(57), added: 2532, mode: MaxEncodedLen)