-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.02 KB
/
Copy pathbenchmarks.yml
File metadata and controls
44 lines (36 loc) · 1.02 KB
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
name: Benchmarks
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: bench-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
GOEXPERIMENT: jsonv2
jobs:
benchmark:
name: Go Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: '1.26.x'
cache: true
- name: Run benchmarks
run: |
go test -bench=. -benchmem -count=3 -timeout=300s ./internal/messages/... > bench-results.txt 2>&1 || true
cat bench-results.txt
- name: Upload benchmark results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: bench-results
path: bench-results.txt
retention-days: 30