Skip to content

Commit

Permalink
Merge pull request #2990 from autonomys/update-consensus-benchmark
Browse files Browse the repository at this point in the history
Update consensus runtime transaction benchmark
  • Loading branch information
NingLin-P committed Sep 13, 2024
2 parents 84434a9 + 0f6f9d9 commit 83e13b5
Show file tree
Hide file tree
Showing 9 changed files with 619 additions and 581 deletions.
428 changes: 222 additions & 206 deletions crates/pallet-domains/src/weights.rs

Large diffs are not rendered by default.

42 changes: 22 additions & 20 deletions crates/pallet-rewards/src/weights.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@

//! Autogenerated weights for pallet_rewards
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-03-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `nazar-pc`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
//! HOSTNAME: `Ubuntu-2404-noble-amd64-base`, CPU: `Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
// target/release/subspace-node
// ./target/release/subspace-node
// benchmark
// pallet
// --chain=dev
// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm
// --genesis-builder=runtime
// --steps=50
// --repeat=20
// --pallet=pallet_rewards
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --output=crates/pallet-rewards/src/weights.rs
// --template=frame-weight-template.hbs
// --output=./weights/pallet-rewards.rs
// --template=./frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -45,12 +47,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_978_000 picoseconds.
Weight::from_parts(5_191_890, 0)
// Standard Error: 400
.saturating_add(Weight::from_parts(4_397, 0).saturating_mul(p.into()))
// Standard Error: 400
.saturating_add(Weight::from_parts(4_865, 0).saturating_mul(v.into()))
// Minimum execution time: 4_580_000 picoseconds.
Weight::from_parts(4_871_200, 0)
// Standard Error: 581
.saturating_add(Weight::from_parts(6_370, 0).saturating_mul(p.into()))
// Standard Error: 581
.saturating_add(Weight::from_parts(9_390, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
}
Expand All @@ -67,12 +69,12 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_978_000 picoseconds.
Weight::from_parts(5_191_890, 0)
// Standard Error: 400
.saturating_add(Weight::from_parts(4_397, 0).saturating_mul(p.into()))
// Standard Error: 400
.saturating_add(Weight::from_parts(4_865, 0).saturating_mul(v.into()))
// Minimum execution time: 4_580_000 picoseconds.
Weight::from_parts(4_871_200, 0)
// Standard Error: 581
.saturating_add(Weight::from_parts(6_370, 0).saturating_mul(p.into()))
// Standard Error: 581
.saturating_add(Weight::from_parts(9_390, 0).saturating_mul(v.into()))
.saturating_add(ParityDbWeight::get().writes(2_u64))
}
}
58 changes: 30 additions & 28 deletions crates/pallet-runtime-configs/src/weights.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@

//! Autogenerated weights for pallet_runtime_configs
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-09-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `nazar-pc`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
//! HOSTNAME: `Ubuntu-2404-noble-amd64-base`, CPU: `Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024

// Executed Command:
// target/release/subspace-node
// ./target/release/subspace-node
// benchmark
// pallet
// --chain=dev
// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm
// --genesis-builder=runtime
// --steps=50
// --repeat=20
// --pallet=pallet_runtime_configs
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --output=crates/pallet-runtime-configs/src/weights.rs
// --template=frame-weight-template.hbs
// --output=./weights/pallet-runtime-configs.rs
// --template=./frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -38,14 +40,14 @@ pub trait WeightInfo {
/// Weights for pallet_runtime_configs using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: `RuntimeConfigs::EnableBalanceTransfers` (r:0 w:1)
/// Proof: `RuntimeConfigs::EnableBalanceTransfers` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `RuntimeConfigs::EnableDomains` (r:0 w:1)
/// Proof: `RuntimeConfigs::EnableDomains` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
fn set_enable_domains() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_640_000 picoseconds.
Weight::from_parts(5_782_000, 0)
// Minimum execution time: 3_227_000 picoseconds.
Weight::from_parts(3_380_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:0 w:1)
Expand All @@ -54,8 +56,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_726_000 picoseconds.
Weight::from_parts(5_890_000, 0)
// Minimum execution time: 3_003_000 picoseconds.
Weight::from_parts(3_122_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `RuntimeConfigs::EnableBalanceTransfers` (r:0 w:1)
Expand All @@ -64,8 +66,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_726_000 picoseconds.
Weight::from_parts(5_890_000, 0)
// Minimum execution time: 3_078_000 picoseconds.
Weight::from_parts(3_216_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `RuntimeConfigs::EnableNonRootCalls` (r:0 w:1)
Expand All @@ -74,22 +76,22 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_726_000 picoseconds.
Weight::from_parts(5_890_000, 0)
// Minimum execution time: 3_095_000 picoseconds.
Weight::from_parts(3_249_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
/// Storage: `RuntimeConfigs::EnableBalanceTransfers` (r:0 w:1)
/// Proof: `RuntimeConfigs::EnableBalanceTransfers` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `RuntimeConfigs::EnableDomains` (r:0 w:1)
/// Proof: `RuntimeConfigs::EnableDomains` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
fn set_enable_domains() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_640_000 picoseconds.
Weight::from_parts(5_782_000, 0)
// Minimum execution time: 3_227_000 picoseconds.
Weight::from_parts(3_380_000, 0)
.saturating_add(ParityDbWeight::get().writes(1_u64))
}
/// Storage: `RuntimeConfigs::EnableDynamicCostOfStorage` (r:0 w:1)
Expand All @@ -98,8 +100,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_726_000 picoseconds.
Weight::from_parts(5_890_000, 0)
// Minimum execution time: 3_003_000 picoseconds.
Weight::from_parts(3_122_000, 0)
.saturating_add(ParityDbWeight::get().writes(1_u64))
}
/// Storage: `RuntimeConfigs::EnableBalanceTransfers` (r:0 w:1)
Expand All @@ -108,8 +110,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_726_000 picoseconds.
Weight::from_parts(5_890_000, 0)
// Minimum execution time: 3_078_000 picoseconds.
Weight::from_parts(3_216_000, 0)
.saturating_add(ParityDbWeight::get().writes(1_u64))
}
/// Storage: `RuntimeConfigs::EnableNonRootCalls` (r:0 w:1)
Expand All @@ -118,8 +120,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_726_000 picoseconds.
Weight::from_parts(5_890_000, 0)
// Minimum execution time: 3_095_000 picoseconds.
Weight::from_parts(3_249_000, 0)
.saturating_add(ParityDbWeight::get().writes(1_u64))
}
}
2 changes: 1 addition & 1 deletion crates/pallet-subspace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ pub mod pallet {

/// Enable rewards for blocks and votes at specified block height.
#[pallet::call_index(4)]
#[pallet::weight(< T as Config >::WeightInfo::enable_rewards())]
#[pallet::weight(< T as Config >::WeightInfo::enable_rewards_at())]
pub fn enable_rewards_at(
origin: OriginFor<T>,
enable_rewards_at: EnableRewardsAt<BlockNumberFor<T>>,
Expand Down
Loading

0 comments on commit 83e13b5

Please sign in to comment.