From e2867ed8c0e7a9ff408aa0dd23f73774022c57b4 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Wed, 21 Jun 2023 15:45:36 -0700 Subject: [PATCH] test out storing perf Signed-off-by: Alex Boten --- .github/workflows/perf.yml | 25 +++++++++++++++++++++++++ .gitignore | 3 +++ Makefile | 1 + Makefile.Common | 2 +- 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/perf.yml diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml new file mode 100644 index 00000000000..9f6ea7e348a --- /dev/null +++ b/.github/workflows/perf.yml @@ -0,0 +1,25 @@ +name: Automation - Performance + +on: + workflow_dispatch: + + +jobs: + runperf: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ~1.19.10 + + - name: Run benchmark + run: make gobenchmark + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: 'go' + output-file-path: benchmarks.txt diff --git a/.gitignore b/.gitignore index d4fe56115e2..d2574e57fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,9 @@ coverage.out coverage.txt coverage.html +# Benchmarks +benchmarks.txt + # Wix *.wixobj *.wixpdb diff --git a/Makefile b/Makefile index 54a8c6b611c..8fae9339e0f 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,7 @@ gotest: .PHONY: gobenchmark gobenchmark: @$(MAKE) for-all-target TARGET="benchmark" + cat `find . -name benchmarks.txt` > benchmarks.txt .PHONY: gotest-with-cover gotest-with-cover: $(GOCOVMERGE) diff --git a/Makefile.Common b/Makefile.Common index 44fcdeb568e..31d1244899d 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -54,7 +54,7 @@ test-with-cover: $(GO_ACC) .PHONY: benchmark benchmark: - $(GOTEST) -bench=. -run=notests ./... + $(GOTEST) -bench=. -run=notests ./... | tee benchmarks.txt .PHONY: fmt fmt: $(GOIMPORTS)