-
Notifications
You must be signed in to change notification settings - Fork 8
165 lines (155 loc) · 4.54 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Benchmarks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
internal:
name: Internals
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Run internal benchmarks
run: |
go test -benchmem -run=^$ -bench ^.*$ ./...
- name: Run Arche benchmarks
run: |
cd benchmark
go test -benchmem -run=^$ -bench ^.*$ ./arche/...
internal_tiny:
name: Internals (tiny)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Run internal benchmarks (tiny)
run: |
go test -tags tiny -benchmem -run=^$ -bench ^.*$ ./...
- name: Run Arche benchmarks (tiny)
run: |
cd benchmark
go test -tags tiny -benchmem -run=^$ -bench ^.*$ ./arche/...
relations:
name: Entity relations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Benchmark entity relations
run: |
cd benchmark
go test -benchmem -run=^$ -bench ^.*$ ./competition/relations/...
relations_tiny:
name: Entity relations (tiny)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Benchmark entity relations (tiny)
run: |
cd benchmark
go test -tags tiny -benchmem -run=^$ -bench ^.*$ ./competition/relations/...
other_methods:
name: vs. Array of Structs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Benchmark vs. Array of Structs
run: |
cd benchmark
go test -benchmem -run=^$ -bench ^.*$ ./competition/array_of_structs/...
competition:
name: ECS competition
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Benchmark Pos/Vel
run: |
cd benchmark
go test -benchmem -run=^$ -bench ^.*$ ./competition/pos_vel/... --count 10
- name: Benchmark Access 10 Components
run: |
cd benchmark
go test -benchmem -run=^$ -bench ^.*$ ./competition/many_components/... --count 10
- name: Benchmark Add/Remove Components
run: |
cd benchmark
go test -benchmem -run=^$ -bench ^.*$ ./competition/add_remove/... --count 10
competition_tiny:
name: ECS competition (tiny)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Benchmark Pos/Vel (tiny)
run: |
cd benchmark
go test -tags tiny -benchmem -run=^$ -bench ^.*$ ./competition/pos_vel/... --count 5
- name: Benchmark Access 10 Components (tiny)
run: |
cd benchmark
go test -tags tiny -benchmem -run=^$ -bench ^.*$ ./competition/many_components/... --count 5
- name: Benchmark Add/Remove Components (tiny)
run: |
cd benchmark
go test -tags tiny -benchmem -run=^$ -bench ^.*$ ./competition/add_remove/... --count 5
tables:
name: Benchmark Tables
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: go get .
- name: Benchmark tables
run: |
go run ./benchmark/table | tee BENCHMARKS.md
- name: Archive benchmark results
uses: actions/upload-artifact@v4
with:
name: BENCHMARKS.md
path: BENCHMARKS.md