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
+43 -43
View File
@@ -18,11 +18,11 @@
//! Autogenerated weights for pallet_multisig
//!
//! 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/multisig/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=LICENSE-APACHE2
// --header=HEADER-APACHE2
// --raw
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -62,16 +62,16 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn as_multi_threshold_1(z: u32, ) -> Weight {
(16_904_000 as Weight)
(16_534_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn as_multi_create(s: u32, z: u32, ) -> Weight {
(30_172_000 as Weight)
// Standard Error: 0
.saturating_add((142_000 as Weight).saturating_mul(s as Weight))
(30_917_000 as Weight)
// Standard Error: 1_000
.saturating_add((131_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
@@ -81,9 +81,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Multisig Calls (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
(33_039_000 as Weight)
(33_570_000 as Weight)
// Standard Error: 1_000
.saturating_add((140_000 as Weight).saturating_mul(s as Weight))
.saturating_add((138_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
@@ -91,9 +91,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
}
// Storage: Multisig Multisigs (r:1 w:1)
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
(20_752_000 as Weight)
(21_051_000 as Weight)
// Standard Error: 0
.saturating_add((133_000 as Weight).saturating_mul(s as Weight))
.saturating_add((126_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
@@ -102,7 +102,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
(33_198_000 as Weight)
(32_581_000 as Weight)
// Standard Error: 1_000
.saturating_add((135_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
@@ -114,9 +114,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
(39_407_000 as Weight)
(39_215_000 as Weight)
// Standard Error: 1_000
.saturating_add((230_000 as Weight).saturating_mul(s as Weight))
.saturating_add((221_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
@@ -125,18 +125,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn approve_as_multi_create(s: u32, ) -> Weight {
(28_365_000 as Weight)
(28_572_000 as Weight)
// Standard Error: 1_000
.saturating_add((156_000 as Weight).saturating_mul(s as Weight))
.saturating_add((146_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
fn approve_as_multi_approve(s: u32, ) -> Weight {
(17_960_000 as Weight)
(18_032_000 as Weight)
// Standard Error: 0
.saturating_add((158_000 as Weight).saturating_mul(s as Weight))
.saturating_add((151_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -144,18 +144,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn approve_as_multi_complete(s: u32, ) -> Weight {
(56_920_000 as Weight)
(56_353_000 as Weight)
// Standard Error: 1_000
.saturating_add((243_000 as Weight).saturating_mul(s as Weight))
.saturating_add((239_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
fn cancel_as_multi(s: u32, ) -> Weight {
(45_336_000 as Weight)
// Standard Error: 1_000
.saturating_add((155_000 as Weight).saturating_mul(s as Weight))
(44_544_000 as Weight)
// Standard Error: 0
.saturating_add((158_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
@@ -164,16 +164,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// For backwards compatibility and tests
impl WeightInfo for () {
fn as_multi_threshold_1(z: u32, ) -> Weight {
(16_904_000 as Weight)
(16_534_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn as_multi_create(s: u32, z: u32, ) -> Weight {
(30_172_000 as Weight)
// Standard Error: 0
.saturating_add((142_000 as Weight).saturating_mul(s as Weight))
(30_917_000 as Weight)
// Standard Error: 1_000
.saturating_add((131_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
@@ -183,9 +183,9 @@ impl WeightInfo for () {
// Storage: Multisig Calls (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
(33_039_000 as Weight)
(33_570_000 as Weight)
// Standard Error: 1_000
.saturating_add((140_000 as Weight).saturating_mul(s as Weight))
.saturating_add((138_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
@@ -193,9 +193,9 @@ impl WeightInfo for () {
}
// Storage: Multisig Multisigs (r:1 w:1)
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
(20_752_000 as Weight)
(21_051_000 as Weight)
// Standard Error: 0
.saturating_add((133_000 as Weight).saturating_mul(s as Weight))
.saturating_add((126_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
@@ -204,7 +204,7 @@ impl WeightInfo for () {
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
(33_198_000 as Weight)
(32_581_000 as Weight)
// Standard Error: 1_000
.saturating_add((135_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
@@ -216,9 +216,9 @@ impl WeightInfo for () {
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
(39_407_000 as Weight)
(39_215_000 as Weight)
// Standard Error: 1_000
.saturating_add((230_000 as Weight).saturating_mul(s as Weight))
.saturating_add((221_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
@@ -227,18 +227,18 @@ impl WeightInfo for () {
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
fn approve_as_multi_create(s: u32, ) -> Weight {
(28_365_000 as Weight)
(28_572_000 as Weight)
// Standard Error: 1_000
.saturating_add((156_000 as Weight).saturating_mul(s as Weight))
.saturating_add((146_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
fn approve_as_multi_approve(s: u32, ) -> Weight {
(17_960_000 as Weight)
(18_032_000 as Weight)
// Standard Error: 0
.saturating_add((158_000 as Weight).saturating_mul(s as Weight))
.saturating_add((151_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -246,18 +246,18 @@ impl WeightInfo for () {
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn approve_as_multi_complete(s: u32, ) -> Weight {
(56_920_000 as Weight)
(56_353_000 as Weight)
// Standard Error: 1_000
.saturating_add((243_000 as Weight).saturating_mul(s as Weight))
.saturating_add((239_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
fn cancel_as_multi(s: u32, ) -> Weight {
(45_336_000 as Weight)
// Standard Error: 1_000
.saturating_add((155_000 as Weight).saturating_mul(s as Weight))
(44_544_000 as Weight)
// Standard Error: 0
.saturating_add((158_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}