mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
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:
@@ -224,8 +224,25 @@ pub trait ElectionDataProvider<AccountId, BlockNumber> {
|
||||
_voters: Vec<(AccountId, VoteWeight, Vec<AccountId>)>,
|
||||
_targets: Vec<AccountId>,
|
||||
_target_stake: Option<VoteWeight>,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/// Utility function only to be used in benchmarking scenarios, to be implemented optionally,
|
||||
/// else a noop.
|
||||
///
|
||||
/// Same as `put_snapshot`, but can add a single voter one by one.
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
fn add_voter(_voter: AccountId, _weight: VoteWeight, _targets: Vec<AccountId>) {}
|
||||
|
||||
/// Utility function only to be used in benchmarking scenarios, to be implemented optionally,
|
||||
/// else a noop.
|
||||
///
|
||||
/// Same as `put_snapshot`, but can add a single voter one by one.
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
fn add_target(_target: AccountId) {}
|
||||
|
||||
/// Clear all voters and targets.
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
fn clear() {}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
|
||||
Reference in New Issue
Block a user