Add Benchmarking Instance to Pallets (#12026)

* benchmark instance

* add benchmark instance to conviction voting

* instance on bags list

* fmt
This commit is contained in:
Shawn Tabrizi
2022-08-13 16:07:10 +01:00
committed by GitHub
parent 2950340edc
commit e5ed764d39
3 changed files with 266 additions and 265 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ use frame_support::{assert_ok, traits::Get};
use frame_system::RawOrigin as SystemOrigin;
use sp_runtime::traits::One;
frame_benchmarking::benchmarks! {
frame_benchmarking::benchmarks_instance_pallet! {
rebag_non_terminal {
// An expensive case for rebag-ing (rebag a non-terminal node):
//
@@ -97,7 +97,7 @@ frame_benchmarking::benchmarks! {
// clear any pre-existing storage.
// NOTE: safe to call outside block production
List::<T>::unsafe_clear();
List::<T, I>::unsafe_clear();
// define our origin and destination thresholds.
let origin_bag_thresh = T::BagThresholds::get()[0];
@@ -146,7 +146,7 @@ frame_benchmarking::benchmarks! {
// clear any pre-existing storage.
// NOTE: safe to call outside block production
List::<T>::unsafe_clear();
List::<T, I>::unsafe_clear();
let bag_thresh = T::BagThresholds::get()[0];