Skip to content

Commit

Permalink
fixed benchmark not running if not admin (fixes #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doraku committed Jan 24, 2024
1 parent c27c0d0 commit 9284aae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Benchmark.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@ECHO off

pushd %~dp0

DEL /q /s BenchmarkDotNet.Artifacts
dotnet clean source\Ecs.CSharp.Benchmark\Ecs.CSharp.Benchmark.csproj -c Release

dotnet build source\Ecs.CSharp.Benchmark\Ecs.CSharp.Benchmark.csproj -c Release /p:CheckCacheMisses=true
IF %ERRORLEVEL% GTR 0 GOTO :end

dotnet run --project source\Ecs.CSharp.Benchmark\Ecs.CSharp.Benchmark.csproj -c Release --no-build --anyCategories DefaultEcs

:end
1 change: 1 addition & 0 deletions source/Ecs.CSharp.Benchmark.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "_Solutio
.editorconfig = .editorconfig
..\.gitignore = ..\.gitignore
NuGet.config = NuGet.config
..\Benchmark.bat = ..\Benchmark.bat
..\README.md = ..\README.md
EndProjectSection
EndProject
Expand Down
2 changes: 1 addition & 1 deletion source/Ecs.CSharp.Benchmark/Ecs.CSharp.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>

<DefineConstants>CHECK_CACHE_MISSES</DefineConstants>
<DefineConstants Condition="'$(CheckCacheMisses)' == 'true'">CHECK_CACHE_MISSES</DefineConstants>
</PropertyGroup>

<ItemGroup Label="Analyzers">
Expand Down

0 comments on commit 9284aae

Please sign in to comment.