From fd29ab7ce6a4600b8cb013d7f8b592256d4e8513 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 9 Apr 2024 11:51:15 +0200 Subject: [PATCH] remove parametric benchmarking --- .../foreign-asset-creator/src/benchmarks.rs | 4 +- pallets/foreign-asset-creator/src/weights.rs | 75 +++++++++---------- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/pallets/foreign-asset-creator/src/benchmarks.rs b/pallets/foreign-asset-creator/src/benchmarks.rs index 2398b9ce..a8cd4739 100644 --- a/pallets/foreign-asset-creator/src/benchmarks.rs +++ b/pallets/foreign-asset-creator/src/benchmarks.rs @@ -40,7 +40,7 @@ benchmarks! { const USER_SEED: u32 = 1; let manager: T::AccountId = account("manager", 0, USER_SEED); - let foreign_asset: T::ForeignAsset = Location::new(0, [GeneralIndex(0 as u128)]).into(); + let foreign_asset: T::ForeignAsset = Location::new(0, [GeneralIndex(0u128)]).into(); let asset_id: AssetId = (0u16).into(); let amount = 1u32.into(); Pallet::::create_foreign_asset( @@ -67,7 +67,7 @@ benchmarks! { const USER_SEED: u32 = 1; let manager: T::AccountId = account("manager", 0, USER_SEED); - let foreign_asset: T::ForeignAsset = Location::new(0, [GeneralIndex(0 u128)]).into(); + let foreign_asset: T::ForeignAsset = Location::new(0, [GeneralIndex(0u128)]).into(); let asset_id: AssetId = 0u16.into(); let amount = 1u32.into(); Pallet::::create_foreign_asset( diff --git a/pallets/foreign-asset-creator/src/weights.rs b/pallets/foreign-asset-creator/src/weights.rs index f9c784f9..c9feeea7 100644 --- a/pallets/foreign-asset-creator/src/weights.rs +++ b/pallets/foreign-asset-creator/src/weights.rs @@ -18,10 +18,10 @@ //! Autogenerated weights for pallet_foreign_asset_creator //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `girazoki-XPS-15-9530`, CPU: `13th Gen Intel(R) Core(TM) i9-13900H` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/tanssi-node @@ -33,6 +33,7 @@ // pallet_foreign_asset_creator // --extrinsic // * +// --chain=dev // --steps // 50 // --repeat @@ -41,7 +42,7 @@ // --json-file // raw.json // --output -// weights.rs +// tmp/pallet_foreign_asset_creator.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -69,10 +70,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_foreign_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `80` + // Measured: `113` // Estimated: `3673` - // Minimum execution time: 17_654_000 picoseconds. - Weight::from_parts(18_621_000, 3673) + // Minimum execution time: 16_738_000 picoseconds. + Weight::from_parts(17_366_000, 3673) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -82,11 +83,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_existing_asset_type() -> Weight { // Proof Size summary in bytes: - // Measured: `427` - // Estimated: `3880` - // Minimum execution time: 17_469_000 picoseconds. - Weight::from_parts(20_276_697, 3880) - // Standard Error: 1_876 + // Measured: `189` + // Estimated: `3654` + // Minimum execution time: 13_861_000 picoseconds. + Weight::from_parts(14_153_000, 3654) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -96,11 +96,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_existing_asset_type() -> Weight { // Proof Size summary in bytes: - // Measured: `427` - // Estimated: `3880` - // Minimum execution time: 15_165_000 picoseconds. - Weight::from_parts(18_041_533, 3880) - // Standard Error: 1_836 + // Measured: `189` + // Estimated: `3654` + // Minimum execution time: 11_698_000 picoseconds. + Weight::from_parts(12_184_000, 3654) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -112,14 +111,13 @@ impl WeightInfo for SubstrateWeight { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn destroy_foreign_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `981` - // Estimated: `4441` - // Minimum execution time: 22_589_000 picoseconds. - Weight::from_parts(26_897_574, 4441) - // Standard Error: 3_872 + // Measured: `429` + // Estimated: `3894` + // Minimum execution time: 17_797_000 picoseconds. + Weight::from_parts(18_635_000, 3894) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) - } + } } // For backwards compatibility and tests @@ -132,10 +130,10 @@ impl WeightInfo for () { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_foreign_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `80` + // Measured: `113` // Estimated: `3673` - // Minimum execution time: 17_654_000 picoseconds. - Weight::from_parts(18_621_000, 3673) + // Minimum execution time: 16_738_000 picoseconds. + Weight::from_parts(17_366_000, 3673) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -145,11 +143,10 @@ impl WeightInfo for () { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_existing_asset_type() -> Weight { // Proof Size summary in bytes: - // Measured: `427` - // Estimated: `3880` - // Minimum execution time: 17_469_000 picoseconds. - Weight::from_parts(20_276_697, 3880) - // Standard Error: 1_876 + // Measured: `189` + // Estimated: `3654` + // Minimum execution time: 13_861_000 picoseconds. + Weight::from_parts(14_153_000, 3654) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -159,11 +156,10 @@ impl WeightInfo for () { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_existing_asset_type() -> Weight { // Proof Size summary in bytes: - // Measured: `427` - // Estimated: `3880` - // Minimum execution time: 15_165_000 picoseconds. - Weight::from_parts(18_041_533, 3880) - // Standard Error: 1_836 + // Measured: `189` + // Estimated: `3654` + // Minimum execution time: 11_698_000 picoseconds. + Weight::from_parts(12_184_000, 3654) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -175,11 +171,10 @@ impl WeightInfo for () { /// Proof: `ForeignAssetsCreator::ForeignAssetToAssetId` (`max_values`: None, `max_size`: None, mode: `Measured`) fn destroy_foreign_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `981` - // Estimated: `4441` - // Minimum execution time: 22_589_000 picoseconds. - Weight::from_parts(26_897_574, 4441) - // Standard Error: 3_872 + // Measured: `429` + // Estimated: `3894` + // Minimum execution time: 17_797_000 picoseconds. + Weight::from_parts(18_635_000, 3894) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) }