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
+31 -31
View File
@@ -18,11 +18,11 @@
//! Autogenerated weights for pallet_membership
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-01-31, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/lto-fat-cg1/substrate
// ./target/production/substrate
// benchmark
// --chain=dev
// --steps=50
@@ -34,7 +34,7 @@
// --heap-pages=4096
// --output=./frame/membership/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=LICENSE-APACHE2
// --header=HEADER-APACHE2
// --raw
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -63,9 +63,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn add_member(m: u32, ) -> Weight {
(14_403_000 as Weight)
// Standard Error: 1_000
.saturating_add((94_000 as Weight).saturating_mul(m as Weight))
(14_884_000 as Weight)
// Standard Error: 0
.saturating_add((95_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
@@ -75,9 +75,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn remove_member(m: u32, ) -> Weight {
(17_005_000 as Weight)
(17_612_000 as Weight)
// Standard Error: 0
.saturating_add((90_000 as Weight).saturating_mul(m as Weight))
.saturating_add((86_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
@@ -87,7 +87,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn swap_member(m: u32, ) -> Weight {
(17_210_000 as Weight)
(17_580_000 as Weight)
// Standard Error: 0
.saturating_add((98_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
@@ -99,9 +99,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn reset_member(m: u32, ) -> Weight {
(17_425_000 as Weight)
(17_610_000 as Weight)
// Standard Error: 0
.saturating_add((194_000 as Weight).saturating_mul(m as Weight))
.saturating_add((199_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
@@ -111,9 +111,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn change_key(m: u32, ) -> Weight {
(17_948_000 as Weight)
(18_208_000 as Weight)
// Standard Error: 0
.saturating_add((95_000 as Weight).saturating_mul(m as Weight))
.saturating_add((96_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
@@ -121,18 +121,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TechnicalMembership Prime (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn set_prime(m: u32, ) -> Weight {
(4_579_000 as Weight)
(4_661_000 as Weight)
// Standard Error: 0
.saturating_add((71_000 as Weight).saturating_mul(m as Weight))
.saturating_add((70_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: TechnicalMembership Prime (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn clear_prime(m: u32, ) -> Weight {
(1_481_000 as Weight)
(1_574_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
.saturating_add((1_000 as Weight).saturating_mul(m as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
}
@@ -144,9 +144,9 @@ impl WeightInfo for () {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn add_member(m: u32, ) -> Weight {
(14_403_000 as Weight)
// Standard Error: 1_000
.saturating_add((94_000 as Weight).saturating_mul(m as Weight))
(14_884_000 as Weight)
// Standard Error: 0
.saturating_add((95_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
@@ -156,9 +156,9 @@ impl WeightInfo for () {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn remove_member(m: u32, ) -> Weight {
(17_005_000 as Weight)
(17_612_000 as Weight)
// Standard Error: 0
.saturating_add((90_000 as Weight).saturating_mul(m as Weight))
.saturating_add((86_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
@@ -168,7 +168,7 @@ impl WeightInfo for () {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn swap_member(m: u32, ) -> Weight {
(17_210_000 as Weight)
(17_580_000 as Weight)
// Standard Error: 0
.saturating_add((98_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
@@ -180,9 +180,9 @@ impl WeightInfo for () {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn reset_member(m: u32, ) -> Weight {
(17_425_000 as Weight)
(17_610_000 as Weight)
// Standard Error: 0
.saturating_add((194_000 as Weight).saturating_mul(m as Weight))
.saturating_add((199_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
@@ -192,9 +192,9 @@ impl WeightInfo for () {
// Storage: TechnicalCommittee Members (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn change_key(m: u32, ) -> Weight {
(17_948_000 as Weight)
(18_208_000 as Weight)
// Standard Error: 0
.saturating_add((95_000 as Weight).saturating_mul(m as Weight))
.saturating_add((96_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
@@ -202,18 +202,18 @@ impl WeightInfo for () {
// Storage: TechnicalMembership Prime (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn set_prime(m: u32, ) -> Weight {
(4_579_000 as Weight)
(4_661_000 as Weight)
// Standard Error: 0
.saturating_add((71_000 as Weight).saturating_mul(m as Weight))
.saturating_add((70_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: TechnicalMembership Prime (r:0 w:1)
// Storage: TechnicalCommittee Prime (r:0 w:1)
fn clear_prime(m: u32, ) -> Weight {
(1_481_000 as Weight)
(1_574_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
.saturating_add((1_000 as Weight).saturating_mul(m as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
}