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

fix(benchmarks): Create files with weights beforehand #4339

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 3 additions & 9 deletions .github/workflows/test-measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,9 @@ jobs:
--output-file ./target/action-pallet-output.json

- name: "Collect: pallet-gear benches"
run: >-
./target/release/gear benchmark pallet --pallet=pallet_gear
--steps=50
--repeat=20
--chain=dev
--extrinsic=*
--heap-pages=4096
--json-file ./target/weights.json
--template ./.maintain/regression-analysis-weight-template.hbs
run: |
touch ./target/weights.json
./target/release/gear benchmark pallet --pallet=pallet_gear --steps=50 --repeat=20 --chain=dev --extrinsic=* --heap-pages=4096 --output ./target/weights.json --template ./.maintain/regression-analysis-weight-template.hbs

- name: "Generate report: pallet-gear benches"
run: |
Expand Down
2 changes: 2 additions & 0 deletions scripts/benchmarking/run_all_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ for PALLET in "${PALLETS[@]}"; do
fi

WEIGHT_FILE="./${WEIGHTS_OUTPUT}/${PALLET}.rs"
touch "$WEIGHT_FILE"
echo "[+] Benchmarking $PALLET with weight file $WEIGHT_FILE";

OUTPUT=$(
Expand All @@ -204,6 +205,7 @@ for PALLET in "${PALLETS[@]}"; do
if [ "$PALLET" == "pallet_gear" ]
then
echo "[+] Benchmarking $PALLET one-time syscalls with weight file ./${WEIGHTS_OUTPUT}/${PALLET}_onetime.rs";
touch "./${WEIGHTS_OUTPUT}/${PALLET}_onetime.rs"
OUTPUT=$(
$TASKSET_CMD $GEAR benchmark pallet \
--chain="$chain_spec" \
Expand Down
Loading