Skip to content

Commit

Permalink
Weights benchmarks for RT2100 (#2053)
Browse files Browse the repository at this point in the history
* weights benchmarks for RT2100

* Update precompile gas cost assumptions

* fix rust tests

* fix unit tests for pallet-evm-precompile-parachain-staking

* Avoid hrmp_close test to fail on debug

* fix unit tests for pallet-evm-precompile-xcm-transactor

* fix unit tests for pallet-parachain-staking

* fix ts tests

Co-authored-by: notlesh <steve@brewcraft.org>
Co-authored-by: girazoki <gorka.irazoki@gmail.com>
  • Loading branch information
3 people committed Jan 19, 2023
1 parent b133edf commit 41d3b12
Show file tree
Hide file tree
Showing 17 changed files with 326 additions and 391 deletions.
58 changes: 29 additions & 29 deletions pallets/asset-manager/src/weights.rs
Expand Up @@ -17,7 +17,7 @@
//! Autogenerated weights for pallet_asset_manager
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-09-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -74,7 +74,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AssetManager AssetTypeId (r:0 w:1)
#[rustfmt::skip]
fn register_foreign_asset() -> Weight {
Weight::from_ref_time(57_298_000 as u64)
Weight::from_ref_time(61_307_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
Expand All @@ -83,9 +83,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1)
#[rustfmt::skip]
fn set_asset_units_per_second(x: u32, ) -> Weight {
Weight::from_ref_time(40_775_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(523_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(40_360_313 as u64)
// Standard Error: 1_882
.saturating_add(Weight::from_ref_time(654_975 as u64).saturating_mul(x as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand All @@ -95,19 +95,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AssetManager AssetTypeId (r:0 w:2)
#[rustfmt::skip]
fn change_existing_asset_type(x: u32, ) -> Weight {
Weight::from_ref_time(53_066_000 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(573_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(54_186_594 as u64)
// Standard Error: 2_515
.saturating_add(Weight::from_ref_time(701_870 as u64).saturating_mul(x as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1)
// Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1)
#[rustfmt::skip]
fn remove_supported_asset(x: u32, ) -> Weight {
Weight::from_ref_time(35_386_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(491_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(35_292_968 as u64)
// Standard Error: 2_092
.saturating_add(Weight::from_ref_time(579_824 as u64).saturating_mul(x as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand All @@ -118,7 +118,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AssetManager LocalAssetDeposit (r:0 w:1)
#[rustfmt::skip]
fn register_local_asset() -> Weight {
Weight::from_ref_time(68_261_000 as u64)
Weight::from_ref_time(73_565_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
Expand All @@ -128,9 +128,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AssetManager AssetTypeId (r:0 w:1)
#[rustfmt::skip]
fn remove_existing_asset_type(x: u32, ) -> Weight {
Weight::from_ref_time(42_478_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(497_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(42_086_299 as u64)
// Standard Error: 1_975
.saturating_add(Weight::from_ref_time(590_049 as u64).saturating_mul(x as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
Expand All @@ -144,7 +144,7 @@ impl WeightInfo for () {
// Storage: AssetManager AssetTypeId (r:0 w:1)
#[rustfmt::skip]
fn register_foreign_asset() -> Weight {
Weight::from_ref_time(57_298_000 as u64)
Weight::from_ref_time(61_307_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
Expand All @@ -153,9 +153,9 @@ impl WeightInfo for () {
// Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1)
#[rustfmt::skip]
fn set_asset_units_per_second(x: u32, ) -> Weight {
Weight::from_ref_time(40_775_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(523_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(40_360_313 as u64)
// Standard Error: 1_882
.saturating_add(Weight::from_ref_time(654_975 as u64).saturating_mul(x as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
Expand All @@ -165,19 +165,19 @@ impl WeightInfo for () {
// Storage: AssetManager AssetTypeId (r:0 w:2)
#[rustfmt::skip]
fn change_existing_asset_type(x: u32, ) -> Weight {
Weight::from_ref_time(53_066_000 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(573_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(54_186_594 as u64)
// Standard Error: 2_515
.saturating_add(Weight::from_ref_time(701_870 as u64).saturating_mul(x as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1)
// Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1)
#[rustfmt::skip]
fn remove_supported_asset(x: u32, ) -> Weight {
Weight::from_ref_time(35_386_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(491_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(35_292_968 as u64)
// Standard Error: 2_092
.saturating_add(Weight::from_ref_time(579_824 as u64).saturating_mul(x as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
Expand All @@ -188,7 +188,7 @@ impl WeightInfo for () {
// Storage: AssetManager LocalAssetDeposit (r:0 w:1)
#[rustfmt::skip]
fn register_local_asset() -> Weight {
Weight::from_ref_time(68_261_000 as u64)
Weight::from_ref_time(73_565_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
Expand All @@ -198,9 +198,9 @@ impl WeightInfo for () {
// Storage: AssetManager AssetTypeId (r:0 w:1)
#[rustfmt::skip]
fn remove_existing_asset_type(x: u32, ) -> Weight {
Weight::from_ref_time(42_478_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(497_000 as u64).saturating_mul(x as u64))
Weight::from_ref_time(42_086_299 as u64)
// Standard Error: 1_975
.saturating_add(Weight::from_ref_time(590_049 as u64).saturating_mul(x as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
Expand Down
22 changes: 11 additions & 11 deletions pallets/author-mapping/src/weights.rs
Expand Up @@ -17,7 +17,7 @@
//! Autogenerated weights for pallet_author_mapping
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-09-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -71,15 +71,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AuthorMapping NimbusLookup (r:0 w:1)
#[rustfmt::skip]
fn add_association() -> Weight {
Weight::from_ref_time(49_537_000 as u64)
Weight::from_ref_time(50_753_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: AuthorMapping MappingWithDeposit (r:2 w:2)
// Storage: AuthorMapping NimbusLookup (r:0 w:1)
#[rustfmt::skip]
fn update_association() -> Weight {
Weight::from_ref_time(40_530_000 as u64)
Weight::from_ref_time(41_499_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -88,7 +88,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AuthorMapping NimbusLookup (r:0 w:1)
#[rustfmt::skip]
fn clear_association() -> Weight {
Weight::from_ref_time(53_842_000 as u64)
Weight::from_ref_time(55_398_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -97,15 +97,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System Account (r:1 w:1)
#[rustfmt::skip]
fn remove_keys() -> Weight {
Weight::from_ref_time(58_199_000 as u64)
Weight::from_ref_time(60_757_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: AuthorMapping NimbusLookup (r:1 w:1)
// Storage: AuthorMapping MappingWithDeposit (r:2 w:2)
#[rustfmt::skip]
fn set_keys() -> Weight {
Weight::from_ref_time(46_240_000 as u64)
Weight::from_ref_time(45_388_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -118,15 +118,15 @@ impl WeightInfo for () {
// Storage: AuthorMapping NimbusLookup (r:0 w:1)
#[rustfmt::skip]
fn add_association() -> Weight {
Weight::from_ref_time(49_537_000 as u64)
Weight::from_ref_time(50_753_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: AuthorMapping MappingWithDeposit (r:2 w:2)
// Storage: AuthorMapping NimbusLookup (r:0 w:1)
#[rustfmt::skip]
fn update_association() -> Weight {
Weight::from_ref_time(40_530_000 as u64)
Weight::from_ref_time(41_499_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
Expand All @@ -135,7 +135,7 @@ impl WeightInfo for () {
// Storage: AuthorMapping NimbusLookup (r:0 w:1)
#[rustfmt::skip]
fn clear_association() -> Weight {
Weight::from_ref_time(53_842_000 as u64)
Weight::from_ref_time(55_398_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
Expand All @@ -144,15 +144,15 @@ impl WeightInfo for () {
// Storage: System Account (r:1 w:1)
#[rustfmt::skip]
fn remove_keys() -> Weight {
Weight::from_ref_time(58_199_000 as u64)
Weight::from_ref_time(60_757_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: AuthorMapping NimbusLookup (r:1 w:1)
// Storage: AuthorMapping MappingWithDeposit (r:2 w:2)
#[rustfmt::skip]
fn set_keys() -> Weight {
Weight::from_ref_time(46_240_000 as u64)
Weight::from_ref_time(45_388_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
Expand Down
14 changes: 7 additions & 7 deletions pallets/migrations/src/weights.rs
Expand Up @@ -17,7 +17,7 @@
//! Autogenerated weights for pallet_migrations
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -63,9 +63,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Preimage PreimageFor (r:0 w:1)
#[rustfmt::skip]
fn migrate_democracy_preimage(x: u32, ) -> Weight {
Weight::from_ref_time(26_580_443 as u64)
// Standard Error: 474
.saturating_add(Weight::from_ref_time(6_264 as u64).saturating_mul(x as u64))
Weight::from_ref_time(29_108_490 as u64)
// Standard Error: 994
.saturating_add(Weight::from_ref_time(14_013 as u64).saturating_mul(x as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -78,9 +78,9 @@ impl WeightInfo for () {
// Storage: Preimage PreimageFor (r:0 w:1)
#[rustfmt::skip]
fn migrate_democracy_preimage(x: u32, ) -> Weight {
Weight::from_ref_time(26_580_443 as u64)
// Standard Error: 474
.saturating_add(Weight::from_ref_time(6_264 as u64).saturating_mul(x as u64))
Weight::from_ref_time(29_108_490 as u64)
// Standard Error: 994
.saturating_add(Weight::from_ref_time(14_013 as u64).saturating_mul(x as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
Expand Down

0 comments on commit 41d3b12

Please sign in to comment.