File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -267,3 +267,30 @@ jobs:
267267 exit 1
268268 fi
269269 done
270+
271+ benchmark :
272+ runs-on : windows-latest
273+ needs :
274+ - build
275+ steps :
276+ - name : Checkout
277+ uses : actions/checkout@v4
278+ - name : Install Go
279+ uses : actions/setup-go@v5
280+ with :
281+ go-version : ${{ env.GO_VERSION }}
282+ - name : Benchmark
283+ run : |
284+ ./make bench | Tee-Object -FilePath output.txt
285+ - name : Download previous benchmark data
286+ uses : actions/cache@v4
287+ with :
288+ path : ./cache
289+ key : ${{ runner.os }}-benchmark
290+ - name : Store benchmark result
291+ uses : benchmark-action/github-action-benchmark@v1
292+ with :
293+ tool : ' go'
294+ output-file-path : output.txt
295+ external-data-json-path : ./cache/benchmark-data.json
296+ fail-on-alert : true
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ set GOBIN=%USERPROFILE%\go\bin
2121set GOTEST = go test -timeout=10m -v -gcflags=all=-d=checkptr=0
2222set GOFMT = gofmt -e -s -l -w
2323set GOLINT = %GOBIN% \golangci-lint
24+ set GOBENCH = go test ./... -run='^ $' -bench=Benchmark -benchmem
2425
2526if NOT DEFINED VERSION (
2627 set VERSION = " 0.0.0"
@@ -56,6 +57,7 @@ if "%~1"=="install" goto install
5657if " %~1 " == " deps" goto deps
5758if " %~1 " == " rsrc" goto rsrc
5859if " %~1 " == " mc" goto mc
60+ if " %~1 " == " bench" goto bench
5961
6062:build
6163:: set PKG_CONFIG_PATH=pkg-config
@@ -101,6 +103,11 @@ gcc pkg/outputs/eventlog/mc/fibratus.res -o pkg/outputs/eventlog/mc/fibratus.dll
101103if errorlevel 1 goto fail
102104goto :EOF
103105
106+ :bench
107+ %GOBENCH%
108+ if errorlevel 1 goto fail
109+ goto :EOF
110+
104111:pkg
105112set RELEASE_DIR = .\build\msi\fibratus-%VERSION%
106113
You can’t perform that action at this time.
0 commit comments