Consolidate pallet-assets metadata benchmarks into single get_metadata benchmark#11037
Consolidate pallet-assets metadata benchmarks into single get_metadata benchmark#11037
Conversation
|
/cmd bench --runtime dev |
|
Command "bench --runtime dev" has started 🚀 See logs here |
|
/cmd bench --runtime dev --pallet pallet_assets pallet-assets-precompiles |
|
Command "bench --runtime dev --pallet pallet_assets pallet-assets-precompiles" has started 🚀 See logs here |
|
Command "bench --runtime dev --pallet pallet_assets pallet-assets-precompiles" has failed ❌! See logs here |
|
/cmd bench --runtime dev --pallet pallet_assets pallet_assets_precompiles |
|
Command "bench --runtime dev --pallet pallet_assets pallet_assets_precompiles" has started 🚀 See logs here |
|
Command "bench --runtime dev --pallet pallet_assets pallet_assets_precompiles" has failed ❌! See logs here |
|
/cmd bench --runtime dev --pallet pallet_assets |
|
Command "bench --runtime dev --pallet pallet_assets" has started 🚀 See logs here |
…--pallet pallet_assets'
|
Command "bench --runtime dev --pallet pallet_assets" has finished ✅ See logs here DetailsSubweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
|
/cmd bench --runtime dev --pallet pallet_assets_precompiles |
|
Command "bench --runtime dev --pallet pallet_assets_precompiles" has started 🚀 See logs here |
|
Command "bench --runtime dev --pallet pallet_assets_precompiles" has failed ❌! See logs here |
|
/cmd bench --runtime asset-hub-westend --pallet pallet_assets |
|
/cmd bench --runtime asset-hub-rococo --pallet pallet_assets |
|
Command "bench --runtime asset-hub-westend --pallet pallet_assets" has started 🚀 See logs here |
|
/cmd prdoc --audience runtime_dev --bump patch |
|
Command "bench --runtime asset-hub-rococo --pallet pallet_assets" has started 🚀 See logs here |
…time_dev --bump patch'
|
Command "bench --runtime asset-hub-rococo --pallet pallet_assets" has failed ❌! See logs here |
…t-hub-westend --pallet pallet_assets'
|
Command "bench --runtime asset-hub-westend --pallet pallet_assets" has finished ✅ See logs here DetailsSubweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
…dot-sdk into rve/ierc20metadata
Summary
Consolidates the three identical
get_name,get_symbol, andget_decimalsbenchmarks into a singleget_metadatabenchmark. This addresses the follow-up from #10971 where it was noted that these benchmarks perform the same operation (Pallet::get_metadata()).Changes
Benchmarks
substrate/frame/assets/src/benchmarking.rsget_name,get_symbol,get_decimalswith singleget_metadatabenchmarkWeight Functions
substrate/frame/assets/src/weights.rsget_name(),get_symbol(),get_decimals()with singleget_metadata()inWeightInfotraitSubstrateWeight<T>and()Precompile
substrate/frame/assets/precompiles/src/lib.rsname(),symbol(), anddecimals()methods to all chargeget_metadata()weightCumulus Runtimes
Updated weight implementations in:
asset-hub-rococo:pallet_assets_foreign.rs,pallet_assets_local.rs,pallet_assets_pool.rsasset-hub-westend:pallet_assets_foreign.rs,pallet_assets_local.rs,pallet_assets_pool.rsRationale
All three original benchmarks were measuring the exact same operation - a single metadata storage read. Consolidating them:
WeightInfotraitname(),symbol(), anddecimals()have identical costsCloses follow-up from #10971 (comment)