mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Benchmark Offences Pallet (#5411)
* Add initial report_ofence bench. * Remove unused imports * Style nit * Add nominators * Remove logs. * Nits. * Add nominators param. * Reorg, comment. * Remove whitespaces. * Apply review suggestion: move benchmark to own crate. * Remove import. * Remove line. * Add feature flag. * Pass can_report. * Cleaning up. * More cleaning
This commit is contained in:
@@ -887,10 +887,14 @@ impl_runtime_apis! {
|
||||
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
||||
// we need these two lines below.
|
||||
use pallet_session_benchmarking::Module as SessionBench;
|
||||
use pallet_offences_benchmarking::Module as OffencesBench;
|
||||
|
||||
impl pallet_session_benchmarking::Trait for Runtime {}
|
||||
impl pallet_offences_benchmarking::Trait for Runtime {}
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&pallet, &benchmark, &lowest_range_values, &highest_range_values, &steps, repeat);
|
||||
|
||||
add_benchmark!(params, batches, b"balances", Balances);
|
||||
add_benchmark!(params, batches, b"collective", Council);
|
||||
add_benchmark!(params, batches, b"democracy", Democracy);
|
||||
@@ -902,6 +906,8 @@ impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, b"treasury", Treasury);
|
||||
add_benchmark!(params, batches, b"utility", Utility);
|
||||
add_benchmark!(params, batches, b"vesting", Vesting);
|
||||
add_benchmark!(params, batches, b"offences", OffencesBench::<Runtime>);
|
||||
|
||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||
Ok(batches)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user