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
@@ -18,11 +18,11 @@
//! Autogenerated weights for pallet_transaction_storage
//!
//! 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-31, 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/transaction-storage/src//weights.rs
// --output=./frame/transaction-storage/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=HEADER-APACHE2
// --raw
@@ -74,7 +74,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
fn renew() -> Weight {
(43_773_000 as Weight)
(41_286_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -84,7 +84,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System ParentHash (r:1 w:0)
// Storage: TransactionStorage Transactions (r:1 w:0)
fn check_proof_max() -> Weight {
(139_490_000 as Weight)
(136_957_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -112,7 +112,7 @@ impl WeightInfo for () {
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
fn renew() -> Weight {
(43_773_000 as Weight)
(41_286_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -122,7 +122,7 @@ impl WeightInfo for () {
// Storage: System ParentHash (r:1 w:0)
// Storage: TransactionStorage Transactions (r:1 w:0)
fn check_proof_max() -> Weight {
(139_490_000 as Weight)
(136_957_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}