mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 22:51:03 +00:00
Fix Statemint benchmarks (#589)
This commit is contained in:
committed by
Alexander Popiak
parent
3555f7b39d
commit
f5a38510bc
@@ -857,6 +857,33 @@ impl_runtime_apis! {
|
|||||||
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
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(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig
|
config: frame_benchmarking::BenchmarkConfig
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
||||||
|
|||||||
@@ -841,6 +841,33 @@ impl_runtime_apis! {
|
|||||||
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
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(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig
|
config: frame_benchmarking::BenchmarkConfig
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
||||||
|
|||||||
@@ -843,6 +843,33 @@ impl_runtime_apis! {
|
|||||||
|
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
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(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig
|
config: frame_benchmarking::BenchmarkConfig
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
||||||
|
|||||||
Reference in New Issue
Block a user