mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 02:07:56 +00:00
Fix Statemint benchmarks (#589)
This commit is contained in:
@@ -842,6 +842,33 @@ impl_runtime_apis! {
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
|
||||
list_benchmark!(list, extra, frame_system, SystemBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_assets, Assets);
|
||||
list_benchmark!(list, extra, pallet_balances, Balances);
|
||||
list_benchmark!(list, extra, pallet_multisig, Multisig);
|
||||
list_benchmark!(list, extra, pallet_proxy, Proxy);
|
||||
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_uniques, Uniques);
|
||||
list_benchmark!(list, extra, pallet_utility, Utility);
|
||||
list_benchmark!(list, extra, pallet_timestamp, Timestamp);
|
||||
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
return (list, storage_info)
|
||||
}
|
||||
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
||||
|
||||
@@ -825,6 +825,33 @@ impl_runtime_apis! {
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
|
||||
list_benchmark!(list, extra, frame_system, SystemBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_assets, Assets);
|
||||
list_benchmark!(list, extra, pallet_balances, Balances);
|
||||
list_benchmark!(list, extra, pallet_multisig, Multisig);
|
||||
list_benchmark!(list, extra, pallet_proxy, Proxy);
|
||||
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_uniques, Uniques);
|
||||
list_benchmark!(list, extra, pallet_utility, Utility);
|
||||
list_benchmark!(list, extra, pallet_timestamp, Timestamp);
|
||||
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
return (list, storage_info)
|
||||
}
|
||||
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
||||
|
||||
@@ -827,6 +827,33 @@ impl_runtime_apis! {
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
|
||||
list_benchmark!(list, extra, frame_system, SystemBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_assets, Assets);
|
||||
list_benchmark!(list, extra, pallet_balances, Balances);
|
||||
list_benchmark!(list, extra, pallet_multisig, Multisig);
|
||||
list_benchmark!(list, extra, pallet_proxy, Proxy);
|
||||
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_uniques, Uniques);
|
||||
list_benchmark!(list, extra, pallet_utility, Utility);
|
||||
list_benchmark!(list, extra, pallet_timestamp, Timestamp);
|
||||
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
return (list, storage_info)
|
||||
}
|
||||
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
||||
|
||||
Reference in New Issue
Block a user