fix : remove _{ } syntax from benchmark macro (#7822)

* commented use of common

* hack to pass tests

* another hack

* remove all commented code

* fix the easy tests

* temp hack

* follow through comma hack until better solution

* patch macro

* missed one

* update benchmarks

* update docs

* fix docs

* removed too much

* fix changes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Stanly JohnsonandShawn Tabrizi authored and GitHub committed 2021-01-06 01:51:02 +00:00
1 parent 3f629f743b
commit d2ac8bd941
28 files changed
+74 -185

No files matched your search

+2 -7
View File
@@ -655,20 +655,15 @@ mod benchmarking {
use frame_system::RawOrigin;
benchmarks!{
_ {
// Define a common range for `b`.
let b in 1 .. 1000 => ();
}
// This will measure the execution time of `accumulate_dummy` for b in [1..1000] range.
accumulate_dummy {
let b in ...;
let b in 1 .. 1000;
let caller = account("caller", 0, 0);
}: _ (RawOrigin::Signed(caller), b.into())
// This will measure the execution time of `set_dummy` for b in [1..1000] range.
set_dummy {
let b in ...;
let b in 1 .. 1000;
}: set_dummy (RawOrigin::Root, b.into())
// This will measure the execution time of `set_dummy` for b in [1..10] range.