mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 13:21:01 +00:00
Improve paras runtime BenchBuilder api (#4318)
* Improve paras runtime `BenchBuilder` api * fix * Improve doc comment * Some doc improvemens' * Use setters and no params for build * +nightly-2021-10-29 fmt * Clean up some comments * Simplify set_code_upgrade * Accept a slice for set_dispute_sessions * Doc comments * Spelling * use impl AsRef * Prepare for merge * fmt Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
This commit is contained in:
@@ -29,7 +29,8 @@ benchmarks! {
|
||||
let v in 10..BenchBuilder::<T>::fallback_max_validators();
|
||||
|
||||
let scenario = BenchBuilder::<T>::new()
|
||||
.build(Default::default(), &[2], None);
|
||||
.set_dispute_sessions(&[2])
|
||||
.build();
|
||||
|
||||
let mut benchmark = scenario.data.clone();
|
||||
let dispute = benchmark.disputes.pop().unwrap();
|
||||
@@ -60,7 +61,8 @@ benchmarks! {
|
||||
.collect();
|
||||
|
||||
let scenario = BenchBuilder::<T>::new()
|
||||
.build(cores_with_backed, &[1], None);
|
||||
.set_backed_and_concluding_cores(cores_with_backed)
|
||||
.build();
|
||||
|
||||
let mut benchmark = scenario.data.clone();
|
||||
let bitfield = benchmark.bitfields.pop().unwrap();
|
||||
@@ -104,7 +106,8 @@ benchmarks! {
|
||||
.collect();
|
||||
|
||||
let scenario = BenchBuilder::<T>::new()
|
||||
.build(cores_with_backed.clone(), &[1], None);
|
||||
.set_backed_and_concluding_cores(cores_with_backed.clone())
|
||||
.build();
|
||||
|
||||
let mut benchmark = scenario.data.clone();
|
||||
|
||||
@@ -156,7 +159,9 @@ benchmarks! {
|
||||
.collect();
|
||||
|
||||
let scenario = BenchBuilder::<T>::new()
|
||||
.build(cores_with_backed.clone(), &[1], Some(v));
|
||||
.set_backed_and_concluding_cores(cores_with_backed.clone())
|
||||
.set_code_upgrade(v)
|
||||
.build();
|
||||
|
||||
let mut benchmark = scenario.data.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user