Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XCM benchmarks for Cumulus #67

Merged
merged 2 commits into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions bench-bot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ bench_pallet_common_args=(
bench_pallet() {
local kind="$1"
local runtime="$2"
local pallet="$3"

local args
case "$repository" in
substrate)
local pallet="$3"

local pallet_prefix="pallet_"

local pallet_id
Expand Down Expand Up @@ -72,6 +73,8 @@ bench_pallet() {
esac
;;
polkadot)
local pallet="$3"

args=(
--features=runtime-benchmarks
"${bench_pallet_common_args[@]}"
Expand Down Expand Up @@ -111,6 +114,9 @@ bench_pallet() {
esac
;;
cumulus)
local chain_type="$3"
local pallet="$4"

args=(
--bin=parachain-template-node
--features=runtime-benchmarks
Expand All @@ -124,7 +130,16 @@ bench_pallet() {
args+=(
--json-file="${ARTIFACTS_DIR}/bench.json"
--header=./file_header.txt
--output="./parachains/runtimes/assets/${runtime}/src/weights"
--output="./parachains/runtimes/$chain_type/$runtime/src/weights"
)
;;
xcm)
mkdir -p "./parachains/runtimes/$chain_type/$runtime/src/weights/xcm"
args+=(
--template=./templates/xcm-bench-template.hbs
--json-file="${ARTIFACTS_DIR}/bench.json"
--header=./file_header.txt
--output="./parachains/runtimes/$chain_type/$runtime/src/weights/xcm"
)
;;
*)
Expand Down