Skip to content

Commit

Permalink
bench wf
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteNacked committed May 6, 2024
1 parent fd4b77c commit 6366b3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,35 +72,3 @@ jobs:
runtime/vara/src/weights/
utils/wasm-instrument/src/gas_metering/
- name: "TIP: download the artifacts and use `./scripts/unpack-weights.sh`"
run: |
echo "::notice::You can download the artifacts and use script \`./scripts/unpack-weights.sh\` to apply the changes to your branch"
- name: Create commit
if: ${{ inputs.change-type == 'commit' }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: >-
chore(runtime): update weights
file_pattern: "pallets/gear/src/ pallets/gear-builtin/src/ runtime/vara/src/weights/ utils/wasm-instrument/src/gas_metering/"

- name: Create Pull Request
if: ${{ inputs.change-type == 'pull_request' }}
uses: peter-evans/create-pull-request@v6
with:
add-paths: |
pallets/gear/src/
pallets/gear-builtin/src/
runtime/vara/src/weights/
utils/wasm-instrument/src/gas_metering/
commit-message: update weights
branch: weights/patch
branch-suffix: short-commit-hash
title: >-
chore(runtime): update weights
body: |
`run_all_benchmarks.sh` script is applied to update weights (branch: `${{ github.ref_name }}`, commit ${{ github.sha }})
**Note:** If CI fails, try manually updating the heuristic tests: `runtime/vara/src/tests.rs`
labels: |
A0-pleasereview
A4-insubstantial
6 changes: 2 additions & 4 deletions scripts/benchmarking/run_all_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,8 @@ for PALLET in "${PALLETS[@]}"; do
--steps=$BENCHMARK_STEPS_ONE_TIME_EXTRINSICS \
--repeat=$BENCHMARK_REPEAT_ONE_TIME_EXTRINSICS \
--pallet="$PALLET" \
--extrinsic="$(IFS=', '; echo "${ONE_TIME_EXTRINSICS[*]}")" \
--heap-pages=4096 \
--output="./${WEIGHTS_OUTPUT}/${PALLET}_onetime.rs" \
--template=.maintain/frame-weight-template.hbs 2>&1
--extrinsic=instantiate_module_code_section_per_kb,instantiate_module_data_section_per_kb,instantiate_module_global_section_per_kb,instantiate_module_table_section_per_kb,instantiate_module_type_section_per_kb \
--heap-pages=4096
)

if [ $? -ne 0 ]; then
Expand Down

0 comments on commit 6366b3c

Please sign in to comment.