Add production profile to substrate-wasm-builder (#10747)

* Add production profile to wasm builder

* Fix profile detection

* Apply suggestions from code review

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

* Replace panic! by println! + exit

* Default to `release` for wasm on debug builds

* Replaced unwrap by expect

* Update all weights

Rerun on the bm2 server.

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

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Alexander Theißen
2022-01-31 15:16:26 +01:00
committed by GitHub
parent 21d5573b25
commit f3168c3fa0
35 changed files with 1943 additions and 1833 deletions
+25 -21
View File
@@ -18,11 +18,11 @@
//! Autogenerated weights for pallet_child_bounties
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-01-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/optimized/substrate
// ./target/production/substrate
// benchmark
// --chain=dev
// --steps=50
@@ -32,7 +32,7 @@
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./weights-optimized/frame/child-bounties/src//weights.rs
// --output=./frame/child-bounties/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=HEADER-APACHE2
// --raw
@@ -65,8 +65,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: ChildBounties ChildBountyCount (r:1 w:1)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
// Storage: ChildBounties ChildBounties (r:0 w:1)
fn add_child_bounty(_d: u32, ) -> Weight {
(44_997_000 as Weight)
fn add_child_bounty(d: u32, ) -> Weight {
(44_503_000 as Weight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(d as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -74,7 +76,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: ChildBounties ChildBounties (r:1 w:1)
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
fn propose_curator() -> Weight {
(11_848_000 as Weight)
(11_661_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
@@ -82,7 +84,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: ChildBounties ChildBounties (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn accept_curator() -> Weight {
(24_490_000 as Weight)
(24_162_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
@@ -90,14 +92,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Bounties Bounties (r:1 w:0)
// Storage: System Account (r:1 w:1)
fn unassign_curator() -> Weight {
(28_605_000 as Weight)
(27_924_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Bounties Bounties (r:1 w:0)
// Storage: ChildBounties ChildBounties (r:1 w:1)
fn award_child_bounty() -> Weight {
(19_471_000 as Weight)
(19_332_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -106,7 +108,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
fn claim_child_bounty() -> Weight {
(60_737_000 as Weight)
(60_363_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -117,7 +119,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System Account (r:2 w:2)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
fn close_child_bounty_added() -> Weight {
(43_120_000 as Weight)
(42_415_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -128,7 +130,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
fn close_child_bounty_active() -> Weight {
(53_610_000 as Weight)
(52_743_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
@@ -142,8 +144,10 @@ impl WeightInfo for () {
// Storage: ChildBounties ChildBountyCount (r:1 w:1)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
// Storage: ChildBounties ChildBounties (r:0 w:1)
fn add_child_bounty(_d: u32, ) -> Weight {
(44_997_000 as Weight)
fn add_child_bounty(d: u32, ) -> Weight {
(44_503_000 as Weight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(d as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
@@ -151,7 +155,7 @@ impl WeightInfo for () {
// Storage: ChildBounties ChildBounties (r:1 w:1)
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
fn propose_curator() -> Weight {
(11_848_000 as Weight)
(11_661_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
@@ -159,7 +163,7 @@ impl WeightInfo for () {
// Storage: ChildBounties ChildBounties (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn accept_curator() -> Weight {
(24_490_000 as Weight)
(24_162_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
@@ -167,14 +171,14 @@ impl WeightInfo for () {
// Storage: Bounties Bounties (r:1 w:0)
// Storage: System Account (r:1 w:1)
fn unassign_curator() -> Weight {
(28_605_000 as Weight)
(27_924_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: Bounties Bounties (r:1 w:0)
// Storage: ChildBounties ChildBounties (r:1 w:1)
fn award_child_bounty() -> Weight {
(19_471_000 as Weight)
(19_332_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -183,7 +187,7 @@ impl WeightInfo for () {
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
fn claim_child_bounty() -> Weight {
(60_737_000 as Weight)
(60_363_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
@@ -194,7 +198,7 @@ impl WeightInfo for () {
// Storage: System Account (r:2 w:2)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
fn close_child_bounty_added() -> Weight {
(43_120_000 as Weight)
(42_415_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
@@ -205,7 +209,7 @@ impl WeightInfo for () {
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
fn close_child_bounty_active() -> Weight {
(53_610_000 as Weight)
(52_743_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(7 as Weight))
}