substrate
substrate copied to clipboard
migrate new benchmarking syntax from `frame_support::benchmarking` to `frame_benchmarking::v2`
Description
This migrates all of the new proc-macro-based benchmarking code to live under frame_benchmarking::v2
.
This also migrates the old tt-macro-based benchmarking syntax from frame_benchmarking
to frame_benchmarking::v1
, but keeps a public export of v1::*
at the root of frame_benchmarking
, allowing existing benchmarking code. Sometime in the distant future we would remove this export when the v1 syntax is officially deprecated.
Presently the new proc-macro-based benchmarking syntax (https://github.com/paritytech/substrate/pull/12924), for reasons, lives in frame_support::benchmarking
.
Implications
With this PR you now must use
use frame_benchmarking::v2::*;
to import the new benchmarking syntax.
You may also now use
use frame_benchmarking::v1::*;
to import the old benchmarking syntax, in addition to the existing way.
Related Issues
- #13132