Skip to content

Commit

Permalink
706 run benchmarks and update weights for pallet collective once benc…
Browse files Browse the repository at this point in the history
…hmarks are fixed for external pallets (#923)

# Goal
The goal of this PR is to enable the benchmarks for the collective
pallet.

Closes #706

Co-authored-by: Jenkins <[email protected]>
  • Loading branch information
rlaferla and Jenkins committed Jan 18, 2023
1 parent 1652ee4 commit 50a41eb
Show file tree
Hide file tree
Showing 17 changed files with 410 additions and 206 deletions.
2 changes: 1 addition & 1 deletion integration-tests/.mocharc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
parallel: false,
require: ['scaffolding/rootHooks.ts', 'scaffolding/extrinsicHelpers.ts'],
timeout: 500,
timeout: 2000,
}

global.mochaConfig = module.exports;
26 changes: 13 additions & 13 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-10, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-18, 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,19 +65,19 @@ 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(132_746_120 as u64)
// Standard Error: 45
.saturating_add(Weight::from_ref_time(1_111 as u64).saturating_mul(n as u64))
Weight::from_ref_time(127_313_236 as u64)
// Standard Error: 28
.saturating_add(Weight::from_ref_time(1_024 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(n: u32, ) -> Weight {
Weight::from_ref_time(114_551_408 as u64)
// Standard Error: 23
.saturating_add(Weight::from_ref_time(1_400 as u64).saturating_mul(n as u64))
Weight::from_ref_time(113_062_719 as u64)
// Standard Error: 19
.saturating_add(Weight::from_ref_time(1_191 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -90,19 +90,19 @@ 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(132_746_120 as u64)
// Standard Error: 45
.saturating_add(Weight::from_ref_time(1_111 as u64).saturating_mul(n as u64))
Weight::from_ref_time(127_313_236 as u64)
// Standard Error: 28
.saturating_add(Weight::from_ref_time(1_024 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(n: u32, ) -> Weight {
Weight::from_ref_time(114_551_408 as u64)
// Standard Error: 23
.saturating_add(Weight::from_ref_time(1_400 as u64).saturating_mul(n as u64))
Weight::from_ref_time(113_062_719 as u64)
// Standard Error: 19
.saturating_add(Weight::from_ref_time(1_191 as u64).saturating_mul(n 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-10, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-18, 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(21_377_000 as u64)
Weight::from_ref_time(21_957_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(104_628_718 as u64)
// Standard Error: 14_644
.saturating_add(Weight::from_ref_time(115_140 as u64).saturating_mul(s as u64))
Weight::from_ref_time(104_006_358 as u64)
// Standard Error: 12_206
.saturating_add(Weight::from_ref_time(109_868 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(24_965_000 as u64)
Weight::from_ref_time(25_469_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(151_809_000 as u64)
Weight::from_ref_time(148_757_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(30_751_000 as u64)
Weight::from_ref_time(31_035_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(28_729_839 as u64)
// Standard Error: 5_300
.saturating_add(Weight::from_ref_time(1_192_011 as u64).saturating_mul(s as u64))
Weight::from_ref_time(29_206_125 as u64)
// Standard Error: 5_253
.saturating_add(Weight::from_ref_time(1_202_751 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
Expand All @@ -134,34 +134,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(98_012_683 as u64)
// Standard Error: 14_092
.saturating_add(Weight::from_ref_time(85_838 as u64).saturating_mul(s as u64))
Weight::from_ref_time(97_779_990 as u64)
// Standard Error: 13_759
.saturating_add(Weight::from_ref_time(92_647 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(25_527_000 as u64)
Weight::from_ref_time(25_028_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(22_615_517 as u64)
// Standard Error: 17_857
.saturating_add(Weight::from_ref_time(20_877 as u64).saturating_mul(s as u64))
Weight::from_ref_time(22_660_556 as u64)
// Standard Error: 8_490
.saturating_add(Weight::from_ref_time(22_554 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(9_671_000 as u64)
// Standard Error: 8_795
.saturating_add(Weight::from_ref_time(1_669_262 as u64).saturating_mul(m as u64))
Weight::from_ref_time(9_421_000 as u64)
// Standard Error: 9_523
.saturating_add(Weight::from_ref_time(1_608_128 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 @@ -170,19 +170,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(29_330_910 as u64)
// Standard Error: 6_229
.saturating_add(Weight::from_ref_time(67_772 as u64).saturating_mul(s as u64))
Weight::from_ref_time(29_910_934 as u64)
// Standard Error: 6_464
.saturating_add(Weight::from_ref_time(52_512 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(30_111_798 as u64)
// Standard Error: 7_518
.saturating_add(Weight::from_ref_time(138_324 as u64).saturating_mul(s as u64))
Weight::from_ref_time(30_794_014 as u64)
// Standard Error: 8_364
.saturating_add(Weight::from_ref_time(129_178 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 @@ -194,7 +194,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(21_377_000 as u64)
Weight::from_ref_time(21_957_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
Expand All @@ -207,16 +207,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(104_628_718 as u64)
// Standard Error: 14_644
.saturating_add(Weight::from_ref_time(115_140 as u64).saturating_mul(s as u64))
Weight::from_ref_time(104_006_358 as u64)
// Standard Error: 12_206
.saturating_add(Weight::from_ref_time(109_868 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(24_965_000 as u64)
Weight::from_ref_time(25_469_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
Expand All @@ -225,24 +225,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(151_809_000 as u64)
Weight::from_ref_time(148_757_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(30_751_000 as u64)
Weight::from_ref_time(31_035_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(28_729_839 as u64)
// Standard Error: 5_300
.saturating_add(Weight::from_ref_time(1_192_011 as u64).saturating_mul(s as u64))
Weight::from_ref_time(29_206_125 as u64)
// Standard Error: 5_253
.saturating_add(Weight::from_ref_time(1_202_751 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
Expand All @@ -254,34 +254,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(98_012_683 as u64)
// Standard Error: 14_092
.saturating_add(Weight::from_ref_time(85_838 as u64).saturating_mul(s as u64))
Weight::from_ref_time(97_779_990 as u64)
// Standard Error: 13_759
.saturating_add(Weight::from_ref_time(92_647 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(25_527_000 as u64)
Weight::from_ref_time(25_028_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(22_615_517 as u64)
// Standard Error: 17_857
.saturating_add(Weight::from_ref_time(20_877 as u64).saturating_mul(s as u64))
Weight::from_ref_time(22_660_556 as u64)
// Standard Error: 8_490
.saturating_add(Weight::from_ref_time(22_554 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(9_671_000 as u64)
// Standard Error: 8_795
.saturating_add(Weight::from_ref_time(1_669_262 as u64).saturating_mul(m as u64))
Weight::from_ref_time(9_421_000 as u64)
// Standard Error: 9_523
.saturating_add(Weight::from_ref_time(1_608_128 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 @@ -290,19 +290,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(29_330_910 as u64)
// Standard Error: 6_229
.saturating_add(Weight::from_ref_time(67_772 as u64).saturating_mul(s as u64))
Weight::from_ref_time(29_910_934 as u64)
// Standard Error: 6_464
.saturating_add(Weight::from_ref_time(52_512 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(30_111_798 as u64)
// Standard Error: 7_518
.saturating_add(Weight::from_ref_time(138_324 as u64).saturating_mul(s as u64))
Weight::from_ref_time(30_794_014 as u64)
// Standard Error: 8_364
.saturating_add(Weight::from_ref_time(129_178 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-10, STEPS: `20`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-18, 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(4_265_406 as u64)
// Standard Error: 70
.saturating_add(Weight::from_ref_time(27_700 as u64).saturating_mul(m as u64))
Weight::from_ref_time(7_898_462 as u64)
// Standard Error: 55
.saturating_add(Weight::from_ref_time(27_559 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(14_392_000 as u64)
Weight::from_ref_time(14_768_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(4_265_406 as u64)
// Standard Error: 70
.saturating_add(Weight::from_ref_time(27_700 as u64).saturating_mul(m as u64))
Weight::from_ref_time(7_898_462 as u64)
// Standard Error: 55
.saturating_add(Weight::from_ref_time(27_559 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(14_392_000 as u64)
Weight::from_ref_time(14_768_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
}
Loading

0 comments on commit 50a41eb

Please sign in to comment.