Skip to content

Commit

Permalink
Added benchmarking for pallet-collator-selection. (#985)
Browse files Browse the repository at this point in the history
# Goal
The goal of this PR is to add benchmarking for
pallet-collator-selection.

Closes #608

---------

Co-authored-by: Jenkins <[email protected]>
  • Loading branch information
rlaferla and Jenkins committed Jan 30, 2023
1 parent 5930872 commit c621ba3
Show file tree
Hide file tree
Showing 20 changed files with 362 additions and 258 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions pallets/messages/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_messages
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-25, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-27, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -65,17 +65,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:0)
// Storage: Messages Messages (r:1 w:1)
fn add_onchain_message(n: u32, ) -> Weight {
Weight::from_ref_time(139_240_171 as u64)
// Standard Error: 41
.saturating_add(Weight::from_ref_time(1_530 as u64).saturating_mul(n as u64))
Weight::from_ref_time(139_432_286 as u64)
// Standard Error: 43
.saturating_add(Weight::from_ref_time(1_441 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Schemas Schemas (r:1 w:0)
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Messages Messages (r:1 w:1)
fn add_ipfs_message() -> Weight {
Weight::from_ref_time(131_967_000 as u64)
Weight::from_ref_time(131_669_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -88,17 +88,17 @@ impl WeightInfo for () {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:0)
// Storage: Messages Messages (r:1 w:1)
fn add_onchain_message(n: u32, ) -> Weight {
Weight::from_ref_time(139_240_171 as u64)
// Standard Error: 41
.saturating_add(Weight::from_ref_time(1_530 as u64).saturating_mul(n as u64))
Weight::from_ref_time(139_432_286 as u64)
// Standard Error: 43
.saturating_add(Weight::from_ref_time(1_441 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Schemas Schemas (r:1 w:0)
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Messages Messages (r:1 w:1)
fn add_ipfs_message() -> Weight {
Weight::from_ref_time(131_967_000 as u64)
Weight::from_ref_time(131_669_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
Expand Down
106 changes: 53 additions & 53 deletions pallets/msa/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_msa
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-25, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-27, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -74,7 +74,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Msa PublicKeyToMsaId (r:1 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
fn create() -> Weight {
Weight::from_ref_time(20_069_000 as u64)
Weight::from_ref_time(20_504_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -87,16 +87,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn create_sponsored_account_with_delegation(s: u32, ) -> Weight {
Weight::from_ref_time(101_903_001 as u64)
// Standard Error: 20_372
.saturating_add(Weight::from_ref_time(36_736 as u64).saturating_mul(s as u64))
Weight::from_ref_time(100_477_842 as u64)
// Standard Error: 22_378
.saturating_add(Weight::from_ref_time(75_787 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
fn revoke_delegation_by_provider() -> Weight {
Weight::from_ref_time(23_668_000 as u64)
Weight::from_ref_time(23_048_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -105,24 +105,24 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Msa PublicKeyToMsaId (r:2 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
fn add_public_key_to_msa() -> Weight {
Weight::from_ref_time(148_262_000 as u64)
Weight::from_ref_time(146_137_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:2 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
fn delete_msa_public_key() -> Weight {
Weight::from_ref_time(28_027_000 as u64)
Weight::from_ref_time(28_233_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
// Storage: Msa DelegatorAndProviderToDelegation (r:0 w:3)
fn retire_msa(s: u32, ) -> Weight {
Weight::from_ref_time(25_524_224 as u64)
// Standard Error: 7_198
.saturating_add(Weight::from_ref_time(966_961 as u64).saturating_mul(s as u64))
Weight::from_ref_time(24_340_226 as u64)
// Standard Error: 7_963
.saturating_add(Weight::from_ref_time(983_558 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
Expand All @@ -133,34 +133,34 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn grant_delegation(s: u32, ) -> Weight {
Weight::from_ref_time(94_280_633 as u64)
// Standard Error: 25_551
.saturating_add(Weight::from_ref_time(166_406 as u64).saturating_mul(s as u64))
Weight::from_ref_time(94_064_605 as u64)
// Standard Error: 17_235
.saturating_add(Weight::from_ref_time(106_239 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
fn revoke_delegation_by_delegator() -> Weight {
Weight::from_ref_time(23_253_000 as u64)
Weight::from_ref_time(22_841_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa ProviderToRegistryEntry (r:1 w:1)
fn create_provider(s: u32, ) -> Weight {
Weight::from_ref_time(19_721_155 as u64)
// Standard Error: 33_576
.saturating_add(Weight::from_ref_time(48_821 as u64).saturating_mul(s as u64))
Weight::from_ref_time(19_772_959 as u64)
// Standard Error: 6_405
.saturating_add(Weight::from_ref_time(12_940 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Msa PayloadSignatureBucketCount (r:1 w:1)
// Storage: Msa PayloadSignatureRegistry (r:0 w:1)
fn on_initialize(m: u32, ) -> Weight {
Weight::from_ref_time(7_997_000 as u64)
// Standard Error: 3_747
.saturating_add(Weight::from_ref_time(1_287_825 as u64).saturating_mul(m as u64))
Weight::from_ref_time(8_071_000 as u64)
// Standard Error: 4_326
.saturating_add(Weight::from_ref_time(1_275_241 as u64).saturating_mul(m as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(m as u64)))
Expand All @@ -169,19 +169,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn grant_schema_permissions(s: u32, ) -> Weight {
Weight::from_ref_time(26_275_498 as u64)
// Standard Error: 7_094
.saturating_add(Weight::from_ref_time(65_560 as u64).saturating_mul(s as u64))
Weight::from_ref_time(26_412_674 as u64)
// Standard Error: 6_411
.saturating_add(Weight::from_ref_time(46_362 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn revoke_schema_permissions(s: u32, ) -> Weight {
Weight::from_ref_time(27_367_931 as u64)
// Standard Error: 7_546
.saturating_add(Weight::from_ref_time(142_084 as u64).saturating_mul(s as u64))
Weight::from_ref_time(26_918_983 as u64)
// Standard Error: 7_846
.saturating_add(Weight::from_ref_time(125_625 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -193,7 +193,7 @@ impl WeightInfo for () {
// Storage: Msa PublicKeyToMsaId (r:1 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
fn create() -> Weight {
Weight::from_ref_time(20_069_000 as u64)
Weight::from_ref_time(20_504_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
Expand All @@ -206,16 +206,16 @@ impl WeightInfo for () {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn create_sponsored_account_with_delegation(s: u32, ) -> Weight {
Weight::from_ref_time(101_903_001 as u64)
// Standard Error: 20_372
.saturating_add(Weight::from_ref_time(36_736 as u64).saturating_mul(s as u64))
Weight::from_ref_time(100_477_842 as u64)
// Standard Error: 22_378
.saturating_add(Weight::from_ref_time(75_787 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(9 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
fn revoke_delegation_by_provider() -> Weight {
Weight::from_ref_time(23_668_000 as u64)
Weight::from_ref_time(23_048_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
Expand All @@ -224,24 +224,24 @@ impl WeightInfo for () {
// Storage: Msa PublicKeyToMsaId (r:2 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
fn add_public_key_to_msa() -> Weight {
Weight::from_ref_time(148_262_000 as u64)
Weight::from_ref_time(146_137_000 as u64)
.saturating_add(RocksDbWeight::get().reads(6 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:2 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
fn delete_msa_public_key() -> Weight {
Weight::from_ref_time(28_027_000 as u64)
Weight::from_ref_time(28_233_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:1)
// Storage: Msa PublicKeyCountForMsaId (r:1 w:1)
// Storage: Msa DelegatorAndProviderToDelegation (r:0 w:3)
fn retire_msa(s: u32, ) -> Weight {
Weight::from_ref_time(25_524_224 as u64)
// Standard Error: 7_198
.saturating_add(Weight::from_ref_time(966_961 as u64).saturating_mul(s as u64))
Weight::from_ref_time(24_340_226 as u64)
// Standard Error: 7_963
.saturating_add(Weight::from_ref_time(983_558 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
Expand All @@ -252,34 +252,34 @@ impl WeightInfo for () {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn grant_delegation(s: u32, ) -> Weight {
Weight::from_ref_time(94_280_633 as u64)
// Standard Error: 25_551
.saturating_add(Weight::from_ref_time(166_406 as u64).saturating_mul(s as u64))
Weight::from_ref_time(94_064_605 as u64)
// Standard Error: 17_235
.saturating_add(Weight::from_ref_time(106_239 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(7 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
fn revoke_delegation_by_delegator() -> Weight {
Weight::from_ref_time(23_253_000 as u64)
Weight::from_ref_time(22_841_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa ProviderToRegistryEntry (r:1 w:1)
fn create_provider(s: u32, ) -> Weight {
Weight::from_ref_time(19_721_155 as u64)
// Standard Error: 33_576
.saturating_add(Weight::from_ref_time(48_821 as u64).saturating_mul(s as u64))
Weight::from_ref_time(19_772_959 as u64)
// Standard Error: 6_405
.saturating_add(Weight::from_ref_time(12_940 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Msa PayloadSignatureBucketCount (r:1 w:1)
// Storage: Msa PayloadSignatureRegistry (r:0 w:1)
fn on_initialize(m: u32, ) -> Weight {
Weight::from_ref_time(7_997_000 as u64)
// Standard Error: 3_747
.saturating_add(Weight::from_ref_time(1_287_825 as u64).saturating_mul(m as u64))
Weight::from_ref_time(8_071_000 as u64)
// Standard Error: 4_326
.saturating_add(Weight::from_ref_time(1_275_241 as u64).saturating_mul(m as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(m as u64)))
Expand All @@ -288,19 +288,19 @@ impl WeightInfo for () {
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn grant_schema_permissions(s: u32, ) -> Weight {
Weight::from_ref_time(26_275_498 as u64)
// Standard Error: 7_094
.saturating_add(Weight::from_ref_time(65_560 as u64).saturating_mul(s as u64))
Weight::from_ref_time(26_412_674 as u64)
// Standard Error: 6_411
.saturating_add(Weight::from_ref_time(46_362 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Msa PublicKeyToMsaId (r:1 w:0)
// Storage: Msa DelegatorAndProviderToDelegation (r:1 w:1)
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:0)
fn revoke_schema_permissions(s: u32, ) -> Weight {
Weight::from_ref_time(27_367_931 as u64)
// Standard Error: 7_546
.saturating_add(Weight::from_ref_time(142_084 as u64).saturating_mul(s as u64))
Weight::from_ref_time(26_918_983 as u64)
// Standard Error: 7_846
.saturating_add(Weight::from_ref_time(125_625 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
Expand Down
18 changes: 9 additions & 9 deletions pallets/schemas/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_schemas
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-25, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-27, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -64,15 +64,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:1)
// Storage: Schemas Schemas (r:0 w:1)
fn create_schema(m: u32, ) -> Weight {
Weight::from_ref_time(19_264_000 as u64)
// Standard Error: 48
.saturating_add(Weight::from_ref_time(29_941 as u64).saturating_mul(m as u64))
Weight::from_ref_time(19_250_000 as u64)
// Standard Error: 42
.saturating_add(Weight::from_ref_time(28_557 as u64).saturating_mul(m as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Schemas GovernanceSchemaModelMaxBytes (r:0 w:1)
fn set_max_schema_model_bytes() -> Weight {
Weight::from_ref_time(13_394_000 as u64)
Weight::from_ref_time(13_564_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
Expand All @@ -83,15 +83,15 @@ impl WeightInfo for () {
// Storage: Schemas CurrentSchemaIdentifierMaximum (r:1 w:1)
// Storage: Schemas Schemas (r:0 w:1)
fn create_schema(m: u32, ) -> Weight {
Weight::from_ref_time(19_264_000 as u64)
// Standard Error: 48
.saturating_add(Weight::from_ref_time(29_941 as u64).saturating_mul(m as u64))
Weight::from_ref_time(19_250_000 as u64)
// Standard Error: 42
.saturating_add(Weight::from_ref_time(28_557 as u64).saturating_mul(m as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Schemas GovernanceSchemaModelMaxBytes (r:0 w:1)
fn set_max_schema_model_bytes() -> Weight {
Weight::from_ref_time(13_394_000 as u64)
Weight::from_ref_time(13_564_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
}
Loading

0 comments on commit c621ba3

Please sign in to comment.