Skip to content

Commit

Permalink
chore: normalize dep names and upgrade more bench
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Jan 16, 2023
1 parent 7d91248 commit 6fe4870
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 30 deletions.
4 changes: 2 additions & 2 deletions code/parachain/runtime/composable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
] }
frame-benchmarking = { package = "frame-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }
hex-literal = { version = "0.3.4", optional = true }
system-benchmarking = { package = "frame-system-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }
frame-system-benchmarking = { package = "frame-system-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }

# Parachain Utilities
collator-selection = { package = "pallet-collator-selection", git = "https:/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.30" }
Expand Down Expand Up @@ -127,7 +127,7 @@ runtime-benchmarks = [
"balances/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"balances/runtime-benchmarks",
Expand Down
14 changes: 4 additions & 10 deletions code/parachain/runtime/composable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,7 @@ mod benches {
[balances, Balances]
[session, SessionBench::<Runtime>]
[timestamp, Timestamp]
// TODO: broken
// [collator_selection, CollatorSelection]
[collator_selection, CollatorSelection]
[indices, Indices]
[membership, CouncilMembership]
[treasury, Treasury]
Expand Down Expand Up @@ -1015,15 +1014,12 @@ impl_runtime_apis! {
) {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use system_benchmarking::Pallet as SystemBench;
use frame_system_benchmarking::Pallet as SystemBench;
use session_benchmarking::Pallet as SessionBench;

let mut list = Vec::<BenchmarkList>::new();

list_benchmarks!(list, extra);

let storage_info = AllPalletsWithSystem::storage_info();

(list, storage_info)
}

Expand All @@ -1032,8 +1028,8 @@ impl_runtime_apis! {
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};

use system_benchmarking::Pallet as SystemBench;
impl system_benchmarking::Config for Runtime {}
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}

use session_benchmarking::Pallet as SessionBench;
impl session_benchmarking::Config for Runtime {}
Expand All @@ -1053,9 +1049,7 @@ impl_runtime_apis! {

let mut batches = Vec::<BenchmarkBatch>::new();
let params = (&config, &whitelist);

add_benchmarks!(params, batches);

if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
Ok(batches)
}
Expand Down
6 changes: 2 additions & 4 deletions code/parachain/runtime/dali/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
"derive",
] }
frame-benchmarking = { package = "frame-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }
frame-system-benchmarking = { package = "frame-system-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }
hex-literal = { version = "0.3.3", optional = true }
system-benchmarking = { package = "frame-system-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }

# Parachain Utilities
collator-selection = { package = "pallet-collator-selection", git = "https:/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.30" }
Expand Down Expand Up @@ -175,6 +175,7 @@ runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"identity/runtime-benchmarks",
"indices/runtime-benchmarks",
Expand All @@ -191,7 +192,6 @@ runtime-benchmarks = [
"scheduler/runtime-benchmarks",
"session-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"system-benchmarking",
"timestamp/runtime-benchmarks",
"treasury/runtime-benchmarks",
"utility/runtime-benchmarks",
Expand All @@ -210,8 +210,6 @@ runtime-benchmarks = [
"common/runtime-benchmarks",
"pallet-staking-rewards/runtime-benchmarks",
"cosmwasm/runtime-benchmarks",
# FIXUP(hussein)
# "asset-tx-payment/runtime-benchmarks",
"pallet-ibc/runtime-benchmarks",
]
std = [
Expand Down
9 changes: 4 additions & 5 deletions code/parachain/runtime/dali/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,8 +1427,7 @@ mod benches {
[balances, Balances]
[session, SessionBench::<Runtime>]
[timestamp, Timestamp]
// TODO: broken
// [collator_selection, CollatorSelection]
[collator_selection, CollatorSelection]
[indices, Indices]
[membership, CouncilMembership]
[treasury, Treasury]
Expand Down Expand Up @@ -1732,7 +1731,7 @@ impl_runtime_apis! {
) {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use system_benchmarking::Pallet as SystemBench;
use frame_system_benchmarking::Pallet as SystemBench;
use session_benchmarking::Pallet as SessionBench;

let mut list = Vec::<BenchmarkList>::new();
Expand All @@ -1746,8 +1745,8 @@ impl_runtime_apis! {
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};

use system_benchmarking::Pallet as SystemBench;
impl system_benchmarking::Config for Runtime {}
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}

use session_benchmarking::Pallet as SessionBench;
impl session_benchmarking::Config for Runtime {}
Expand Down
4 changes: 2 additions & 2 deletions code/parachain/runtime/picasso/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
] }
frame-benchmarking = { git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }
hex-literal = { version = "0.3.3", optional = true }
system-benchmarking = { package = "frame-system-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }
frame-system-benchmarking = { package = "frame-system-benchmarking", git = "https:/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.30" }

# Parachain Utilities
collator-selection = { package = "pallet-collator-selection", git = "https:/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.30" }
Expand Down Expand Up @@ -137,7 +137,7 @@ runtime-benchmarks = [
"balances/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"balances/runtime-benchmarks",
Expand Down
11 changes: 4 additions & 7 deletions code/parachain/runtime/picasso/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,7 @@ mod benches {
[balances, Balances]
[session, SessionBench::<Runtime>]
[timestamp, Timestamp]
// TODO: broken
// [collator_selection, CollatorSelection]
[collator_selection, CollatorSelection]
[indices, Indices]
[membership, CouncilMembership]
[treasury, Treasury]
Expand Down Expand Up @@ -1146,14 +1145,12 @@ impl_runtime_apis! {
) {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use system_benchmarking::Pallet as SystemBench;
use frame_system_benchmarking::Pallet as SystemBench;
use session_benchmarking::Pallet as SessionBench;

let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);

let storage_info = AllPalletsWithSystem::storage_info();

return (list, storage_info)
}

Expand All @@ -1162,8 +1159,8 @@ impl_runtime_apis! {
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};

use system_benchmarking::Pallet as SystemBench;
impl system_benchmarking::Config for Runtime {}
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}

use session_benchmarking::Pallet as SessionBench;
impl session_benchmarking::Config for Runtime {}
Expand Down

0 comments on commit 6fe4870

Please sign in to comment.