Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ benchmarks:
<<: *collect-artifacts
<<: *benchmarks-refs
script:
- ./scripts/benchmarks-ci.sh assets statemine > ./artifacts/bench-statemine.log
- ./scripts/benchmarks-ci.sh assets statemint > ./artifacts/bench-statemint.log
- ./scripts/benchmarks-ci.sh assets westmint > ./artifacts/bench-westmint.log
- ./scripts/benchmarks-ci.sh assets statemine ./artifacts > ./artifacts/bench-statemine.log
- ./scripts/benchmarks-ci.sh assets statemint ./artifacts > ./artifacts/bench-statemint.log
- ./scripts/benchmarks-ci.sh assets westmint ./artifacts > ./artifacts/bench-westmint.log
- git status
- export BRANCHNAME="weights-${CI_COMMIT_BRANCH}"
# Set git config
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ mod benches {
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_xcmp_queue, XcmpQueue]
// TODO:COLLECTIVES Add Alliance
[pallet_alliance, Alliance]
[pallet_collective, AllianceMotion]
);
}

Expand Down
7 changes: 5 additions & 2 deletions scripts/benchmarks-ci.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash
#!/usr/bin/env bash

steps=50
repeat=20
category=$1
runtimeName=$2
artifactsDir=$3

benchmarkOutput=./parachains/runtimes/$category/$runtimeName/src/weights
benchmarkRuntimeName="$runtimeName-dev"

pallets=(
pallet_alliance
pallet_assets
pallet_balances
pallet_collator_selection
pallet_collective
pallet_multisig
pallet_proxy
pallet_session
Expand All @@ -24,7 +27,7 @@ pallets=(

for p in ${pallets[@]}
do
./artifacts/polkadot-parachain benchmark pallet \
$artifactsDir/polkadot-parachain benchmark pallet \
--chain=$benchmarkRuntimeName \
--execution=wasm \
--wasm-execution=compiled \
Expand Down
70 changes: 5 additions & 65 deletions scripts/benchmarks.sh
Original file line number Diff line number Diff line change
@@ -1,65 +1,5 @@
#!/bin/bash

steps=50
repeat=20

statemineOutput=./parachains/runtimes/assets/statemine/src/weights
statemintOutput=./parachains/runtimes/assets/statemint/src/weights
westmintOutput=./parachains/runtimes/assets/westmint/src/weights

statemineChain=statemine-dev
statemintChain=statemint-dev
westmintChain=westmint-dev

pallets=(
pallet_assets
pallet_balances
pallet_collator_selection
pallet_multisig
pallet_proxy
pallet_session
pallet_timestamp
pallet_utility
pallet_uniques
cumulus_pallet_xcmp_queue
frame_system
)

for p in ${pallets[@]}
do
./target/production/polkadot-parachain benchmark pallet \
--chain=$statemineChain \
--execution=wasm \
--wasm-execution=compiled \
--pallet=$p \
--extrinsic='*' \
--steps=$steps \
--repeat=$repeat \
--json-file=./bench-statemine.json \
--header=./file_header.txt \
--output=$statemineOutput

./target/production/polkadot-parachain benchmark pallet \
--chain=$statemintChain \
--execution=wasm \
--wasm-execution=compiled \
--pallet=$p \
--extrinsic='*' \
--steps=$steps \
--repeat=$repeat \
--json-file=./bench-statemint.json \
--header=./file_header.txt \
--output=$statemintOutput

./target/production/polkadot-parachain benchmark pallet \
--chain=$westmintChain \
--execution=wasm \
--wasm-execution=compiled \
--pallet=$p \
--extrinsic='*' \
--steps=$steps \
--repeat=$repeat \
--json-file=./bench-westmint.json \
--header=./file_header.txt \
--output=$westmintOutput
done
#!/usr/bin/env bash
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
${__dir}/benchmarks-ci.sh assets statemine target/production
${__dir}/benchmarks-ci.sh assets statemint target/production
${__dir}/benchmarks-ci.sh assets westmint target/production