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
+91 -91
View File
@@ -18,11 +18,11 @@
//! Autogenerated weights for pallet_identity
//!
//! 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/identity/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=LICENSE-APACHE2
// --header=HEADER-APACHE2
// --raw
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -69,19 +69,19 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity Registrars (r:1 w:1)
fn add_registrar(r: u32, ) -> Weight {
(12_513_000 as Weight)
// Standard Error: 4_000
.saturating_add((257_000 as Weight).saturating_mul(r as Weight))
(13_150_000 as Weight)
// Standard Error: 3_000
.saturating_add((253_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Identity IdentityOf (r:1 w:1)
fn set_identity(r: u32, x: u32, ) -> Weight {
(27_904_000 as Weight)
(27_745_000 as Weight)
// Standard Error: 7_000
.saturating_add((215_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((294_000 as Weight).saturating_mul(x as Weight))
.saturating_add((210_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 1_000
.saturating_add((289_000 as Weight).saturating_mul(x as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -89,9 +89,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity SubsOf (r:1 w:1)
// Storage: Identity SuperOf (r:1 w:1)
fn set_subs_new(s: u32, ) -> Weight {
(24_530_000 as Weight)
(25_184_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_914_000 as Weight).saturating_mul(s as Weight))
.saturating_add((2_722_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
@@ -101,9 +101,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity SubsOf (r:1 w:1)
// Storage: Identity SuperOf (r:0 w:1)
fn set_subs_old(p: u32, ) -> Weight {
(23_957_000 as Weight)
(24_144_000 as Weight)
// Standard Error: 0
.saturating_add((954_000 as Weight).saturating_mul(p as Weight))
.saturating_add((890_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
@@ -112,13 +112,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity IdentityOf (r:1 w:1)
// Storage: Identity SuperOf (r:0 w:100)
fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
(31_213_000 as Weight)
(32_167_000 as Weight)
// Standard Error: 8_000
.saturating_add((99_000 as Weight).saturating_mul(r as Weight))
.saturating_add((46_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((931_000 as Weight).saturating_mul(s as Weight))
.saturating_add((875_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((188_000 as Weight).saturating_mul(x as Weight))
.saturating_add((184_000 as Weight).saturating_mul(x as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
@@ -126,27 +126,27 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity Registrars (r:1 w:0)
// Storage: Identity IdentityOf (r:1 w:1)
fn request_judgement(r: u32, x: u32, ) -> Weight {
(30_691_000 as Weight)
// Standard Error: 4_000
.saturating_add((269_000 as Weight).saturating_mul(r as Weight))
(30_009_000 as Weight)
// Standard Error: 3_000
.saturating_add((287_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((338_000 as Weight).saturating_mul(x as Weight))
.saturating_add((331_000 as Weight).saturating_mul(x as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Identity IdentityOf (r:1 w:1)
fn cancel_request(r: u32, x: u32, ) -> Weight {
(27_356_000 as Weight)
(28_195_000 as Weight)
// Standard Error: 3_000
.saturating_add((179_000 as Weight).saturating_mul(r as Weight))
.saturating_add((137_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((335_000 as Weight).saturating_mul(x as Weight))
.saturating_add((328_000 as Weight).saturating_mul(x as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Identity Registrars (r:1 w:1)
fn set_fee(r: u32, ) -> Weight {
(4_761_000 as Weight)
(5_080_000 as Weight)
// Standard Error: 2_000
.saturating_add((202_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
@@ -154,28 +154,28 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
}
// Storage: Identity Registrars (r:1 w:1)
fn set_account_id(r: u32, ) -> Weight {
(4_801_000 as Weight)
// Standard Error: 3_000
.saturating_add((211_000 as Weight).saturating_mul(r as Weight))
(5_298_000 as Weight)
// Standard Error: 2_000
.saturating_add((195_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Identity Registrars (r:1 w:1)
fn set_fields(r: u32, ) -> Weight {
(4_756_000 as Weight)
(5_263_000 as Weight)
// Standard Error: 2_000
.saturating_add((204_000 as Weight).saturating_mul(r as Weight))
.saturating_add((191_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Identity Registrars (r:1 w:0)
// Storage: Identity IdentityOf (r:1 w:1)
fn provide_judgement(r: u32, x: u32, ) -> Weight {
(21_047_000 as Weight)
(21_511_000 as Weight)
// Standard Error: 3_000
.saturating_add((246_000 as Weight).saturating_mul(r as Weight))
.saturating_add((219_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((341_000 as Weight).saturating_mul(x as Weight))
.saturating_add((327_000 as Weight).saturating_mul(x as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -184,11 +184,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System Account (r:1 w:1)
// Storage: Identity SuperOf (r:0 w:100)
fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight {
(41_324_000 as Weight)
// Standard Error: 7_000
.saturating_add((192_000 as Weight).saturating_mul(r as Weight))
(40_654_000 as Weight)
// Standard Error: 6_000
.saturating_add((179_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((951_000 as Weight).saturating_mul(s as Weight))
.saturating_add((908_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))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
@@ -197,18 +197,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity SuperOf (r:1 w:1)
// Storage: Identity SubsOf (r:1 w:1)
fn add_sub(s: u32, ) -> Weight {
(31_405_000 as Weight)
(31_573_000 as Weight)
// Standard Error: 1_000
.saturating_add((160_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(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Identity IdentityOf (r:1 w:0)
// Storage: Identity SuperOf (r:1 w:1)
fn rename_sub(s: u32, ) -> Weight {
(10_622_000 as Weight)
(10_452_000 as Weight)
// Standard Error: 0
.saturating_add((47_000 as Weight).saturating_mul(s as Weight))
.saturating_add((45_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))
}
@@ -216,18 +216,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Identity SuperOf (r:1 w:1)
// Storage: Identity SubsOf (r:1 w:1)
fn remove_sub(s: u32, ) -> Weight {
(32_765_000 as Weight)
(32_711_000 as Weight)
// Standard Error: 1_000
.saturating_add((158_000 as Weight).saturating_mul(s as Weight))
.saturating_add((150_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Identity SuperOf (r:1 w:1)
// Storage: Identity SubsOf (r:1 w:1)
fn quit_sub(s: u32, ) -> Weight {
(21_925_000 as Weight)
// Standard Error: 1_000
.saturating_add((156_000 as Weight).saturating_mul(s as Weight))
(21_975_000 as Weight)
// Standard Error: 0
.saturating_add((149_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))
}
@@ -237,19 +237,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
impl WeightInfo for () {
// Storage: Identity Registrars (r:1 w:1)
fn add_registrar(r: u32, ) -> Weight {
(12_513_000 as Weight)
// Standard Error: 4_000
.saturating_add((257_000 as Weight).saturating_mul(r as Weight))
(13_150_000 as Weight)
// Standard Error: 3_000
.saturating_add((253_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Identity IdentityOf (r:1 w:1)
fn set_identity(r: u32, x: u32, ) -> Weight {
(27_904_000 as Weight)
(27_745_000 as Weight)
// Standard Error: 7_000
.saturating_add((215_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((294_000 as Weight).saturating_mul(x as Weight))
.saturating_add((210_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 1_000
.saturating_add((289_000 as Weight).saturating_mul(x as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -257,9 +257,9 @@ impl WeightInfo for () {
// Storage: Identity SubsOf (r:1 w:1)
// Storage: Identity SuperOf (r:1 w:1)
fn set_subs_new(s: u32, ) -> Weight {
(24_530_000 as Weight)
(25_184_000 as Weight)
// Standard Error: 1_000
.saturating_add((2_914_000 as Weight).saturating_mul(s as Weight))
.saturating_add((2_722_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
@@ -269,9 +269,9 @@ impl WeightInfo for () {
// Storage: Identity SubsOf (r:1 w:1)
// Storage: Identity SuperOf (r:0 w:1)
fn set_subs_old(p: u32, ) -> Weight {
(23_957_000 as Weight)
(24_144_000 as Weight)
// Standard Error: 0
.saturating_add((954_000 as Weight).saturating_mul(p as Weight))
.saturating_add((890_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
@@ -280,13 +280,13 @@ impl WeightInfo for () {
// Storage: Identity IdentityOf (r:1 w:1)
// Storage: Identity SuperOf (r:0 w:100)
fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight {
(31_213_000 as Weight)
(32_167_000 as Weight)
// Standard Error: 8_000
.saturating_add((99_000 as Weight).saturating_mul(r as Weight))
.saturating_add((46_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((931_000 as Weight).saturating_mul(s as Weight))
.saturating_add((875_000 as Weight).saturating_mul(s as Weight))
// Standard Error: 0
.saturating_add((188_000 as Weight).saturating_mul(x as Weight))
.saturating_add((184_000 as Weight).saturating_mul(x as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
@@ -294,27 +294,27 @@ impl WeightInfo for () {
// Storage: Identity Registrars (r:1 w:0)
// Storage: Identity IdentityOf (r:1 w:1)
fn request_judgement(r: u32, x: u32, ) -> Weight {
(30_691_000 as Weight)
// Standard Error: 4_000
.saturating_add((269_000 as Weight).saturating_mul(r as Weight))
(30_009_000 as Weight)
// Standard Error: 3_000
.saturating_add((287_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((338_000 as Weight).saturating_mul(x as Weight))
.saturating_add((331_000 as Weight).saturating_mul(x as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Identity IdentityOf (r:1 w:1)
fn cancel_request(r: u32, x: u32, ) -> Weight {
(27_356_000 as Weight)
(28_195_000 as Weight)
// Standard Error: 3_000
.saturating_add((179_000 as Weight).saturating_mul(r as Weight))
.saturating_add((137_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((335_000 as Weight).saturating_mul(x as Weight))
.saturating_add((328_000 as Weight).saturating_mul(x as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Identity Registrars (r:1 w:1)
fn set_fee(r: u32, ) -> Weight {
(4_761_000 as Weight)
(5_080_000 as Weight)
// Standard Error: 2_000
.saturating_add((202_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
@@ -322,28 +322,28 @@ impl WeightInfo for () {
}
// Storage: Identity Registrars (r:1 w:1)
fn set_account_id(r: u32, ) -> Weight {
(4_801_000 as Weight)
// Standard Error: 3_000
.saturating_add((211_000 as Weight).saturating_mul(r as Weight))
(5_298_000 as Weight)
// Standard Error: 2_000
.saturating_add((195_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Identity Registrars (r:1 w:1)
fn set_fields(r: u32, ) -> Weight {
(4_756_000 as Weight)
(5_263_000 as Weight)
// Standard Error: 2_000
.saturating_add((204_000 as Weight).saturating_mul(r as Weight))
.saturating_add((191_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Identity Registrars (r:1 w:0)
// Storage: Identity IdentityOf (r:1 w:1)
fn provide_judgement(r: u32, x: u32, ) -> Weight {
(21_047_000 as Weight)
(21_511_000 as Weight)
// Standard Error: 3_000
.saturating_add((246_000 as Weight).saturating_mul(r as Weight))
.saturating_add((219_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((341_000 as Weight).saturating_mul(x as Weight))
.saturating_add((327_000 as Weight).saturating_mul(x as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -352,11 +352,11 @@ impl WeightInfo for () {
// Storage: System Account (r:1 w:1)
// Storage: Identity SuperOf (r:0 w:100)
fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight {
(41_324_000 as Weight)
// Standard Error: 7_000
.saturating_add((192_000 as Weight).saturating_mul(r as Weight))
(40_654_000 as Weight)
// Standard Error: 6_000
.saturating_add((179_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 0
.saturating_add((951_000 as Weight).saturating_mul(s as Weight))
.saturating_add((908_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
@@ -365,18 +365,18 @@ impl WeightInfo for () {
// Storage: Identity SuperOf (r:1 w:1)
// Storage: Identity SubsOf (r:1 w:1)
fn add_sub(s: u32, ) -> Weight {
(31_405_000 as Weight)
(31_573_000 as Weight)
// Standard Error: 1_000
.saturating_add((160_000 as Weight).saturating_mul(s as Weight))
.saturating_add((151_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: Identity IdentityOf (r:1 w:0)
// Storage: Identity SuperOf (r:1 w:1)
fn rename_sub(s: u32, ) -> Weight {
(10_622_000 as Weight)
(10_452_000 as Weight)
// Standard Error: 0
.saturating_add((47_000 as Weight).saturating_mul(s as Weight))
.saturating_add((45_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -384,18 +384,18 @@ impl WeightInfo for () {
// Storage: Identity SuperOf (r:1 w:1)
// Storage: Identity SubsOf (r:1 w:1)
fn remove_sub(s: u32, ) -> Weight {
(32_765_000 as Weight)
(32_711_000 as Weight)
// Standard Error: 1_000
.saturating_add((158_000 as Weight).saturating_mul(s as Weight))
.saturating_add((150_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: Identity SuperOf (r:1 w:1)
// Storage: Identity SubsOf (r:1 w:1)
fn quit_sub(s: u32, ) -> Weight {
(21_925_000 as Weight)
// Standard Error: 1_000
.saturating_add((156_000 as Weight).saturating_mul(s as Weight))
(21_975_000 as Weight)
// Standard Error: 0
.saturating_add((149_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}