add uint32 read test #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bench_push | |
on: [push] | |
jobs: | |
build: | |
name: Benchmark (push) | |
runs-on: ubuntu-latest | |
env: | |
GOBIN: /home/runner/go | |
steps: | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22 | |
id: go | |
- name: Check out code | |
uses: actions/checkout@v1 | |
- name: Get dependencies | |
run: | | |
go mod download | |
- name: Benchmark (against HEAD~1) | |
run: | | |
go install golang.org/x/perf/cmd/benchstat@latest | |
echo "New Commit:" | |
git log -1 --format="%H" | |
go test -bench=. -benchmem -benchtime=10x -count=7 > $HOME/new.txt | |
git reset --hard HEAD | |
git checkout HEAD~1 | |
echo "Base Commit:" | |
git log -1 --format="%H" | |
go test -bench=. -benchmem -benchtime=10x -count=7 > $HOME/old.txt | |
$GOBIN/benchstat $HOME/old.txt $HOME/new.txt |