-
Notifications
You must be signed in to change notification settings - Fork 153
94 lines (79 loc) · 2.29 KB
/
bench-core.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Benchmark Core
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
bench_core_geth:
name: Benchmark core-geth
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Set up Go 1.x
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Benchmark etclabscore/core-geth
id: bench
run: |
go test -short ./core -count 1 -p 1 -timeout 60m -run NONE -bench=. -v |& tee core-geth.txt
- uses: actions/upload-artifact@v2
with:
name: core-geth
path: ./core-geth.txt
bench_go_ethereum:
name: Benchmark go-ethereum
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Set up Go 1.x
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
repository: 'ethereum/go-ethereum'
ref: 'v1.10.26'
- name: Benchmark ethereum/go-ethereum
id: bench
run: |
go test -short ./core -count 1 -p 1 -timeout 60m -run NONE -bench=. -v |& tee go-ethereum.txt
- uses: actions/upload-artifact@v2
with:
name: go-ethereum
path: ./go-ethereum.txt
compare:
name: Compare
needs: [bench_core_geth, bench_go_ethereum]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Set up Go 1.x
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go install golang.org/x/perf/cmd/benchstat@latest
- uses: actions/download-artifact@v2
name: Get go-ethereum artifact
with:
name: go-ethereum
- uses: actions/download-artifact@v2
name: Get core-geth artifact
with:
name: core-geth
- name: "Analyze Results [COMPRESSED]"
run: |
benchstat go-ethereum.txt core-geth.txt
- name: "Analyze Results [RAW DELTA]"
run: |
benchstat go-ethereum.txt core-geth.txt