Skip to content

Commit

Permalink
chore(pallets): update benchmark weights.rs file for all pallets (#959
Browse files Browse the repository at this point in the history
)
  • Loading branch information
renauter authored Feb 27, 2024
1 parent a0d30d0 commit f2a20ee
Show file tree
Hide file tree
Showing 10 changed files with 1,793 additions and 1,741 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/060_generate_benchmark_weights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
cargo build --profile=production --features runtime-benchmarks
- name: Run benchmarking
shell: bash
run: |
cd substrate-node
for weights_rs_file in ./pallets/*/src/weights.rs
Expand All @@ -65,10 +66,15 @@ jobs:
--output ./pallets/"$pal_name"/src/weights.rs \
--template ./.maintain/frame-weight-template.hbs
done
- name: Git config
run: |
git config --global --add safe.directory /__w/tfchain/tfchain
git status
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'chore(pallets): update benchmark `weights.rs` files ${date}'
message: 'chore: update benchmark `weights.rs` file for all pallets'
branch: ${{ github.ref_name }}
42 changes: 21 additions & 21 deletions substrate-node/pallets/pallet-burning/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
//! Autogenerated weights for pallet_burning
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ../target/release/tfchain
// ./target/production/tfchain
// benchmark
// pallet
// --chain=dev
// --pallet=pallet_burning
// --wasm-execution=compiled
// --pallet=pallet-burning
// --extrinsic=*
// --steps=50
// --repeat=20
// --execution=wasm
// --heap-pages=409
// --output
// ../pallets/pallet-burning/src/weights.rs
// ./pallets/pallet-burning/src/weights.rs
// --template
// ./frame-weight-template.hbs
// ./.maintain/frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -39,30 +39,30 @@ pub trait WeightInfo {
/// Weights for pallet_burning using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: BurningModule Burns (r:1 w:1)
/// Proof Skipped: BurningModule Burns (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: `BurningModule::Burns` (r:1 w:1)
/// Proof: `BurningModule::Burns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn burn_tft() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1627`
// Minimum execution time: 48_921_000 picoseconds.
Weight::from_parts(49_647_000, 1627)
// Measured: `109`
// Estimated: `1594`
// Minimum execution time: 42_280_000 picoseconds.
Weight::from_parts(42_982_000, 1594)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
/// Storage: BurningModule Burns (r:1 w:1)
/// Proof Skipped: BurningModule Burns (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: `BurningModule::Burns` (r:1 w:1)
/// Proof: `BurningModule::Burns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn burn_tft() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1627`
// Minimum execution time: 48_921_000 picoseconds.
Weight::from_parts(49_647_000, 1627)
// Measured: `109`
// Estimated: `1594`
// Minimum execution time: 42_280_000 picoseconds.
Weight::from_parts(42_982_000, 1594)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
}
214 changes: 107 additions & 107 deletions substrate-node/pallets/pallet-dao/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
//! Autogenerated weights for pallet_dao
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-02-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ragnar`, CPU: `Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
//! HOSTNAME: `3144932f6af7`, CPU: `AMD Ryzen 7 5800X 8-Core Processor`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ../target/release/tfchain
// ./target/production/tfchain
// benchmark
// pallet
// --chain=dev
// --pallet=pallet_dao
// --wasm-execution=compiled
// --pallet=pallet-dao
// --extrinsic=*
// --steps=50
// --repeat=20
// --execution=wasm
// --heap-pages=409
// --output
// ../pallets/pallet-dao/src/weights.rs
// ./pallets/pallet-dao/src/weights.rs
// --template
// ./frame-weight-template.hbs
// ./.maintain/frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -42,156 +42,156 @@ pub trait WeightInfo {
/// Weights for pallet_dao using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: CouncilMembership Members (r:1 w:0)
/// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
/// Storage: Dao ProposalOf (r:1 w:1)
/// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao ProposalCount (r:1 w:1)
/// Proof Skipped: Dao ProposalCount (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dao ProposalList (r:1 w:1)
/// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dao Voting (r:0 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Proposals (r:0 w:1)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: `CouncilMembership::Members` (r:1 w:0)
/// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Dao::ProposalOf` (r:1 w:1)
/// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalCount` (r:1 w:1)
/// Proof: `Dao::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalList` (r:1 w:1)
/// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Voting` (r:0 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Proposals` (r:0 w:1)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn propose() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Measured: `208`
// Estimated: `4687`
// Minimum execution time: 36_618_000 picoseconds.
Weight::from_parts(37_170_000, 4687)
// Minimum execution time: 60_124_000 picoseconds.
Weight::from_parts(61_897_000, 4687)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: TfgridModule Farms (r:1 w:0)
/// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured)
/// Storage: TfgridModule Twins (r:1 w:0)
/// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Proposals (r:1 w:0)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Voting (r:1 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao FarmWeight (r:1 w:0)
/// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured)
/// Storage: `TfgridModule::Farms` (r:1 w:0)
/// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TfgridModule::Twins` (r:1 w:0)
/// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Proposals` (r:1 w:0)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Voting` (r:1 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::FarmWeight` (r:1 w:0)
/// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `979`
// Estimated: `4444`
// Minimum execution time: 43_016_000 picoseconds.
Weight::from_parts(43_672_000, 4444)
// Minimum execution time: 35_097_000 picoseconds.
Weight::from_parts(35_647_000, 4444)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: CouncilMembership Members (r:1 w:0)
/// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
/// Storage: Dao Proposals (r:1 w:0)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Voting (r:1 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: `CouncilMembership::Members` (r:1 w:0)
/// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Dao::Proposals` (r:1 w:0)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Voting` (r:1 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn veto() -> Weight {
// Proof Size summary in bytes:
// Measured: `519`
// Measured: `487`
// Estimated: `4687`
// Minimum execution time: 31_000_000 picoseconds.
Weight::from_parts(31_599_000, 4687)
// Minimum execution time: 25_068_000 picoseconds.
Weight::from_parts(25_618_000, 4687)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: CouncilMembership Members (r:1 w:0)
/// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
/// Storage: Dao Voting (r:1 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao ProposalList (r:1 w:1)
/// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dao Proposals (r:0 w:1)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao ProposalOf (r:0 w:1)
/// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured)
/// Storage: `CouncilMembership::Members` (r:1 w:0)
/// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Dao::Voting` (r:1 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalList` (r:1 w:1)
/// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Proposals` (r:0 w:1)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalOf` (r:0 w:1)
/// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn close() -> Weight {
// Proof Size summary in bytes:
// Measured: `501`
// Measured: `469`
// Estimated: `4687`
// Minimum execution time: 40_325_000 picoseconds.
Weight::from_parts(43_227_000, 4687)
// Minimum execution time: 34_275_000 picoseconds.
Weight::from_parts(34_786_000, 4687)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
/// Storage: CouncilMembership Members (r:1 w:0)
/// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
/// Storage: Dao ProposalOf (r:1 w:1)
/// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao ProposalCount (r:1 w:1)
/// Proof Skipped: Dao ProposalCount (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dao ProposalList (r:1 w:1)
/// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dao Voting (r:0 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Proposals (r:0 w:1)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: `CouncilMembership::Members` (r:1 w:0)
/// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Dao::ProposalOf` (r:1 w:1)
/// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalCount` (r:1 w:1)
/// Proof: `Dao::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalList` (r:1 w:1)
/// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Voting` (r:0 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Proposals` (r:0 w:1)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn propose() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Measured: `208`
// Estimated: `4687`
// Minimum execution time: 36_618_000 picoseconds.
Weight::from_parts(37_170_000, 4687)
// Minimum execution time: 60_124_000 picoseconds.
Weight::from_parts(61_897_000, 4687)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
/// Storage: TfgridModule Farms (r:1 w:0)
/// Proof Skipped: TfgridModule Farms (max_values: None, max_size: None, mode: Measured)
/// Storage: TfgridModule Twins (r:1 w:0)
/// Proof Skipped: TfgridModule Twins (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Proposals (r:1 w:0)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Voting (r:1 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao FarmWeight (r:1 w:0)
/// Proof Skipped: Dao FarmWeight (max_values: None, max_size: None, mode: Measured)
/// Storage: `TfgridModule::Farms` (r:1 w:0)
/// Proof: `TfgridModule::Farms` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TfgridModule::Twins` (r:1 w:0)
/// Proof: `TfgridModule::Twins` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Proposals` (r:1 w:0)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Voting` (r:1 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::FarmWeight` (r:1 w:0)
/// Proof: `Dao::FarmWeight` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `979`
// Estimated: `4444`
// Minimum execution time: 43_016_000 picoseconds.
Weight::from_parts(43_672_000, 4444)
// Minimum execution time: 35_097_000 picoseconds.
Weight::from_parts(35_647_000, 4444)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: CouncilMembership Members (r:1 w:0)
/// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
/// Storage: Dao Proposals (r:1 w:0)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao Voting (r:1 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: `CouncilMembership::Members` (r:1 w:0)
/// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Dao::Proposals` (r:1 w:0)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Voting` (r:1 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn veto() -> Weight {
// Proof Size summary in bytes:
// Measured: `519`
// Measured: `487`
// Estimated: `4687`
// Minimum execution time: 31_000_000 picoseconds.
Weight::from_parts(31_599_000, 4687)
// Minimum execution time: 25_068_000 picoseconds.
Weight::from_parts(25_618_000, 4687)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: CouncilMembership Members (r:1 w:0)
/// Proof: CouncilMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen)
/// Storage: Dao Voting (r:1 w:1)
/// Proof Skipped: Dao Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao ProposalList (r:1 w:1)
/// Proof Skipped: Dao ProposalList (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Dao Proposals (r:0 w:1)
/// Proof Skipped: Dao Proposals (max_values: None, max_size: None, mode: Measured)
/// Storage: Dao ProposalOf (r:0 w:1)
/// Proof Skipped: Dao ProposalOf (max_values: None, max_size: None, mode: Measured)
/// Storage: `CouncilMembership::Members` (r:1 w:0)
/// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Dao::Voting` (r:1 w:1)
/// Proof: `Dao::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalList` (r:1 w:1)
/// Proof: `Dao::ProposalList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Dao::Proposals` (r:0 w:1)
/// Proof: `Dao::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dao::ProposalOf` (r:0 w:1)
/// Proof: `Dao::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn close() -> Weight {
// Proof Size summary in bytes:
// Measured: `501`
// Measured: `469`
// Estimated: `4687`
// Minimum execution time: 40_325_000 picoseconds.
Weight::from_parts(43_227_000, 4687)
// Minimum execution time: 34_275_000 picoseconds.
Weight::from_parts(34_786_000, 4687)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
}
}
Loading

0 comments on commit f2a20ee

Please sign in to comment.