From c621ba3ae57e4dd9c7605b8e50b52ba195d8532e Mon Sep 17 00:00:00 2001 From: Robert La Ferla Date: Mon, 30 Jan 2023 09:13:19 -0500 Subject: [PATCH] Added benchmarking for pallet-collator-selection. (#985) # Goal The goal of this PR is to add benchmarking for pallet-collator-selection. Closes #608 --------- Co-authored-by: Jenkins --- Cargo.lock | 1 + pallets/messages/src/weights.rs | 18 +-- pallets/msa/src/weights.rs | 106 +++++++++--------- pallets/schemas/src/weights.rs | 18 +-- runtime/common/Cargo.toml | 3 + runtime/common/src/constants.rs | 4 +- runtime/common/src/weights/mod.rs | 1 + runtime/common/src/weights/orml_vesting.rs | 16 +-- runtime/common/src/weights/pallet_balances.rs | 16 +-- .../src/weights/pallet_collator_selection.rs | 101 +++++++++++++++++ .../common/src/weights/pallet_collective.rs | 104 ++++++++--------- .../common/src/weights/pallet_democracy.rs | 78 ++++++------- runtime/common/src/weights/pallet_preimage.rs | 36 +++--- .../common/src/weights/pallet_scheduler.rs | 50 ++++----- runtime/common/src/weights/pallet_session.rs | 6 +- .../common/src/weights/pallet_timestamp.rs | 6 +- runtime/common/src/weights/pallet_treasury.rs | 22 ++-- runtime/common/src/weights/pallet_utility.rs | 24 ++-- runtime/frequency/src/lib.rs | 7 +- scripts/run_all_benchmarks.sh | 3 +- 20 files changed, 362 insertions(+), 258 deletions(-) create mode 100644 runtime/common/src/weights/pallet_collator_selection.rs diff --git a/Cargo.lock b/Cargo.lock index 205a73b039..961d4c19db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1002,6 +1002,7 @@ dependencies = [ "frame-system", "orml-vesting", "pallet-balances", + "pallet-collator-selection", "pallet-collective", "pallet-democracy", "pallet-preimage", diff --git a/pallets/messages/src/weights.rs b/pallets/messages/src/weights.rs index 3d309d9c41..721708535b 100644 --- a/pallets/messages/src/weights.rs +++ b/pallets/messages/src/weights.rs @@ -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: @@ -65,9 +65,9 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -75,7 +75,7 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -88,9 +88,9 @@ 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)) } @@ -98,7 +98,7 @@ impl WeightInfo for () { // 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)) } diff --git a/pallets/msa/src/weights.rs b/pallets/msa/src/weights.rs index 4871acfd11..a31cb5e142 100644 --- a/pallets/msa/src/weights.rs +++ b/pallets/msa/src/weights.rs @@ -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: @@ -74,7 +74,7 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -87,16 +87,16 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -105,14 +105,14 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -120,9 +120,9 @@ impl WeightInfo for SubstrateWeight { // 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))) } @@ -133,34 +133,34 @@ impl WeightInfo for SubstrateWeight { // 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))) @@ -169,9 +169,9 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -179,9 +179,9 @@ impl WeightInfo for SubstrateWeight { // 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)) } @@ -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)) } @@ -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)) } @@ -224,14 +224,14 @@ 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)) } @@ -239,9 +239,9 @@ impl WeightInfo for () { // 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))) } @@ -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))) @@ -288,9 +288,9 @@ 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)) } @@ -298,9 +298,9 @@ impl WeightInfo for () { // 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)) } diff --git a/pallets/schemas/src/weights.rs b/pallets/schemas/src/weights.rs index a75b469351..96f47e9291 100644 --- a/pallets/schemas/src/weights.rs +++ b/pallets/schemas/src/weights.rs @@ -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: @@ -64,15 +64,15 @@ impl WeightInfo for SubstrateWeight { // 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)) } } @@ -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)) } } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 1f7f188a1b..31f750645b 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -41,6 +41,7 @@ pallet-treasury = { git = "https://github.com/paritytech/substrate", default-fea pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } # cumulus cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.36" } +pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.36" } # ORML orml-vesting = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.36" } @@ -53,11 +54,13 @@ std = [ "frame-support/std", "cumulus-primitives-core/std", "pallet-democracy/std", + "pallet-collator-selection/std", "pallet-collective/std", ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", + "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", "pallet-democracy/try-runtime", "pallet-preimage/try-runtime", diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index bb76107274..5b87ca6376 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -271,8 +271,8 @@ pub type AuraMaxAuthorities = ConstU32<100_000>; // Example CollatorMaxInvulnerables are 16 in production(mainnet), // 5 in rococo testnet and 5 in rococo local parameter_types! { - pub CollatorMaxCandidates: u32 = prod_or_testnet_or_local!(0, 0, 0); - pub CollatorMinCandidates: u32 = prod_or_testnet_or_local!(0, 0, 0); + pub CollatorMaxCandidates: u32 = 50; + pub CollatorMinCandidates: u32 = 1; pub CollatorMaxInvulnerables: u32 = prod_or_testnet_or_local!(16, 5, 5); pub CollatorKickThreshold: BlockNumber = prod_or_testnet_or_local!( 6 * HOURS, diff --git a/runtime/common/src/weights/mod.rs b/runtime/common/src/weights/mod.rs index b9413fd712..ffbfc307e8 100644 --- a/runtime/common/src/weights/mod.rs +++ b/runtime/common/src/weights/mod.rs @@ -21,6 +21,7 @@ pub mod block_weights; pub mod extrinsic_weights; pub mod orml_vesting; pub mod pallet_balances; +pub mod pallet_collator_selection; pub mod pallet_collective; pub mod pallet_democracy; pub mod pallet_preimage; diff --git a/runtime/common/src/weights/orml_vesting.rs b/runtime/common/src/weights/orml_vesting.rs index 098e206a57..0d1fe85263 100644 --- a/runtime/common/src/weights/orml_vesting.rs +++ b/runtime/common/src/weights/orml_vesting.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for orml_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ impl orml_vesting::WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) // Storage: Balances Locks (r:1 w:1) fn vested_transfer() -> Weight { - Weight::from_ref_time(54_766_000 as u64) + Weight::from_ref_time(54_869_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -47,9 +47,9 @@ impl orml_vesting::WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) /// The range of component `i` is `[1, 50]`. fn claim(i: u32, ) -> Weight { - Weight::from_ref_time(35_013_352 as u64) - // Standard Error: 1_309 - .saturating_add(Weight::from_ref_time(79_176 as u64).saturating_mul(i as u64)) + Weight::from_ref_time(34_864_280 as u64) + // Standard Error: 1_468 + .saturating_add(Weight::from_ref_time(82_870 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -58,9 +58,9 @@ impl orml_vesting::WeightInfo for SubstrateWeight { // Storage: Vesting VestingSchedules (r:0 w:1) /// The range of component `i` is `[1, 50]`. fn update_vesting_schedules(i: u32, ) -> Weight { - Weight::from_ref_time(29_959_657 as u64) - // Standard Error: 1_203 - .saturating_add(Weight::from_ref_time(60_122 as u64).saturating_mul(i as u64)) + Weight::from_ref_time(30_069_540 as u64) + // Standard Error: 1_537 + .saturating_add(Weight::from_ref_time(61_240 as u64).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index 1b401537a0..bd405d4a98 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -35,43 +35,43 @@ pub struct SubstrateWeight(PhantomData); impl pallet_balances::WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - Weight::from_ref_time(41_500_000 as u64) + Weight::from_ref_time(41_153_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - Weight::from_ref_time(31_496_000 as u64) + Weight::from_ref_time(31_240_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - Weight::from_ref_time(22_584_000 as u64) + Weight::from_ref_time(23_026_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - Weight::from_ref_time(25_525_000 as u64) + Weight::from_ref_time(25_706_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - Weight::from_ref_time(40_252_000 as u64) + Weight::from_ref_time(40_535_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - Weight::from_ref_time(36_924_000 as u64) + Weight::from_ref_time(36_468_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - Weight::from_ref_time(19_933_000 as u64) + Weight::from_ref_time(19_985_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/common/src/weights/pallet_collator_selection.rs b/runtime/common/src/weights/pallet_collator_selection.rs new file mode 100644 index 0000000000..4b11686bf9 --- /dev/null +++ b/runtime/common/src/weights/pallet_collator_selection.rs @@ -0,0 +1,101 @@ +//! Autogenerated weights for pallet_collator_selection +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 + +// Executed Command: +// ./scripts/../target/production/frequency +// benchmark +// pallet +// --pallet +// pallet_collator_selection +// --extrinsic +// * +// --chain=frequency-bench +// --execution +// wasm +// --heap-pages=4096 +// --wasm-execution +// compiled +// --steps=50 +// --repeat=20 +// --output=./scripts/../runtime/common/src/weights/pallet_collator_selection.rs +// --template=./scripts/../.maintain/runtime-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weights for pallet_collator_selection using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl pallet_collator_selection::WeightInfo for SubstrateWeight { + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:0 w:1) + /// The range of component `b` is `[1, 16]`. + fn set_invulnerables(b: u32, ) -> Weight { + Weight::from_ref_time(17_740_791 as u64) + // Standard Error: 8_858 + .saturating_add(Weight::from_ref_time(2_798_811 as u64).saturating_mul(b as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64))) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: CollatorSelection DesiredCandidates (r:0 w:1) + fn set_desired_candidates() -> Weight { + Weight::from_ref_time(14_806_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: CollatorSelection CandidacyBond (r:0 w:1) + fn set_candidacy_bond() -> Weight { + Weight::from_ref_time(12_782_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection DesiredCandidates (r:1 w:0) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: CollatorSelection CandidacyBond (r:1 w:0) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// The range of component `c` is `[1, 49]`. + fn register_as_candidate(c: u32, ) -> Weight { + Weight::from_ref_time(44_949_353 as u64) + // Standard Error: 3_558 + .saturating_add(Weight::from_ref_time(408_175 as u64).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// The range of component `c` is `[2, 50]`. + fn leave_intent(c: u32, ) -> Weight { + Weight::from_ref_time(31_613_931 as u64) + // Standard Error: 3_069 + .saturating_add(Weight::from_ref_time(324_561 as u64).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + // Storage: System Account (r:2 w:2) + // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + fn note_author() -> Weight { + Weight::from_ref_time(32_159_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: CollatorSelection Candidates (r:1 w:1) + // Storage: CollatorSelection LastAuthoredBlock (r:50 w:1) + // Storage: System Account (r:1 w:1) + // Storage: CollatorSelection Invulnerables (r:1 w:0) + /// The range of component `r` is `[1, 50]`. + /// The range of component `c` is `[1, 50]`. + fn new_session(_r: u32, c: u32, ) -> Weight { + Weight::from_ref_time(17_936_000 as u64) + // Standard Error: 248_616 + .saturating_add(Weight::from_ref_time(9_940_553 as u64).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) + } +} diff --git a/runtime/common/src/weights/pallet_collective.rs b/runtime/common/src/weights/pallet_collective.rs index 2f729fee08..47b6adc1e2 100644 --- a/runtime/common/src/weights/pallet_collective.rs +++ b/runtime/common/src/weights/pallet_collective.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -44,11 +44,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `n` is `[0, 10]`. /// The range of component `p` is `[0, 25]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - Weight::from_ref_time(10_104_000 as u64) - // Standard Error: 55_275 - .saturating_add(Weight::from_ref_time(2_581_469 as u64).saturating_mul(m as u64)) - // Standard Error: 22_461 - .saturating_add(Weight::from_ref_time(3_028_546 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(10_321_000 as u64) + // Standard Error: 56_336 + .saturating_add(Weight::from_ref_time(2_621_241 as u64).saturating_mul(m as u64)) + // Standard Error: 22_893 + .saturating_add(Weight::from_ref_time(3_079_614 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -60,11 +60,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 10]`. fn execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(18_928_690 as u64) - // Standard Error: 12 - .saturating_add(Weight::from_ref_time(1_899 as u64).saturating_mul(b as u64)) - // Standard Error: 1_382 - .saturating_add(Weight::from_ref_time(31_232 as u64).saturating_mul(m as u64)) + Weight::from_ref_time(18_817_000 as u64) + // Standard Error: 14 + .saturating_add(Weight::from_ref_time(2_043 as u64).saturating_mul(b as u64)) + // Standard Error: 1_573 + .saturating_add(Weight::from_ref_time(24_139 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -74,11 +74,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 10]`. fn propose_execute(b: u32, m: u32, ) -> Weight { - Weight::from_ref_time(20_800_708 as u64) + Weight::from_ref_time(20_919_258 as u64) // Standard Error: 14 - .saturating_add(Weight::from_ref_time(1_886 as u64).saturating_mul(b as u64)) - // Standard Error: 1_588 - .saturating_add(Weight::from_ref_time(40_206 as u64).saturating_mul(m as u64)) + .saturating_add(Weight::from_ref_time(1_969 as u64).saturating_mul(b as u64)) + // Standard Error: 1_582 + .saturating_add(Weight::from_ref_time(22_774 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -93,13 +93,13 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `m` is `[2, 10]`. /// The range of component `p` is `[1, 25]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(25_384_776 as u64) - // Standard Error: 51 - .saturating_add(Weight::from_ref_time(3_130 as u64).saturating_mul(b as u64)) - // Standard Error: 6_134 - .saturating_add(Weight::from_ref_time(159_954 as u64).saturating_mul(m as u64)) - // Standard Error: 2_140 - .saturating_add(Weight::from_ref_time(262_145 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(25_011_139 as u64) + // Standard Error: 53 + .saturating_add(Weight::from_ref_time(3_169 as u64).saturating_mul(b as u64)) + // Standard Error: 6_337 + .saturating_add(Weight::from_ref_time(169_597 as u64).saturating_mul(m as u64)) + // Standard Error: 2_211 + .saturating_add(Weight::from_ref_time(261_138 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -108,9 +108,9 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `m` is `[5, 10]`. /// The range of component `m` is `[5, 10]`. fn vote(m: u32, ) -> Weight { - Weight::from_ref_time(25_581_882 as u64) - // Standard Error: 6_675 - .saturating_add(Weight::from_ref_time(95_668 as u64).saturating_mul(m as u64)) + Weight::from_ref_time(25_386_091 as u64) + // Standard Error: 6_421 + .saturating_add(Weight::from_ref_time(94_564 as u64).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -123,11 +123,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `m` is `[4, 10]`. /// The range of component `p` is `[1, 25]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(27_721_268 as u64) - // Standard Error: 7_843 - .saturating_add(Weight::from_ref_time(201_156 as u64).saturating_mul(m as u64)) - // Standard Error: 2_092 - .saturating_add(Weight::from_ref_time(234_989 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(27_989_524 as u64) + // Standard Error: 7_620 + .saturating_add(Weight::from_ref_time(180_603 as u64).saturating_mul(m as u64)) + // Standard Error: 2_032 + .saturating_add(Weight::from_ref_time(227_701 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -142,13 +142,13 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `m` is `[4, 10]`. /// The range of component `p` is `[1, 25]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(35_666_436 as u64) - // Standard Error: 53 - .saturating_add(Weight::from_ref_time(2_112 as u64).saturating_mul(b as u64)) - // Standard Error: 8_246 - .saturating_add(Weight::from_ref_time(102_175 as u64).saturating_mul(m as u64)) - // Standard Error: 2_206 - .saturating_add(Weight::from_ref_time(357_906 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(35_615_147 as u64) + // Standard Error: 56 + .saturating_add(Weight::from_ref_time(2_137 as u64).saturating_mul(b as u64)) + // Standard Error: 8_734 + .saturating_add(Weight::from_ref_time(146_888 as u64).saturating_mul(m as u64)) + // Standard Error: 2_336 + .saturating_add(Weight::from_ref_time(336_697 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -162,11 +162,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `m` is `[4, 10]`. /// The range of component `p` is `[1, 25]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(29_700_697 as u64) - // Standard Error: 6_767 - .saturating_add(Weight::from_ref_time(218_942 as u64).saturating_mul(m as u64)) - // Standard Error: 1_805 - .saturating_add(Weight::from_ref_time(236_269 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(30_487_865 as u64) + // Standard Error: 6_588 + .saturating_add(Weight::from_ref_time(176_502 as u64).saturating_mul(m as u64)) + // Standard Error: 1_757 + .saturating_add(Weight::from_ref_time(224_584 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -182,13 +182,13 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `m` is `[4, 10]`. /// The range of component `p` is `[1, 25]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - Weight::from_ref_time(37_471_029 as u64) - // Standard Error: 57 - .saturating_add(Weight::from_ref_time(1_922 as u64).saturating_mul(b as u64)) - // Standard Error: 8_812 - .saturating_add(Weight::from_ref_time(184_064 as u64).saturating_mul(m as u64)) - // Standard Error: 2_357 - .saturating_add(Weight::from_ref_time(365_580 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(38_105_430 as u64) + // Standard Error: 60 + .saturating_add(Weight::from_ref_time(1_800 as u64).saturating_mul(b as u64)) + // Standard Error: 9_270 + .saturating_add(Weight::from_ref_time(177_993 as u64).saturating_mul(m as u64)) + // Standard Error: 2_480 + .saturating_add(Weight::from_ref_time(341_085 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -198,9 +198,9 @@ impl pallet_collective::WeightInfo for SubstrateWeight< /// The range of component `p` is `[1, 25]`. /// The range of component `p` is `[1, 25]`. fn disapprove_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(20_292_477 as u64) - // Standard Error: 1_448 - .saturating_add(Weight::from_ref_time(212_330 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(20_439_653 as u64) + // Standard Error: 1_712 + .saturating_add(Weight::from_ref_time(192_962 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } diff --git a/runtime/common/src/weights/pallet_democracy.rs b/runtime/common/src/weights/pallet_democracy.rs index 2171b2d805..c5606448d2 100644 --- a/runtime/common/src/weights/pallet_democracy.rs +++ b/runtime/common/src/weights/pallet_democracy.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -38,13 +38,13 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(53_203_000 as u64) + Weight::from_ref_time(53_488_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy DepositOf (r:1 w:1) fn second() -> Weight { - Weight::from_ref_time(46_736_000 as u64) + Weight::from_ref_time(47_594_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -52,7 +52,7 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(58_476_000 as u64) + Weight::from_ref_time(59_109_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -60,14 +60,14 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(58_514_000 as u64) + Weight::from_ref_time(59_097_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - Weight::from_ref_time(21_462_000 as u64) + Weight::from_ref_time(21_407_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,39 +78,39 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(86_129_000 as u64) + Weight::from_ref_time(85_594_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose() -> Weight { - Weight::from_ref_time(16_581_000 as u64) + Weight::from_ref_time(16_174_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - Weight::from_ref_time(4_902_000 as u64) + Weight::from_ref_time(4_796_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - Weight::from_ref_time(4_798_000 as u64) + Weight::from_ref_time(4_696_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - Weight::from_ref_time(21_621_000 as u64) + Weight::from_ref_time(22_009_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) fn veto_external() -> Weight { - Weight::from_ref_time(26_768_000 as u64) + Weight::from_ref_time(26_775_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -118,13 +118,13 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(71_862_000 as u64) + Weight::from_ref_time(72_086_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - Weight::from_ref_time(13_375_000 as u64) + Weight::from_ref_time(13_847_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -132,9 +132,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(7_091_988 as u64) - // Standard Error: 5_217 - .saturating_add(Weight::from_ref_time(2_405_278 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(7_034_036 as u64) + // Standard Error: 4_954 + .saturating_add(Weight::from_ref_time(2_449_989 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -147,9 +147,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(9_469_911 as u64) - // Standard Error: 5_425 - .saturating_add(Weight::from_ref_time(2_409_722 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(9_633_745 as u64) + // Standard Error: 5_233 + .saturating_add(Weight::from_ref_time(2_459_881 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -159,9 +159,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(46_483_670 as u64) - // Standard Error: 6_751 - .saturating_add(Weight::from_ref_time(3_680_050 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(46_635_804 as u64) + // Standard Error: 6_680 + .saturating_add(Weight::from_ref_time(3_701_114 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -171,9 +171,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(24_790_485 as u64) - // Standard Error: 6_371 - .saturating_add(Weight::from_ref_time(3_634_225 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(24_901_768 as u64) + // Standard Error: 5_484 + .saturating_add(Weight::from_ref_time(3_673_093 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -181,7 +181,7 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(5_032_000 as u64) + Weight::from_ref_time(4_843_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -189,9 +189,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(29_948_278 as u64) - // Standard Error: 1_735 - .saturating_add(Weight::from_ref_time(92_460 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(30_533_305 as u64) + // Standard Error: 1_832 + .saturating_add(Weight::from_ref_time(94_733 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -200,9 +200,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(29_527_218 as u64) - // Standard Error: 1_073 - .saturating_add(Weight::from_ref_time(133_651 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(29_740_857 as u64) + // Standard Error: 1_295 + .saturating_add(Weight::from_ref_time(139_016 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -210,9 +210,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(17_081_243 as u64) - // Standard Error: 1_039 - .saturating_add(Weight::from_ref_time(123_385 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(17_169_182 as u64) + // Standard Error: 1_183 + .saturating_add(Weight::from_ref_time(124_563 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -220,9 +220,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(16_903_059 as u64) - // Standard Error: 1_062 - .saturating_add(Weight::from_ref_time(123_393 as u64).saturating_mul(r as u64)) + Weight::from_ref_time(17_120_555 as u64) + // Standard Error: 1_157 + .saturating_add(Weight::from_ref_time(124_983 as u64).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/common/src/weights/pallet_preimage.rs b/runtime/common/src/weights/pallet_preimage.rs index 410688964d..d0bd86a5c1 100644 --- a/runtime/common/src/weights/pallet_preimage.rs +++ b/runtime/common/src/weights/pallet_preimage.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -37,9 +37,9 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(29_290_000 as u64) + Weight::from_ref_time(29_578_000 as u64) // Standard Error: 3 - .saturating_add(Weight::from_ref_time(2_544 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_549 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -47,9 +47,9 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(20_032_000 as u64) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(2_556 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(20_218_000 as u64) + // Standard Error: 3 + .saturating_add(Weight::from_ref_time(2_566 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -57,66 +57,66 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage PreimageFor (r:0 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - Weight::from_ref_time(19_156_000 as u64) - // Standard Error: 6 - .saturating_add(Weight::from_ref_time(2_586 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(19_519_000 as u64) + // Standard Error: 3 + .saturating_add(Weight::from_ref_time(2_557 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - Weight::from_ref_time(49_639_000 as u64) + Weight::from_ref_time(50_121_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - Weight::from_ref_time(41_555_000 as u64) + Weight::from_ref_time(35_169_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - Weight::from_ref_time(36_245_000 as u64) + Weight::from_ref_time(30_937_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - Weight::from_ref_time(19_429_000 as u64) + Weight::from_ref_time(18_314_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - Weight::from_ref_time(26_319_000 as u64) + Weight::from_ref_time(26_855_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - Weight::from_ref_time(12_907_000 as u64) + Weight::from_ref_time(12_399_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - Weight::from_ref_time(35_151_000 as u64) + Weight::from_ref_time(33_042_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_unnoted_preimage() -> Weight { - Weight::from_ref_time(12_701_000 as u64) + Weight::from_ref_time(11_737_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - Weight::from_ref_time(12_710_000 as u64) + Weight::from_ref_time(12_440_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } diff --git a/runtime/common/src/weights/pallet_scheduler.rs b/runtime/common/src/weights/pallet_scheduler.rs index 4dad066fa6..3046467af8 100644 --- a/runtime/common/src/weights/pallet_scheduler.rs +++ b/runtime/common/src/weights/pallet_scheduler.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -35,52 +35,52 @@ pub struct SubstrateWeight(PhantomData); impl pallet_scheduler::WeightInfo for SubstrateWeight { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - Weight::from_ref_time(4_394_000 as u64) + Weight::from_ref_time(4_419_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { - Weight::from_ref_time(6_399_536 as u64) - // Standard Error: 1_464 - .saturating_add(Weight::from_ref_time(352_950 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(6_468_689 as u64) + // Standard Error: 1_445 + .saturating_add(Weight::from_ref_time(352_889 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - Weight::from_ref_time(9_695_000 as u64) + Weight::from_ref_time(9_655_000 as u64) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { - Weight::from_ref_time(21_320_000 as u64) - // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_382 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(21_619_000 as u64) + // Standard Error: 9 + .saturating_add(Weight::from_ref_time(1_560 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Scheduler Lookup (r:0 w:1) fn service_task_named() -> Weight { - Weight::from_ref_time(11_100_000 as u64) + Weight::from_ref_time(10_970_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_periodic() -> Weight { - Weight::from_ref_time(9_688_000 as u64) + Weight::from_ref_time(9_676_000 as u64) } fn execute_dispatch_signed() -> Weight { - Weight::from_ref_time(4_228_000 as u64) + Weight::from_ref_time(4_274_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - Weight::from_ref_time(4_143_000 as u64) + Weight::from_ref_time(4_151_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - Weight::from_ref_time(19_285_420 as u64) - // Standard Error: 1_968 - .saturating_add(Weight::from_ref_time(399_283 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(19_561_125 as u64) + // Standard Error: 2_046 + .saturating_add(Weight::from_ref_time(408_707 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -88,9 +88,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(18_688_239 as u64) - // Standard Error: 2_059 - .saturating_add(Weight::from_ref_time(385_810 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(19_111_663 as u64) + // Standard Error: 1_486 + .saturating_add(Weight::from_ref_time(390_682 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,9 +98,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(22_537_321 as u64) - // Standard Error: 2_620 - .saturating_add(Weight::from_ref_time(422_865 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(22_898_485 as u64) + // Standard Error: 2_760 + .saturating_add(Weight::from_ref_time(442_459 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -108,9 +108,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - Weight::from_ref_time(21_017_066 as u64) - // Standard Error: 1_796 - .saturating_add(Weight::from_ref_time(407_454 as u64).saturating_mul(s as u64)) + Weight::from_ref_time(21_205_930 as u64) + // Standard Error: 1_959 + .saturating_add(Weight::from_ref_time(419_194 as u64).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/common/src/weights/pallet_session.rs b/runtime/common/src/weights/pallet_session.rs index d38d075fc4..19b0d2b567 100644 --- a/runtime/common/src/weights/pallet_session.rs +++ b/runtime/common/src/weights/pallet_session.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -36,14 +36,14 @@ impl pallet_session::WeightInfo for SubstrateWeight // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - Weight::from_ref_time(21_151_000 as u64) + Weight::from_ref_time(21_271_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - Weight::from_ref_time(18_109_000 as u64) + Weight::from_ref_time(17_773_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index 7ad3be8bba..227f0d048f 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -35,11 +35,11 @@ pub struct SubstrateWeight(PhantomData); impl pallet_timestamp::WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - Weight::from_ref_time(7_900_000 as u64) + Weight::from_ref_time(7_922_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - Weight::from_ref_time(4_377_000 as u64) + Weight::from_ref_time(4_382_000 as u64) } } diff --git a/runtime/common/src/weights/pallet_treasury.rs b/runtime/common/src/weights/pallet_treasury.rs index f9295d2a99..41f0c80a86 100644 --- a/runtime/common/src/weights/pallet_treasury.rs +++ b/runtime/common/src/weights/pallet_treasury.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -34,19 +34,19 @@ use sp_std::marker::PhantomData; pub struct SubstrateWeight(PhantomData); impl pallet_treasury::WeightInfo for SubstrateWeight { fn spend() -> Weight { - Weight::from_ref_time(161_000 as u64) + Weight::from_ref_time(170_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - Weight::from_ref_time(27_820_000 as u64) + Weight::from_ref_time(27_371_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - Weight::from_ref_time(33_114_000 as u64) + Weight::from_ref_time(33_255_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -54,15 +54,15 @@ impl pallet_treasury::WeightInfo for SubstrateWeight // Storage: Treasury Approvals (r:1 w:1) /// The range of component `p` is `[0, 63]`. fn approve_proposal(p: u32, ) -> Weight { - Weight::from_ref_time(11_157_737 as u64) - // Standard Error: 1_307 - .saturating_add(Weight::from_ref_time(143_974 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(10_922_243 as u64) + // Standard Error: 1_319 + .saturating_add(Weight::from_ref_time(152_758 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - Weight::from_ref_time(7_972_000 as u64) + Weight::from_ref_time(8_156_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -72,9 +72,9 @@ impl pallet_treasury::WeightInfo for SubstrateWeight // Storage: Treasury Proposals (r:1 w:1) /// The range of component `p` is `[0, 64]`. fn on_initialize_proposals(p: u32, ) -> Weight { - Weight::from_ref_time(39_653_028 as u64) - // Standard Error: 19_549 - .saturating_add(Weight::from_ref_time(27_548_452 as u64).saturating_mul(p as u64)) + Weight::from_ref_time(38_806_776 as u64) + // Standard Error: 15_774 + .saturating_add(Weight::from_ref_time(27_152_956 as u64).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(3 as u64)) diff --git a/runtime/common/src/weights/pallet_utility.rs b/runtime/common/src/weights/pallet_utility.rs index 03d3120030..ee23dbeed0 100644 --- a/runtime/common/src/weights/pallet_utility.rs +++ b/runtime/common/src/weights/pallet_utility.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-01-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 // Executed Command: @@ -35,26 +35,26 @@ pub struct SubstrateWeight(PhantomData); impl pallet_utility::WeightInfo for SubstrateWeight { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - Weight::from_ref_time(15_331_581 as u64) - // Standard Error: 1_425 - .saturating_add(Weight::from_ref_time(3_693_010 as u64).saturating_mul(c as u64)) + Weight::from_ref_time(14_575_462 as u64) + // Standard Error: 1_224 + .saturating_add(Weight::from_ref_time(3_635_083 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - Weight::from_ref_time(6_266_000 as u64) + Weight::from_ref_time(6_058_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - Weight::from_ref_time(16_543_191 as u64) - // Standard Error: 1_472 - .saturating_add(Weight::from_ref_time(3_786_078 as u64).saturating_mul(c as u64)) + Weight::from_ref_time(14_924_024 as u64) + // Standard Error: 1_175 + .saturating_add(Weight::from_ref_time(3_721_020 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - Weight::from_ref_time(13_782_000 as u64) + Weight::from_ref_time(13_619_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - Weight::from_ref_time(12_016_281 as u64) - // Standard Error: 1_539 - .saturating_add(Weight::from_ref_time(3_704_025 as u64).saturating_mul(c as u64)) + Weight::from_ref_time(12_844_887 as u64) + // Standard Error: 1_163 + .saturating_add(Weight::from_ref_time(3_648_931 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index b4da6e7de8..0ddf86c78c 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -445,7 +445,7 @@ impl pallet_collective::Config for Runtime { type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = pallet_collective::weights::SubstrateWeight; + type WeightInfo = weights::pallet_collective::SubstrateWeight; } type TechnicalCommitteeCollective = pallet_collective::Instance2; @@ -457,8 +457,7 @@ impl pallet_collective::Config for Runtime { type MaxProposals = TCMaxProposals; type MaxMembers = TCMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; - // TODO: this uses default but we don't have weights yet. Issue: #608 - type WeightInfo = pallet_collective::weights::SubstrateWeight; + type WeightInfo = weights::pallet_collective::SubstrateWeight; } // see https://paritytech.github.io/substrate/master/pallet_democracy/pallet/trait.Config.html @@ -698,7 +697,7 @@ impl pallet_collator_selection::Config for Runtime { // Validate a user is registered type ValidatorRegistration = Session; - type WeightInfo = (); + type WeightInfo = weights::pallet_collator_selection::SubstrateWeight; } impl pallet_messages::Config for Runtime { diff --git a/scripts/run_all_benchmarks.sh b/scripts/run_all_benchmarks.sh index 71617f6313..667b9e8f8e 100755 --- a/scripts/run_all_benchmarks.sh +++ b/scripts/run_all_benchmarks.sh @@ -5,8 +5,7 @@ THIS_DIR=$( dirname -- "$0"; ) PROJECT=${1:-$THIS_DIR/..} RUNTIME=$PROJECT/target/production/frequency BENCHMARK="$RUNTIME benchmark pallet " -# TODO: pallet_collator_selection benchmarks fail due to errors in the actual benchmark code. See Issue #608 -EXTERNAL_PALLETS=(pallet_collective orml_vesting pallet_balances pallet_timestamp pallet_session pallet_scheduler pallet_democracy pallet_treasury pallet_preimage pallet_utility) +EXTERNAL_PALLETS=(pallet_collator_selection pallet_collective orml_vesting pallet_balances pallet_timestamp pallet_session pallet_scheduler pallet_democracy pallet_treasury pallet_preimage pallet_utility) CUSTOM_PALLETS=(messages msa schemas) function exit_err() { echo "❌ 💔" ; exit 1; }