difftreelog
fix benchmark compile
in: master
3 files changed
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -183,7 +183,7 @@
value: property_value(),
}).collect::<Vec<_>>();
let item = create_max_item(&collection, &owner, owner.clone())?;
- }: {<Pallet<T>>::set_token_properties(&collection, &owner, item, props, false, &Unlimited)?}
+ }: {<Pallet<T>>::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?}
delete_token_properties {
let b in 0..MAX_PROPERTIES_PER_ITEM;
@@ -205,7 +205,7 @@
value: property_value(),
}).collect::<Vec<_>>();
let item = create_max_item(&collection, &owner, owner.clone())?;
- <Pallet<T>>::set_token_properties(&collection, &owner, item, props, false, &Unlimited)?;
+ <Pallet<T>>::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?;
let to_delete = (0..b).map(|k| property_key(k as usize)).collect::<Vec<_>>();
- }: {<Pallet<T>>::delete_token_properties(&collection, &owner, item, to_delete, &Unlimited)?}
+ }: {<Pallet<T>>::delete_token_properties(&collection, &owner, item, to_delete.into_iter(), &Unlimited)?}
}
pallets/nonfungible/src/weights.rsdiffbeforeafterboth1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_nonfungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-06-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-nonfungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/nonfungible/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_nonfungible.35pub trait WeightInfo {36 fn create_item() -> Weight;37 fn create_multiple_items(b: u32, ) -> Weight;38 fn create_multiple_items_ex(b: u32, ) -> Weight;39 fn burn_item() -> Weight;40 fn burn_recursively_self_raw() -> Weight;41 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;42 fn transfer() -> Weight;43 fn approve() -> Weight;44 fn transfer_from() -> Weight;45 fn burn_from() -> Weight;46 fn set_token_property_permissions(b: u32, ) -> Weight;47 fn set_token_properties(b: u32, ) -> Weight;48 fn delete_token_properties(b: u32, ) -> Weight;49}5051/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.52pub struct SubstrateWeight<T>(PhantomData<T>);53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {54 // Storage: Nonfungible TokensMinted (r:1 w:1)55 // Storage: Nonfungible AccountBalance (r:1 w:1)56 // Storage: Nonfungible TokenData (r:0 w:1)57 // Storage: Nonfungible Owned (r:0 w:1)58 fn create_item() -> Weight {59 (24_135_000 as Weight)60 .saturating_add(T::DbWeight::get().reads(2 as Weight))61 .saturating_add(T::DbWeight::get().writes(4 as Weight))62 }63 // Storage: Nonfungible TokensMinted (r:1 w:1)64 // Storage: Nonfungible AccountBalance (r:1 w:1)65 // Storage: Nonfungible TokenData (r:0 w:4)66 // Storage: Nonfungible Owned (r:0 w:4)67 fn create_multiple_items(b: u32, ) -> Weight {68 (21_952_000 as Weight)69 // Standard Error: 5_00070 .saturating_add((4_727_000 as Weight).saturating_mul(b as Weight))71 .saturating_add(T::DbWeight::get().reads(2 as Weight))72 .saturating_add(T::DbWeight::get().writes(2 as Weight))73 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))74 }75 // Storage: Nonfungible TokensMinted (r:1 w:1)76 // Storage: Nonfungible AccountBalance (r:4 w:4)77 // Storage: Nonfungible TokenData (r:0 w:4)78 // Storage: Nonfungible Owned (r:0 w:4)79 fn create_multiple_items_ex(b: u32, ) -> Weight {80 (10_432_000 as Weight)81 // Standard Error: 6_00082 .saturating_add((7_383_000 as Weight).saturating_mul(b as Weight))83 .saturating_add(T::DbWeight::get().reads(1 as Weight))84 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))85 .saturating_add(T::DbWeight::get().writes(1 as Weight))86 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))87 }88 // Storage: Nonfungible TokenData (r:1 w:1)89 // Storage: Nonfungible TokenChildren (r:1 w:0)90 // Storage: Nonfungible TokensBurnt (r:1 w:1)91 // Storage: Nonfungible AccountBalance (r:1 w:1)92 // Storage: Nonfungible Allowance (r:1 w:0)93 // Storage: Nonfungible Owned (r:0 w:1)94 // Storage: Nonfungible TokenProperties (r:0 w:1)95 fn burn_item() -> Weight {96 (29_798_000 as Weight)97 .saturating_add(T::DbWeight::get().reads(5 as Weight))98 .saturating_add(T::DbWeight::get().writes(5 as Weight))99 }100 // Storage: Nonfungible TokenChildren (r:1 w:0)101 // Storage: Nonfungible TokenData (r:1 w:1)102 // Storage: Nonfungible TokensBurnt (r:1 w:1)103 // Storage: Nonfungible AccountBalance (r:1 w:1)104 // Storage: Nonfungible Allowance (r:1 w:0)105 // Storage: Nonfungible Owned (r:0 w:1)106 // Storage: Nonfungible TokenProperties (r:0 w:1)107 fn burn_recursively_self_raw() -> Weight {108 (37_955_000 as Weight)109 .saturating_add(T::DbWeight::get().reads(5 as Weight))110 .saturating_add(T::DbWeight::get().writes(5 as Weight))111 }112 // Storage: Nonfungible TokenChildren (r:1 w:0)113 // Storage: Nonfungible TokenData (r:1 w:1)114 // Storage: Nonfungible TokensBurnt (r:1 w:1)115 // Storage: Nonfungible AccountBalance (r:1 w:1)116 // Storage: Nonfungible Allowance (r:1 w:0)117 // Storage: Nonfungible Owned (r:0 w:1)118 // Storage: Nonfungible TokenProperties (r:0 w:1)119 // Storage: Common CollectionById (r:1 w:0)120 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {121 (0 as Weight)122 // Standard Error: 1_349_000123 .saturating_add((275_145_000 as Weight).saturating_mul(b as Weight))124 .saturating_add(T::DbWeight::get().reads(7 as Weight))125 .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))126 .saturating_add(T::DbWeight::get().writes(6 as Weight))127 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))128 }129 // Storage: Nonfungible TokenData (r:1 w:1)130 // Storage: Nonfungible AccountBalance (r:2 w:2)131 // Storage: Nonfungible Allowance (r:1 w:0)132 // Storage: Nonfungible Owned (r:0 w:2)133 fn transfer() -> Weight {134 (27_867_000 as Weight)135 .saturating_add(T::DbWeight::get().reads(4 as Weight))136 .saturating_add(T::DbWeight::get().writes(5 as Weight))137 }138 // Storage: Nonfungible TokenData (r:1 w:0)139 // Storage: Nonfungible Allowance (r:1 w:1)140 fn approve() -> Weight {141 (18_824_000 as Weight)142 .saturating_add(T::DbWeight::get().reads(2 as Weight))143 .saturating_add(T::DbWeight::get().writes(1 as Weight))144 }145 // Storage: Nonfungible Allowance (r:1 w:1)146 // Storage: Nonfungible TokenData (r:1 w:1)147 // Storage: Nonfungible AccountBalance (r:2 w:2)148 // Storage: Nonfungible Owned (r:0 w:2)149 fn transfer_from() -> Weight {150 (32_879_000 as Weight)151 .saturating_add(T::DbWeight::get().reads(4 as Weight))152 .saturating_add(T::DbWeight::get().writes(6 as Weight))153 }154 // Storage: Nonfungible Allowance (r:1 w:1)155 // Storage: Nonfungible TokenData (r:1 w:1)156 // Storage: Nonfungible TokenChildren (r:1 w:0)157 // Storage: Nonfungible TokensBurnt (r:1 w:1)158 // Storage: Nonfungible AccountBalance (r:1 w:1)159 // Storage: Nonfungible Owned (r:0 w:1)160 // Storage: Nonfungible TokenProperties (r:0 w:1)161 fn burn_from() -> Weight {162 (37_061_000 as Weight)163 .saturating_add(T::DbWeight::get().reads(5 as Weight))164 .saturating_add(T::DbWeight::get().writes(6 as Weight))165 }166 // Storage: Common CollectionPropertyPermissions (r:1 w:1)167 fn set_token_property_permissions(b: u32, ) -> Weight {168 (0 as Weight)169 // Standard Error: 57_000170 .saturating_add((15_149_000 as Weight).saturating_mul(b as Weight))171 .saturating_add(T::DbWeight::get().reads(1 as Weight))172 .saturating_add(T::DbWeight::get().writes(1 as Weight))173 }174 // Storage: Common CollectionPropertyPermissions (r:1 w:0)175 // Storage: Nonfungible TokenData (r:1 w:0)176 // Storage: Nonfungible TokenProperties (r:1 w:1)177 fn set_token_properties(b: u32, ) -> Weight {178 (0 as Weight)179 // Standard Error: 2_278_000180 .saturating_add((409_613_000 as Weight).saturating_mul(b as Weight))181 .saturating_add(T::DbWeight::get().reads(3 as Weight))182 .saturating_add(T::DbWeight::get().writes(1 as Weight))183 }184 // Storage: Common CollectionPropertyPermissions (r:1 w:0)185 // Storage: Nonfungible TokenData (r:1 w:0)186 // Storage: Nonfungible TokenProperties (r:1 w:1)187 fn delete_token_properties(b: u32, ) -> Weight {188 (0 as Weight)189 // Standard Error: 2_234_000190 .saturating_add((408_185_000 as Weight).saturating_mul(b as Weight))191 .saturating_add(T::DbWeight::get().reads(3 as Weight))192 .saturating_add(T::DbWeight::get().writes(1 as Weight))193 }194}195196// For backwards compatibility and tests197impl WeightInfo for () {198 // Storage: Nonfungible TokensMinted (r:1 w:1)199 // Storage: Nonfungible AccountBalance (r:1 w:1)200 // Storage: Nonfungible TokenData (r:0 w:1)201 // Storage: Nonfungible Owned (r:0 w:1)202 fn create_item() -> Weight {203 (24_135_000 as Weight)204 .saturating_add(RocksDbWeight::get().reads(2 as Weight))205 .saturating_add(RocksDbWeight::get().writes(4 as Weight))206 }207 // Storage: Nonfungible TokensMinted (r:1 w:1)208 // Storage: Nonfungible AccountBalance (r:1 w:1)209 // Storage: Nonfungible TokenData (r:0 w:4)210 // Storage: Nonfungible Owned (r:0 w:4)211 fn create_multiple_items(b: u32, ) -> Weight {212 (21_952_000 as Weight)213 // Standard Error: 5_000214 .saturating_add((4_727_000 as Weight).saturating_mul(b as Weight))215 .saturating_add(RocksDbWeight::get().reads(2 as Weight))216 .saturating_add(RocksDbWeight::get().writes(2 as Weight))217 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))218 }219 // Storage: Nonfungible TokensMinted (r:1 w:1)220 // Storage: Nonfungible AccountBalance (r:4 w:4)221 // Storage: Nonfungible TokenData (r:0 w:4)222 // Storage: Nonfungible Owned (r:0 w:4)223 fn create_multiple_items_ex(b: u32, ) -> Weight {224 (10_432_000 as Weight)225 // Standard Error: 6_000226 .saturating_add((7_383_000 as Weight).saturating_mul(b as Weight))227 .saturating_add(RocksDbWeight::get().reads(1 as Weight))228 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))229 .saturating_add(RocksDbWeight::get().writes(1 as Weight))230 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))231 }232 // Storage: Nonfungible TokenData (r:1 w:1)233 // Storage: Nonfungible TokenChildren (r:1 w:0)234 // Storage: Nonfungible TokensBurnt (r:1 w:1)235 // Storage: Nonfungible AccountBalance (r:1 w:1)236 // Storage: Nonfungible Allowance (r:1 w:0)237 // Storage: Nonfungible Owned (r:0 w:1)238 // Storage: Nonfungible TokenProperties (r:0 w:1)239 fn burn_item() -> Weight {240 (29_798_000 as Weight)241 .saturating_add(RocksDbWeight::get().reads(5 as Weight))242 .saturating_add(RocksDbWeight::get().writes(5 as Weight))243 }244 // Storage: Nonfungible TokenChildren (r:1 w:0)245 // Storage: Nonfungible TokenData (r:1 w:1)246 // Storage: Nonfungible TokensBurnt (r:1 w:1)247 // Storage: Nonfungible AccountBalance (r:1 w:1)248 // Storage: Nonfungible Allowance (r:1 w:0)249 // Storage: Nonfungible Owned (r:0 w:1)250 // Storage: Nonfungible TokenProperties (r:0 w:1)251 fn burn_recursively_self_raw() -> Weight {252 (37_955_000 as Weight)253 .saturating_add(RocksDbWeight::get().reads(5 as Weight))254 .saturating_add(RocksDbWeight::get().writes(5 as Weight))255 }256 // Storage: Nonfungible TokenChildren (r:1 w:0)257 // Storage: Nonfungible TokenData (r:1 w:1)258 // Storage: Nonfungible TokensBurnt (r:1 w:1)259 // Storage: Nonfungible AccountBalance (r:1 w:1)260 // Storage: Nonfungible Allowance (r:1 w:0)261 // Storage: Nonfungible Owned (r:0 w:1)262 // Storage: Nonfungible TokenProperties (r:0 w:1)263 // Storage: Common CollectionById (r:1 w:0)264 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {265 (0 as Weight)266 // Standard Error: 1_349_000267 .saturating_add((275_145_000 as Weight).saturating_mul(b as Weight))268 .saturating_add(RocksDbWeight::get().reads(7 as Weight))269 .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))270 .saturating_add(RocksDbWeight::get().writes(6 as Weight))271 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))272 }273 // Storage: Nonfungible TokenData (r:1 w:1)274 // Storage: Nonfungible AccountBalance (r:2 w:2)275 // Storage: Nonfungible Allowance (r:1 w:0)276 // Storage: Nonfungible Owned (r:0 w:2)277 fn transfer() -> Weight {278 (27_867_000 as Weight)279 .saturating_add(RocksDbWeight::get().reads(4 as Weight))280 .saturating_add(RocksDbWeight::get().writes(5 as Weight))281 }282 // Storage: Nonfungible TokenData (r:1 w:0)283 // Storage: Nonfungible Allowance (r:1 w:1)284 fn approve() -> Weight {285 (18_824_000 as Weight)286 .saturating_add(RocksDbWeight::get().reads(2 as Weight))287 .saturating_add(RocksDbWeight::get().writes(1 as Weight))288 }289 // Storage: Nonfungible Allowance (r:1 w:1)290 // Storage: Nonfungible TokenData (r:1 w:1)291 // Storage: Nonfungible AccountBalance (r:2 w:2)292 // Storage: Nonfungible Owned (r:0 w:2)293 fn transfer_from() -> Weight {294 (32_879_000 as Weight)295 .saturating_add(RocksDbWeight::get().reads(4 as Weight))296 .saturating_add(RocksDbWeight::get().writes(6 as Weight))297 }298 // Storage: Nonfungible Allowance (r:1 w:1)299 // Storage: Nonfungible TokenData (r:1 w:1)300 // Storage: Nonfungible TokenChildren (r:1 w:0)301 // Storage: Nonfungible TokensBurnt (r:1 w:1)302 // Storage: Nonfungible AccountBalance (r:1 w:1)303 // Storage: Nonfungible Owned (r:0 w:1)304 // Storage: Nonfungible TokenProperties (r:0 w:1)305 fn burn_from() -> Weight {306 (37_061_000 as Weight)307 .saturating_add(RocksDbWeight::get().reads(5 as Weight))308 .saturating_add(RocksDbWeight::get().writes(6 as Weight))309 }310 // Storage: Common CollectionPropertyPermissions (r:1 w:1)311 fn set_token_property_permissions(b: u32, ) -> Weight {312 (0 as Weight)313 // Standard Error: 57_000314 .saturating_add((15_149_000 as Weight).saturating_mul(b as Weight))315 .saturating_add(RocksDbWeight::get().reads(1 as Weight))316 .saturating_add(RocksDbWeight::get().writes(1 as Weight))317 }318 // Storage: Common CollectionPropertyPermissions (r:1 w:0)319 // Storage: Nonfungible TokenData (r:1 w:0)320 // Storage: Nonfungible TokenProperties (r:1 w:1)321 fn set_token_properties(b: u32, ) -> Weight {322 (0 as Weight)323 // Standard Error: 2_278_000324 .saturating_add((409_613_000 as Weight).saturating_mul(b as Weight))325 .saturating_add(RocksDbWeight::get().reads(3 as Weight))326 .saturating_add(RocksDbWeight::get().writes(1 as Weight))327 }328 // Storage: Common CollectionPropertyPermissions (r:1 w:0)329 // Storage: Nonfungible TokenData (r:1 w:0)330 // Storage: Nonfungible TokenProperties (r:1 w:1)331 fn delete_token_properties(b: u32, ) -> Weight {332 (0 as Weight)333 // Standard Error: 2_234_000334 .saturating_add((408_185_000 as Weight).saturating_mul(b as Weight))335 .saturating_add(RocksDbWeight::get().reads(3 as Weight))336 .saturating_add(RocksDbWeight::get().writes(1 as Weight))337 }338}1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_nonfungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-07-20, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-nonfungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/nonfungible/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_nonfungible.35pub trait WeightInfo {36 fn create_item() -> Weight;37 fn create_multiple_items(b: u32, ) -> Weight;38 fn create_multiple_items_ex(b: u32, ) -> Weight;39 fn burn_item() -> Weight;40 fn burn_recursively_self_raw() -> Weight;41 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;42 fn transfer() -> Weight;43 fn approve() -> Weight;44 fn transfer_from() -> Weight;45 fn burn_from() -> Weight;46 fn set_token_property_permissions(b: u32, ) -> Weight;47 fn set_token_properties(b: u32, ) -> Weight;48 fn delete_token_properties(b: u32, ) -> Weight;49}5051/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.52pub struct SubstrateWeight<T>(PhantomData<T>);53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {54 // Storage: Nonfungible TokensMinted (r:1 w:1)55 // Storage: Nonfungible AccountBalance (r:1 w:1)56 // Storage: Nonfungible TokenData (r:0 w:1)57 // Storage: Nonfungible Owned (r:0 w:1)58 fn create_item() -> Weight {59 (20_328_000 as Weight)60 .saturating_add(T::DbWeight::get().reads(2 as Weight))61 .saturating_add(T::DbWeight::get().writes(4 as Weight))62 }63 // Storage: Nonfungible TokensMinted (r:1 w:1)64 // Storage: Nonfungible AccountBalance (r:1 w:1)65 // Storage: Nonfungible TokenData (r:0 w:4)66 // Storage: Nonfungible Owned (r:0 w:4)67 fn create_multiple_items(b: u32, ) -> Weight {68 (10_134_000 as Weight)69 // Standard Error: 3_00070 .saturating_add((4_927_000 as Weight).saturating_mul(b as Weight))71 .saturating_add(T::DbWeight::get().reads(2 as Weight))72 .saturating_add(T::DbWeight::get().writes(2 as Weight))73 .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))74 }75 // Storage: Nonfungible TokensMinted (r:1 w:1)76 // Storage: Nonfungible AccountBalance (r:4 w:4)77 // Storage: Nonfungible TokenData (r:0 w:4)78 // Storage: Nonfungible Owned (r:0 w:4)79 fn create_multiple_items_ex(b: u32, ) -> Weight {80 (5_710_000 as Weight)81 // Standard Error: 4_00082 .saturating_add((7_578_000 as Weight).saturating_mul(b as Weight))83 .saturating_add(T::DbWeight::get().reads(1 as Weight))84 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))85 .saturating_add(T::DbWeight::get().writes(1 as Weight))86 .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))87 }88 // Storage: Nonfungible TokenData (r:1 w:1)89 // Storage: Nonfungible TokenChildren (r:1 w:0)90 // Storage: Nonfungible TokensBurnt (r:1 w:1)91 // Storage: Nonfungible AccountBalance (r:1 w:1)92 // Storage: Nonfungible Allowance (r:1 w:0)93 // Storage: Nonfungible Owned (r:0 w:1)94 // Storage: Nonfungible TokenProperties (r:0 w:1)95 fn burn_item() -> Weight {96 (28_433_000 as Weight)97 .saturating_add(T::DbWeight::get().reads(5 as Weight))98 .saturating_add(T::DbWeight::get().writes(5 as Weight))99 }100 // Storage: Nonfungible TokenChildren (r:1 w:0)101 // Storage: Nonfungible TokenData (r:1 w:1)102 // Storage: Nonfungible TokensBurnt (r:1 w:1)103 // Storage: Nonfungible AccountBalance (r:1 w:1)104 // Storage: Nonfungible Allowance (r:1 w:0)105 // Storage: Nonfungible Owned (r:0 w:1)106 // Storage: Nonfungible TokenProperties (r:0 w:1)107 fn burn_recursively_self_raw() -> Weight {108 (34_435_000 as Weight)109 .saturating_add(T::DbWeight::get().reads(5 as Weight))110 .saturating_add(T::DbWeight::get().writes(5 as Weight))111 }112 // Storage: Nonfungible TokenChildren (r:1 w:0)113 // Storage: Nonfungible TokenData (r:1 w:1)114 // Storage: Nonfungible TokensBurnt (r:1 w:1)115 // Storage: Nonfungible AccountBalance (r:1 w:1)116 // Storage: Nonfungible Allowance (r:1 w:0)117 // Storage: Nonfungible Owned (r:0 w:1)118 // Storage: Nonfungible TokenProperties (r:0 w:1)119 // Storage: Common CollectionById (r:1 w:0)120 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {121 (0 as Weight)122 // Standard Error: 1_539_000123 .saturating_add((304_456_000 as Weight).saturating_mul(b as Weight))124 .saturating_add(T::DbWeight::get().reads(7 as Weight))125 .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))126 .saturating_add(T::DbWeight::get().writes(6 as Weight))127 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))128 }129 // Storage: Nonfungible TokenData (r:1 w:1)130 // Storage: Nonfungible AccountBalance (r:2 w:2)131 // Storage: Nonfungible Allowance (r:1 w:0)132 // Storage: Nonfungible Owned (r:0 w:2)133 fn transfer() -> Weight {134 (24_376_000 as Weight)135 .saturating_add(T::DbWeight::get().reads(4 as Weight))136 .saturating_add(T::DbWeight::get().writes(5 as Weight))137 }138 // Storage: Nonfungible TokenData (r:1 w:0)139 // Storage: Nonfungible Allowance (r:1 w:1)140 fn approve() -> Weight {141 (15_890_000 as Weight)142 .saturating_add(T::DbWeight::get().reads(2 as Weight))143 .saturating_add(T::DbWeight::get().writes(1 as Weight))144 }145 // Storage: Nonfungible Allowance (r:1 w:1)146 // Storage: Nonfungible TokenData (r:1 w:1)147 // Storage: Nonfungible AccountBalance (r:2 w:2)148 // Storage: Nonfungible Owned (r:0 w:2)149 fn transfer_from() -> Weight {150 (28_634_000 as Weight)151 .saturating_add(T::DbWeight::get().reads(4 as Weight))152 .saturating_add(T::DbWeight::get().writes(6 as Weight))153 }154 // Storage: Nonfungible Allowance (r:1 w:1)155 // Storage: Nonfungible TokenData (r:1 w:1)156 // Storage: Nonfungible TokenChildren (r:1 w:0)157 // Storage: Nonfungible TokensBurnt (r:1 w:1)158 // Storage: Nonfungible AccountBalance (r:1 w:1)159 // Storage: Nonfungible Owned (r:0 w:1)160 // Storage: Nonfungible TokenProperties (r:0 w:1)161 fn burn_from() -> Weight {162 (32_201_000 as Weight)163 .saturating_add(T::DbWeight::get().reads(5 as Weight))164 .saturating_add(T::DbWeight::get().writes(6 as Weight))165 }166 // Storage: Common CollectionPropertyPermissions (r:1 w:1)167 fn set_token_property_permissions(b: u32, ) -> Weight {168 (0 as Weight)169 // Standard Error: 57_000170 .saturating_add((15_232_000 as Weight).saturating_mul(b as Weight))171 .saturating_add(T::DbWeight::get().reads(1 as Weight))172 .saturating_add(T::DbWeight::get().writes(1 as Weight))173 }174 // Storage: Common CollectionPropertyPermissions (r:1 w:0)175 // Storage: Nonfungible TokenProperties (r:1 w:1)176 fn set_token_properties(b: u32, ) -> Weight {177 (0 as Weight)178 // Standard Error: 1_648_000179 .saturating_add((288_654_000 as Weight).saturating_mul(b as Weight))180 .saturating_add(T::DbWeight::get().reads(2 as Weight))181 .saturating_add(T::DbWeight::get().writes(1 as Weight))182 }183 // Storage: Common CollectionPropertyPermissions (r:1 w:0)184 // Storage: Nonfungible TokenProperties (r:1 w:1)185 fn delete_token_properties(b: u32, ) -> Weight {186 (0 as Weight)187 // Standard Error: 1_632_000188 .saturating_add((289_190_000 as Weight).saturating_mul(b as Weight))189 .saturating_add(T::DbWeight::get().reads(2 as Weight))190 .saturating_add(T::DbWeight::get().writes(1 as Weight))191 }192}193194// For backwards compatibility and tests195impl WeightInfo for () {196 // Storage: Nonfungible TokensMinted (r:1 w:1)197 // Storage: Nonfungible AccountBalance (r:1 w:1)198 // Storage: Nonfungible TokenData (r:0 w:1)199 // Storage: Nonfungible Owned (r:0 w:1)200 fn create_item() -> Weight {201 (20_328_000 as Weight)202 .saturating_add(RocksDbWeight::get().reads(2 as Weight))203 .saturating_add(RocksDbWeight::get().writes(4 as Weight))204 }205 // Storage: Nonfungible TokensMinted (r:1 w:1)206 // Storage: Nonfungible AccountBalance (r:1 w:1)207 // Storage: Nonfungible TokenData (r:0 w:4)208 // Storage: Nonfungible Owned (r:0 w:4)209 fn create_multiple_items(b: u32, ) -> Weight {210 (10_134_000 as Weight)211 // Standard Error: 3_000212 .saturating_add((4_927_000 as Weight).saturating_mul(b as Weight))213 .saturating_add(RocksDbWeight::get().reads(2 as Weight))214 .saturating_add(RocksDbWeight::get().writes(2 as Weight))215 .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))216 }217 // Storage: Nonfungible TokensMinted (r:1 w:1)218 // Storage: Nonfungible AccountBalance (r:4 w:4)219 // Storage: Nonfungible TokenData (r:0 w:4)220 // Storage: Nonfungible Owned (r:0 w:4)221 fn create_multiple_items_ex(b: u32, ) -> Weight {222 (5_710_000 as Weight)223 // Standard Error: 4_000224 .saturating_add((7_578_000 as Weight).saturating_mul(b as Weight))225 .saturating_add(RocksDbWeight::get().reads(1 as Weight))226 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))227 .saturating_add(RocksDbWeight::get().writes(1 as Weight))228 .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))229 }230 // Storage: Nonfungible TokenData (r:1 w:1)231 // Storage: Nonfungible TokenChildren (r:1 w:0)232 // Storage: Nonfungible TokensBurnt (r:1 w:1)233 // Storage: Nonfungible AccountBalance (r:1 w:1)234 // Storage: Nonfungible Allowance (r:1 w:0)235 // Storage: Nonfungible Owned (r:0 w:1)236 // Storage: Nonfungible TokenProperties (r:0 w:1)237 fn burn_item() -> Weight {238 (28_433_000 as Weight)239 .saturating_add(RocksDbWeight::get().reads(5 as Weight))240 .saturating_add(RocksDbWeight::get().writes(5 as Weight))241 }242 // Storage: Nonfungible TokenChildren (r:1 w:0)243 // Storage: Nonfungible TokenData (r:1 w:1)244 // Storage: Nonfungible TokensBurnt (r:1 w:1)245 // Storage: Nonfungible AccountBalance (r:1 w:1)246 // Storage: Nonfungible Allowance (r:1 w:0)247 // Storage: Nonfungible Owned (r:0 w:1)248 // Storage: Nonfungible TokenProperties (r:0 w:1)249 fn burn_recursively_self_raw() -> Weight {250 (34_435_000 as Weight)251 .saturating_add(RocksDbWeight::get().reads(5 as Weight))252 .saturating_add(RocksDbWeight::get().writes(5 as Weight))253 }254 // Storage: Nonfungible TokenChildren (r:1 w:0)255 // Storage: Nonfungible TokenData (r:1 w:1)256 // Storage: Nonfungible TokensBurnt (r:1 w:1)257 // Storage: Nonfungible AccountBalance (r:1 w:1)258 // Storage: Nonfungible Allowance (r:1 w:0)259 // Storage: Nonfungible Owned (r:0 w:1)260 // Storage: Nonfungible TokenProperties (r:0 w:1)261 // Storage: Common CollectionById (r:1 w:0)262 fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {263 (0 as Weight)264 // Standard Error: 1_539_000265 .saturating_add((304_456_000 as Weight).saturating_mul(b as Weight))266 .saturating_add(RocksDbWeight::get().reads(7 as Weight))267 .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))268 .saturating_add(RocksDbWeight::get().writes(6 as Weight))269 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))270 }271 // Storage: Nonfungible TokenData (r:1 w:1)272 // Storage: Nonfungible AccountBalance (r:2 w:2)273 // Storage: Nonfungible Allowance (r:1 w:0)274 // Storage: Nonfungible Owned (r:0 w:2)275 fn transfer() -> Weight {276 (24_376_000 as Weight)277 .saturating_add(RocksDbWeight::get().reads(4 as Weight))278 .saturating_add(RocksDbWeight::get().writes(5 as Weight))279 }280 // Storage: Nonfungible TokenData (r:1 w:0)281 // Storage: Nonfungible Allowance (r:1 w:1)282 fn approve() -> Weight {283 (15_890_000 as Weight)284 .saturating_add(RocksDbWeight::get().reads(2 as Weight))285 .saturating_add(RocksDbWeight::get().writes(1 as Weight))286 }287 // Storage: Nonfungible Allowance (r:1 w:1)288 // Storage: Nonfungible TokenData (r:1 w:1)289 // Storage: Nonfungible AccountBalance (r:2 w:2)290 // Storage: Nonfungible Owned (r:0 w:2)291 fn transfer_from() -> Weight {292 (28_634_000 as Weight)293 .saturating_add(RocksDbWeight::get().reads(4 as Weight))294 .saturating_add(RocksDbWeight::get().writes(6 as Weight))295 }296 // Storage: Nonfungible Allowance (r:1 w:1)297 // Storage: Nonfungible TokenData (r:1 w:1)298 // Storage: Nonfungible TokenChildren (r:1 w:0)299 // Storage: Nonfungible TokensBurnt (r:1 w:1)300 // Storage: Nonfungible AccountBalance (r:1 w:1)301 // Storage: Nonfungible Owned (r:0 w:1)302 // Storage: Nonfungible TokenProperties (r:0 w:1)303 fn burn_from() -> Weight {304 (32_201_000 as Weight)305 .saturating_add(RocksDbWeight::get().reads(5 as Weight))306 .saturating_add(RocksDbWeight::get().writes(6 as Weight))307 }308 // Storage: Common CollectionPropertyPermissions (r:1 w:1)309 fn set_token_property_permissions(b: u32, ) -> Weight {310 (0 as Weight)311 // Standard Error: 57_000312 .saturating_add((15_232_000 as Weight).saturating_mul(b as Weight))313 .saturating_add(RocksDbWeight::get().reads(1 as Weight))314 .saturating_add(RocksDbWeight::get().writes(1 as Weight))315 }316 // Storage: Common CollectionPropertyPermissions (r:1 w:0)317 // Storage: Nonfungible TokenProperties (r:1 w:1)318 fn set_token_properties(b: u32, ) -> Weight {319 (0 as Weight)320 // Standard Error: 1_648_000321 .saturating_add((288_654_000 as Weight).saturating_mul(b as Weight))322 .saturating_add(RocksDbWeight::get().reads(2 as Weight))323 .saturating_add(RocksDbWeight::get().writes(1 as Weight))324 }325 // Storage: Common CollectionPropertyPermissions (r:1 w:0)326 // Storage: Nonfungible TokenProperties (r:1 w:1)327 fn delete_token_properties(b: u32, ) -> Weight {328 (0 as Weight)329 // Standard Error: 1_632_000330 .saturating_add((289_190_000 as Weight).saturating_mul(b as Weight))331 .saturating_add(RocksDbWeight::get().reads(2 as Weight))332 .saturating_add(RocksDbWeight::get().writes(1 as Weight))333 }334}pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -38,6 +38,7 @@
.collect::<BTreeMap<_, _>>()
.try_into()
.unwrap(),
+ properties: Default::default(),
}
}
fn create_max_item<T: Config>(