I have the following benchmark that takes a very long time to complete. What measures can I take to improve the time it takes to run the benchmark without losing its effectiveness?
on_initialize {
let m in 1 .. 3_000;
for j in 0 .. m {
let mortality_block = 49 as u32;
let sig = generate_test_signature();
assert_ok!(Msa::<T>::register_signature(&sig, T::BlockNumber::from(mortality_block)));
}
let bucket_zero_iter = PayloadSignatureRegistry::<T>::iter_prefix(T::BlockNumber::from(0u32));
assert_eq!(bucket_zero_iter.count(), m as usize);
}: {
Msa::<T>::on_initialize(100u32.into());
} verify {
let bucket_zero_iter = PayloadSignatureRegistry::<T>::iter_prefix(T::BlockNumber::from(0u32));
assert_eq!(bucket_zero_iter.count(), 0 as usize);
}
Running with the following configurations:
- --steps 50
- --repeat 10
steps
andrepeat
. Maybe I'm wrong.