-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Update readme for benchmarks (#4181)
- Loading branch information
Showing
1 changed file
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |