Skip to content

Benchmark

Benchmark #172

Workflow file for this run

name: Benchmark
on:
schedule:
- cron: '0 5 * * 1'
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.21', '1.20' ]
name: "Test [ Go ${{ matrix.go }} / JSON Backend ${{ matrix.json_backend }} ]"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Go stable version
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Install benchstat
run: |
go install golang.org/x/perf/cmd/benchstat@latest
- name: Benchmark (comparison)
run: |
cd bench/comparison && make stdlib && make goccy
- name: Benchmark (performance)
run: |
cd bench/performance && make stdlib && make goccy && make benchstat