Skip to content

Commit

Permalink
docs: Update readme for benchmarks (#4181)
Browse files Browse the repository at this point in the history
  • Loading branch information
byronxu99 authored Oct 4, 2022
1 parent 4e58863 commit a9d2bd0
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions test/benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
install google benchmark: https://github.com/google/benchmark
# VW Benchmarks

by default google benchmark is built in Debug mode so you might want to specify Release mode when building/installing
## Benchmark results
Automated benchmarking is performed as part of the VW continuous integration system. Benchmark results are available here: **https://vowpalwabbit.org/vowpal_wabbit/dev/bench/**

build vw benchmarks:
Benchmarking is done via [github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark).

## Running benchmarks locally
### C++
Compile:
```
make -j vw-benchmarks.out
cmake --preset vcpkg-release -DBUILD_BENCHMARKS=On
cmake --build build --target vw-benchmarks.out
```

run vw benchmarks:
Run:
```
./build/test/benchmarks/vw-benchmarks.out
```

### .NET
First, install the VW Nuget packages.

If you want graphs of benchmark results to be automatically generated, make sure that the `RScript` executable is installed and on your PATH.
```sh
cd test/benchmarks/dotnet

# Build for both .NET Core and Framework
dotnet build dotnet_benchmark.csproj --framework net6.0 --runtime win-x64 --configuration Release --no-restore --self-contained
dotnet build dotnet_benchmark.csproj --framework net4.8 --runtime win-x64 --configuration Release --no-restore --self-contained

# Run with .NET Core as host process
# Arguments after "--" are for BenchmarkDotNet
dotnet run --project dotnet_benchmark.csproj --framework net6.0 --runtime win-x64 --configuration Release --no-build -- --filter '*' --join

# Go to output directory
cd BenchmarkDotNet.Artifacts/results
```
./test/benchmarks/vw-benchmarks.out
```

0 comments on commit a9d2bd0

Please sign in to comment.