Skip to content

EVM benchmark

EVM benchmark #111

Workflow file for this run

name: EVM benchmark
on:
pull_request:
branches:
- master
paths:
- core/vm/**
workflow_dispatch:
inputs:
oldCommit:
description: "Old commit hash"
required: true
types: string
newCommit:
description: "New commit hash"
required: true
types: string
concurrency:
group: benchmark-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
OLD_COMMIT: ${{ inputs.oldCommit }}
NEW_COMMIT: ${{ inputs.newCommit }}
steps:
- name: 'Checkout Repo'
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
fetch-depth: 0
- name: 'Setup Go'
uses: actions/setup-go@v5
with:
go-version: '1.20.10'
- name: 'Run EVM benchmark'
run: |
go install golang.org/x/perf/cmd/[email protected]
cd core/vm
if [[ ${{ github.event_name }} = "pull_request" ]]; then
../../script/benchstat.sh -c "-test.v -test.run=^$ -test.bench=BenchmarkEvm" \
-o $(git rev-parse --short origin/master) -n ${{ github.sha }} -c 10 -i
else
../../script/benchstat.sh -c "-test.v -test.run=^$ -test.bench=BenchmarkEvm" \
-o "$OLD_COMMIT" -n "$NEW_COMMIT" -c 10 -i
fi