mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 05:51:02 +00:00
migrate new benchmarking syntax from frame_support::benchmarking to frame_benchmarking::v2 (#13235)
* * re-export frame_support::benchmarking in frame_benchmarking:: * prefer use frame_benchmarking::*; in examples, etc * switch to frame_benchmarking::v2 * completely migrate new benchmarking code out of frame_support * fix doc links * remove unneeded return Co-authored-by: Bastian Köcher <git@kchr.de> * remove another unneeded return Co-authored-by: Bastian Köcher <git@kchr.de> * properly export all macros in v1 * refactor existing frame_benchmarking imports to use ::v1 --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -483,7 +483,7 @@ pub fn pallet(attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
/// An attribute macro that can be attached to a (non-empty) module declaration. Doing so will
|
||||
/// designate that module as a benchmarking module.
|
||||
///
|
||||
/// See `frame_support::benchmarking` for more info.
|
||||
/// See `frame_benchmarking::v2` for more info.
|
||||
#[proc_macro_attribute]
|
||||
pub fn benchmarks(attr: TokenStream, tokens: TokenStream) -> TokenStream {
|
||||
match benchmark::benchmarks(attr, tokens, false) {
|
||||
@@ -495,7 +495,7 @@ pub fn benchmarks(attr: TokenStream, tokens: TokenStream) -> TokenStream {
|
||||
/// An attribute macro that can be attached to a (non-empty) module declaration. Doing so will
|
||||
/// designate that module as an instance benchmarking module.
|
||||
///
|
||||
/// See `frame_support::benchmarking` for more info.
|
||||
/// See `frame_benchmarking::v2` for more info.
|
||||
#[proc_macro_attribute]
|
||||
pub fn instance_benchmarks(attr: TokenStream, tokens: TokenStream) -> TokenStream {
|
||||
match benchmark::benchmarks(attr, tokens, true) {
|
||||
@@ -508,7 +508,7 @@ pub fn instance_benchmarks(attr: TokenStream, tokens: TokenStream) -> TokenStrea
|
||||
/// attached to a function definition containing an `#[extrinsic_call]` or `#[block]`
|
||||
/// attribute.
|
||||
///
|
||||
/// See `frame_support::benchmarking` for more info.
|
||||
/// See `frame_benchmarking::v2` for more info.
|
||||
#[proc_macro_attribute]
|
||||
pub fn benchmark(_attrs: TokenStream, _tokens: TokenStream) -> TokenStream {
|
||||
quote!(compile_error!(
|
||||
@@ -521,7 +521,7 @@ pub fn benchmark(_attrs: TokenStream, _tokens: TokenStream) -> TokenStream {
|
||||
/// used as a boundary designating where the benchmark setup code ends, and the benchmark
|
||||
/// verification code begins.
|
||||
///
|
||||
/// See `frame_support::benchmarking` for more info.
|
||||
/// See `frame_benchmarking::v2` for more info.
|
||||
#[proc_macro_attribute]
|
||||
pub fn extrinsic_call(_attrs: TokenStream, _tokens: TokenStream) -> TokenStream {
|
||||
quote!(compile_error!(
|
||||
@@ -534,7 +534,7 @@ pub fn extrinsic_call(_attrs: TokenStream, _tokens: TokenStream) -> TokenStream
|
||||
/// enclosing benchmark function, This attribute is also used as a boundary designating where
|
||||
/// the benchmark setup code ends, and the benchmark verification code begins.
|
||||
///
|
||||
/// See `frame_support::benchmarking` for more info.
|
||||
/// See `frame_benchmarking::v2` for more info.
|
||||
#[proc_macro_attribute]
|
||||
pub fn block(_attrs: TokenStream, _tokens: TokenStream) -> TokenStream {
|
||||
quote!(compile_error!(
|
||||
|
||||
Reference in New Issue
Block a user