Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
* re-export frame_support::benchmarking in frame_benchmarking::
Browse files Browse the repository at this point in the history
* prefer use frame_benchmarking::*; in examples, etc
  • Loading branch information
sam0x17 committed Jan 24, 2023
1 parent 09de7b4 commit 1e1f542
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 19 deletions.
3 changes: 1 addition & 2 deletions frame/balances/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
use super::*;
use crate::Pallet as Balances;

use frame_benchmarking::{account, impl_benchmark_test_suite, whitelisted_caller};
use frame_support::benchmarking::*;
use frame_benchmarking::*;
use frame_system::RawOrigin;

const SEED: u32 = 0;
Expand Down
2 changes: 2 additions & 0 deletions frame/benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1930,3 +1930,5 @@ macro_rules! define_benchmarks {
}
}
}

pub use frame_support::benchmarking::*;
5 changes: 2 additions & 3 deletions frame/support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2767,8 +2767,7 @@ pub mod pallet_macros {
/// #![cfg(feature = "runtime-benchmarks")]
///
/// use super::{mock_helpers::*, Pallet as MyPallet};
/// use frame_support::benchmarking::*;
/// use frame_benchmarking::whitelisted_caller;
/// use frame_benchmarking::*;
///
/// #[benchmarks]
/// mod benchmarks {
Expand Down Expand Up @@ -2847,7 +2846,7 @@ pub mod pallet_macros {
/// following:
///
/// ```ignore
/// #[extrinsic_call]
/// #[extrinsic_call]
/// _(RawOrigin::Signed(whitelisted_caller()), 0u32.into(), 0);
/// ```
///
Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/bad_param_name.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/bad_param_range.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/bad_params.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/dup_block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/extra_extra.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/extra_skip_meta.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;

#[extrinsic_call]
mod stuff {}
Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/missing_call.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/missing_origin.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/benchmark_ui/pass/valid_basic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
use frame_support_test::Config;

#[benchmarks]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::benchmarking::*;
use frame_benchmarking::*;
#[allow(unused_imports)]
use frame_support_test::Config;

Expand Down

0 comments on commit 1e1f542

Please sign in to comment.