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,34 @@ jobs:
267267 exit 1
268268 fi
269269 done
270+
271+ benchmark :
272+ permissions :
273+ contents : read
274+ checks : write
275+ pull-requests : write
276+ runs-on : windows-latest
277+ needs :
278+ - build
279+ steps :
280+ - name : Checkout
281+ uses : actions/checkout@v4
282+ - name : Install Go
283+ uses : actions/setup-go@v5
284+ with :
285+ go-version : ${{ env.GO_VERSION }}
286+ - name : Benchmark
287+ run : |
288+ ./make bench | Tee-Object -FilePath output.txt
289+ - name : Download previous benchmark data
290+ uses : actions/cache@v4
291+ with :
292+ path : ./cache
293+ key : ${{ runner.os }}-benchmark
294+ - name : Store benchmark result
295+ uses : benchmark-action/github-action-benchmark@v1
296+ with :
297+ tool : ' go'
298+ output-file-path : output.txt
299+ external-data-json-path : ./cache/benchmark-data.json
300+ 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