Skip to content

Commit

Permalink
Create Script to Run All Benchmarks (paritytech#11493)
Browse files Browse the repository at this point in the history
* Create run_all_benchmarks.sh

* Update run_all_benchmarks.sh

* Update run_all_benchmarks.sh

* Review fixes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update scripts/run_all_benchmarks.sh

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* typo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* add default for $1

* Typo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update run_all_benchmarks.sh

* new weights on benchmarking machine

* prefer `--chain=dev`

* fix compile

* fix command

* fmt

* dont use square brackets

* Extend doc

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove +nightly

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add error file an run execute everything optimistically

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
  • Loading branch information
3 people authored and godcodehunter committed Jun 22, 2022
1 parent 21f060d commit c7766f9
Show file tree
Hide file tree
Showing 43 changed files with 2,291 additions and 2,143 deletions.
144 changes: 63 additions & 81 deletions frame/assets/src/weights.rs

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions frame/bags-list/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@
//! Autogenerated weights for pallet_bags_list
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-05-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_bags_list
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./.maintain/frame-weight-template.hbs
// --output=./frame/bags-list/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=HEADER-APACHE2
// --raw

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -59,7 +57,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList ListNodes (r:4 w:4)
// Storage: BagsList ListBags (r:1 w:1)
fn rebag_non_terminal() -> Weight {
(46_965_000 as Weight)
(51_415_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
Expand All @@ -68,7 +66,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
fn rebag_terminal() -> Weight {
(45_952_000 as Weight)
(49_459_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
Expand All @@ -78,7 +76,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: BagsList ListBags (r:1 w:1)
fn put_in_front_of() -> Weight {
(52_928_000 as Weight)
(53_682_000 as Weight)
.saturating_add(T::DbWeight::get().reads(10 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
Expand All @@ -91,7 +89,7 @@ impl WeightInfo for () {
// Storage: BagsList ListNodes (r:4 w:4)
// Storage: BagsList ListBags (r:1 w:1)
fn rebag_non_terminal() -> Weight {
(46_965_000 as Weight)
(51_415_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
}
Expand All @@ -100,7 +98,7 @@ impl WeightInfo for () {
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
fn rebag_terminal() -> Weight {
(45_952_000 as Weight)
(49_459_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
}
Expand All @@ -110,7 +108,7 @@ impl WeightInfo for () {
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: BagsList ListBags (r:1 w:1)
fn put_in_front_of() -> Weight {
(52_928_000 as Weight)
(53_682_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
Expand Down
36 changes: 17 additions & 19 deletions frame/balances/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@
//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-05-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./.maintain/frame-weight-template.hbs
// --output=./frame/balances/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=HEADER-APACHE2
// --raw

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -60,43 +58,43 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(34_200_000 as Weight)
(35_278_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(27_263_000 as Weight)
(27_822_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(17_425_000 as Weight)
(17_943_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(19_979_000 as Weight)
(20_974_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(34_783_000 as Weight)
(36_078_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(31_620_000 as Weight)
(32_794_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(15_750_000 as Weight)
(16_227_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand All @@ -106,43 +104,43 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
impl WeightInfo for () {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(34_200_000 as Weight)
(35_278_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(27_263_000 as Weight)
(27_822_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(17_425_000 as Weight)
(17_943_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(19_979_000 as Weight)
(20_974_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(34_783_000 as Weight)
(36_078_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(31_620_000 as Weight)
(32_794_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(15_750_000 as Weight)
(16_227_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
Expand Down
56 changes: 29 additions & 27 deletions frame/benchmarking/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@
//! Autogenerated weights for frame_benchmarking
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-05-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=frame_benchmarking
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./.maintain/frame-weight-template.hbs
// --output=./frame/benchmarking/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=HEADER-APACHE2
// --raw

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -60,75 +58,79 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn addition(_i: u32, ) -> Weight {
(106_000 as Weight)
(126_000 as Weight)
}
fn subtraction(_i: u32, ) -> Weight {
(111_000 as Weight)
(121_000 as Weight)
}
fn multiplication(_i: u32, ) -> Weight {
(119_000 as Weight)
(132_000 as Weight)
}
fn division(_i: u32, ) -> Weight {
(111_000 as Weight)
(122_000 as Weight)
}
fn hashing(_i: u32, ) -> Weight {
(21_203_386_000 as Weight)
fn hashing(i: u32, ) -> Weight {
(21_059_079_000 as Weight)
// Standard Error: 117_000
.saturating_add((1_121_000 as Weight).saturating_mul(i as Weight))
}
fn sr25519_verification(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 6_000
.saturating_add((47_077_000 as Weight).saturating_mul(i as Weight))
(425_000 as Weight)
// Standard Error: 7_000
.saturating_add((47_172_000 as Weight).saturating_mul(i as Weight))
}
// Storage: Skipped Metadata (r:0 w:0)
fn storage_read(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 3_000
.saturating_add((1_963_000 as Weight).saturating_mul(i as Weight))
.saturating_add((2_118_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
}
// Storage: Skipped Metadata (r:0 w:0)
fn storage_write(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((364_000 as Weight).saturating_mul(i as Weight))
.saturating_add((373_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
fn addition(_i: u32, ) -> Weight {
(106_000 as Weight)
(126_000 as Weight)
}
fn subtraction(_i: u32, ) -> Weight {
(111_000 as Weight)
(121_000 as Weight)
}
fn multiplication(_i: u32, ) -> Weight {
(119_000 as Weight)
(132_000 as Weight)
}
fn division(_i: u32, ) -> Weight {
(111_000 as Weight)
(122_000 as Weight)
}
fn hashing(_i: u32, ) -> Weight {
(21_203_386_000 as Weight)
fn hashing(i: u32, ) -> Weight {
(21_059_079_000 as Weight)
// Standard Error: 117_000
.saturating_add((1_121_000 as Weight).saturating_mul(i as Weight))
}
fn sr25519_verification(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 6_000
.saturating_add((47_077_000 as Weight).saturating_mul(i as Weight))
(425_000 as Weight)
// Standard Error: 7_000
.saturating_add((47_172_000 as Weight).saturating_mul(i as Weight))
}
// Storage: Skipped Metadata (r:0 w:0)
fn storage_read(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 3_000
.saturating_add((1_963_000 as Weight).saturating_mul(i as Weight))
.saturating_add((2_118_000 as Weight).saturating_mul(i as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
}
// Storage: Skipped Metadata (r:0 w:0)
fn storage_write(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((364_000 as Weight).saturating_mul(i as Weight))
.saturating_add((373_000 as Weight).saturating_mul(i as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
}
Loading

0 comments on commit c7766f9

Please sign in to comment.