forked from algorand/go-algorand
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.71 KB
/
benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Benchmark workflow"
on:
# Push and update benchmarks when a commit is merged into master.
push:
branches:
- master
# Trigger benchmark test on this PR's commit against master.
pull_request:
branches:
- master
permissions:
# Push benchmark performance graph to gh-pages branch.
contents: write
deployments: write
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: go version
- name: Build go-algorand
run: scripts/travis/build.sh
# BenchmarkUintMath - Serves as a proxy for AVM `eval` performance.
# Performance degradations suggest either or both: (1) op code
# degradation, (2) `eval` degradation. (2) suggests a broader performance
# issue.
- name: Run benchmark
run: go test ./data/transactions/logic -bench 'BenchmarkUintMath' | tee benchmark_output.txt
- name: Push benchmark result to gh-pages branch
if: github.event_name == 'push'
uses: benchmark-action/github-action-benchmark@v1
with:
name: Go Benchmark
tool: 'go'
output-file-path: benchmark_output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
- name: Evaluate benchmark on PR branch
if: github.event.pull_request
uses: benchmark-action/github-action-benchmark@v1
with:
name: Go Benchmark
tool: 'go'
output-file-path: benchmark_output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: '200%'
comment-on-alert: true