diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index d20ac452c1e..4f6e8a89592 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -37,6 +37,9 @@ jobs: sudo apt update sudo apt install -y git clang curl libssl-dev llvm libudev-dev cmake wabt protobuf-compiler wget bzip2 + - name: force cleanup dir + run: rm -rf target + - name: Run all benchmarks run: | ./scripts/benchmarking/run_all_benchmarks.sh -c vara-dev -m @@ -72,35 +75,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 diff --git a/scripts/benchmarking/run_all_benchmarks.sh b/scripts/benchmarking/run_all_benchmarks.sh index 40d2700dadc..7df4798795a 100755 --- a/scripts/benchmarking/run_all_benchmarks.sh +++ b/scripts/benchmarking/run_all_benchmarks.sh @@ -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