mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Add System to benchmarks (#1126)
* add system to benchmarks * Update cargo files
This commit is contained in:
@@ -64,6 +64,7 @@ utility = { package = "pallet-utility", git = "https://github.com/paritytech/sub
|
||||
vesting = { package = "pallet-vesting", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
|
||||
@@ -145,6 +146,7 @@ runtime-benchmarks = [
|
||||
"runtime-common/runtime-benchmarks",
|
||||
"frame-benchmarking",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system-benchmarking",
|
||||
"system/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
"balances/runtime-benchmarks",
|
||||
|
||||
@@ -1081,9 +1081,11 @@ sp_api::impl_runtime_apis! {
|
||||
// we need these two lines below.
|
||||
use pallet_session_benchmarking::Module as SessionBench;
|
||||
use pallet_offences_benchmarking::Module as OffencesBench;
|
||||
use frame_system_benchmarking::Module as SystemBench;
|
||||
|
||||
impl pallet_session_benchmarking::Trait for Runtime {}
|
||||
impl pallet_offences_benchmarking::Trait for Runtime {}
|
||||
impl frame_system_benchmarking::Trait for Runtime {}
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&pallet, &benchmark, &lowest_range_values, &highest_range_values, &steps, repeat);
|
||||
@@ -1098,6 +1100,7 @@ sp_api::impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, b"offences", OffencesBench::<Runtime>);
|
||||
add_benchmark!(params, batches, b"session", SessionBench::<Runtime>);
|
||||
add_benchmark!(params, batches, b"staking", Staking);
|
||||
add_benchmark!(params, batches, b"system", SystemBench::<Runtime>);
|
||||
add_benchmark!(params, batches, b"timestamp", Timestamp);
|
||||
add_benchmark!(params, batches, b"treasury", Treasury);
|
||||
add_benchmark!(params, batches, b"utility", Utility);
|
||||
|
||||
Reference in New Issue
Block a user