Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,34 @@ jobs:
exit 1
fi
done

benchmark:
permissions:
contents: read
checks: write
pull-requests: write
runs-on: windows-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Benchmark
run: |
./make bench | Tee-Object -FilePath output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'go'
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
7 changes: 7 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set GOBIN=%USERPROFILE%\go\bin
set GOTEST=go test -timeout=10m -v -gcflags=all=-d=checkptr=0
set GOFMT=gofmt -e -s -l -w
set GOLINT=%GOBIN%\golangci-lint
set GOBENCH=go test ./... -run='^$' -bench=Benchmark -benchmem

if NOT DEFINED VERSION (
set VERSION="0.0.0"
Expand Down Expand Up @@ -56,6 +57,7 @@ if "%~1"=="install" goto install
if "%~1"=="deps" goto deps
if "%~1"=="rsrc" goto rsrc
if "%~1"=="mc" goto mc
if "%~1"=="bench" goto bench

:build
:: set PKG_CONFIG_PATH=pkg-config
Expand Down Expand Up @@ -101,6 +103,11 @@ gcc pkg/outputs/eventlog/mc/fibratus.res -o pkg/outputs/eventlog/mc/fibratus.dll
if errorlevel 1 goto fail
goto :EOF

:bench
%GOBENCH%
if errorlevel 1 goto fail
goto :EOF

:pkg
set RELEASE_DIR=.\build\msi\fibratus-%VERSION%

Expand Down
Loading