-
Notifications
You must be signed in to change notification settings - Fork 11
/
win-benchmark.bat
33 lines (28 loc) · 1.46 KB
/
win-benchmark.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
:: build and run benchmark for windows
echo off
Echo --- NBN Predefined Benchmark runner ---
Echo.
Echo Benchmark types: [Quick/Performance/Sampling/Essential]
Echo * Quick (^<1min): Runs a quick benchmark with whatever is set in QuickBenchmark.cs
Echo * Performance (^>15min): High Performance statistical test with all included libraries
Echo * Sampling (^<1min): Test with all included libraries using cpu sampling and memory allocation statistics
Echo * Essential (^>15min): Running Performance + Sampling Benchmark
Echo * Custom: Use the commandline with .\NetworkBenchmarkDotNet --help to see how to use it
Echo.
set benchmark=Essential
set /p benchmark=Which benchmark do you want to run [Quick/Performance/Sampling/Essential] (default - %benchmark%)?:
echo on
:: Options: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build
:: Build targets: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
dotnet build --configuration Release --framework net6.0 --output .\bin\NetworkBenchmarkDotNet-Windows\
.\bin\NetworkBenchmarkDotNet-Windows\NetworkBenchmarkDotNet -b %benchmark%
echo off
Echo --- Benchmarks finished ---
Echo Save current process list
:: Folder should exist, just to be sure create it if it does not
if not exist "BenchmarkDotNet.Artifacts" mkdir BenchmarkDotNet.Artifacts
echo on
:: Store currently running processes
tasklist /V /FO CSV > "BenchmarkDotNet.Artifacts\running-processes.csv"
tasklist /V > "BenchmarkDotNet.Artifacts\running-processes.txt"
PAUSE