mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Support Component-less Runtime Benchmarks (#6645)
* Update benchmarking macro for no components * Handle output when error * skip when empty * Update analysis for zero components * add back trace logs * Apply suggestions from code review * remove mean value, and use median value * Add note * Use standard for loop * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -165,6 +165,10 @@ benchmarks!{
|
||||
verify {
|
||||
ensure!(m[0] == 0, "You forgot to sort!")
|
||||
}
|
||||
|
||||
no_components {
|
||||
let caller = account::<T::AccountId>("caller", 0, 0);
|
||||
}: set_value(RawOrigin::Signed(caller), 0)
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -240,5 +244,6 @@ fn benchmarks_generate_unit_tests() {
|
||||
assert_ok!(test_benchmark_sort_vector::<Test>());
|
||||
assert_err!(test_benchmark_bad_origin::<Test>(), "Bad origin");
|
||||
assert_err!(test_benchmark_bad_verify::<Test>(), "You forgot to sort!");
|
||||
assert_ok!(test_benchmark_no_components::<Test>());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user