watchman Benchmarks #15
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: watchman Benchmarks | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 12 * * *" | |
permissions: | |
deployments: write | |
contents: write | |
jobs: | |
build: | |
name: Go Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Setup Linux Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-dev and xorg-dev | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
id: go | |
- name: Running Common Benchmarks | |
run: | | |
go test ./pkg/search/... -short -bench BenchmarkDebugSimilarity -run BenchmarkDebugSimilarity -benchmem > output.txt | |
go test ./internal/search/... -short -bench Benchmark_Search/dynamic -run Benchmark_Search -benchmem >> output.txt | |
go test ./internal/search/... -short -bench BenchmarkAPI_Search -run BenchmarkAPI_Search -benchmem >> output.txt | |
go test ./internal/stringscore/... -short -bench BenchmarkJaroWinkler -run BenchmarkJaroWinkler -benchmem >> output.txt | |
go test ./internal/postalpool/... -short -bench BenchmarkPostalPool -run BenchmarkPostalPool -benchmem >> output.txt | |
go test ./internal/norm/... -short -bench Bench -run Bench -benchmem >> output.txt | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: "moov-io/watchman Common Benchmarks" | |
tool: 'go' | |
output-file-path: "./output.txt" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skip-fetch-gh-pages: true | |
auto-push: true | |
# Show alert with commit comment on detecting possible performance regression | |
alert-threshold: '120%' | |
comment-on-alert: true | |
fail-on-alert: true | |
alert-comment-cc-users: '@adamdecaf' | |
max-items-in-chart: 25 | |
# Update files on master branch | |
gh-pages-branch: master | |
benchmark-data-dir-path: "docs/bench/common/" | |
- name: Running OFAC Benchmarks | |
run: | | |
go test ./pkg/ofac/... -short -bench Benchmark -run Benchmark -benchmem > output.txt | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: "moov-io/watchman OFAC Benchmarks" | |
tool: 'go' | |
output-file-path: "./output.txt" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skip-fetch-gh-pages: true | |
auto-push: true | |
# Show alert with commit comment on detecting possible performance regression | |
alert-threshold: '120%' | |
comment-on-alert: true | |
fail-on-alert: true | |
alert-comment-cc-users: '@adamdecaf' | |
max-items-in-chart: 25 | |
# Update files on master branch | |
gh-pages-branch: master | |
benchmark-data-dir-path: "docs/bench/ofac/" | |
# TODO(adam): include libpostal benchmarks | |
# make install | |
# go test -tags libpostal ./pkg/address/... -bench=Bench -run Bench -benchmem >> output.txt |