Make election benchmarks more *memory-aware* (#9286)

* Make benchmarks a bit better with mem

* Make election benchmarks more *memory-aware*

* Fix a few errors

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Manually fix the weights

* Update lock file

* remove dupe

* Fix tests

* cargo update pwasm

Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Kian Paimani
2021-07-09 21:55:31 +02:00
committed by GitHub
parent 9fc86cb55f
commit 3850a43323
11 changed files with 356 additions and 148 deletions
@@ -85,7 +85,8 @@ pub struct BenchmarkCmd {
#[structopt(long)]
pub output_analysis: Option<String>,
/// Set the heap pages while running benchmarks.
/// Set the heap pages while running benchmarks. If not set, the default value from the client
/// is used.
#[structopt(long)]
pub heap_pages: Option<u64>,
@@ -93,7 +94,8 @@ pub struct BenchmarkCmd {
#[structopt(long)]
pub no_verify: bool,
/// Display and run extra benchmarks that would otherwise not be needed for weight construction.
/// Display and run extra benchmarks that would otherwise not be needed for weight
/// construction.
#[structopt(long)]
pub extra: bool,
@@ -120,7 +122,7 @@ pub struct BenchmarkCmd {
value_name = "METHOD",
possible_values = &WasmExecutionMethod::variants(),
case_insensitive = true,
default_value = "Interpreted"
default_value = "compiled"
)]
pub wasm_method: WasmExecutionMethod,