Repository navigation
Description
I'm trying to put together a single project to allow me to write tests, profile and bench them and I just can't find a way to get BDN to work. I've uploaded the project codebase to https://github.com/Wraith2/SqlBench and I've been trying various things to get this all working at the same time. There are 3 batch files, make, run and bench which should do what their names suggest using the output of my local corefx build and corerun (following the advanced inner loop development process for corefx). The batch files have variables for the paths so they should be easily rebasable.
Environment is, netcore3.0 runtime 3.0.100-preview-009744 ,sdk 3.0.100-preview-009744 machine wide installs. BDN 0.11.2 for netcoreapp3.0 support.
At the moment bdn seems to stomp on itself. If this doesn't happen I get errors about KernelTraceModule.dll already existing and a similar summary failure exception.
E:\Programming\csharp7\dev\SqlBench>bench
E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj : warning NU1603: SqlBench depends on System.Data.SqlClient (>= 4.7.0-dev.18554.1) but System.Data.SqlClient 4.7.0-dev.18554.1 was not found. An approximate best match of System.Data.SqlClient 4.7.0-preview.18551.3 was resolved.
E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj : warning NU1603: SqlBench depends on System.Data.SqlClient (>= 4.7.0-dev.18554.1) but System.Data.SqlClient 4.7.0-dev.18554.1 was not found. An approximate best match of System.Data.SqlClient 4.7.0-preview.18551.3 was resolved.
// Validating benchmarks:
// ***** BenchmarkRunner: Start *****
// ***** Building 1 exe(s) in Parallel: Start *****
// start E:\Programming\csharp7\sdk\dotnet.exe restore /p:UseSharedCompilation=false in E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e
// command took 1.43s and exited with 0
// start E:\Programming\csharp7\sdk\dotnet.exe build -c Release /p:UseSharedCompilation=false in E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e
// command took 12.31s and exited with 1
// start E:\Programming\csharp7\sdk\dotnet.exe build -c Release --no-dependencies /p:UseSharedCompilation=false in E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e
// command took 2.43s and exited with 0
// start E:\Programming\csharp7\sdk\dotnet.exe publish -c Release /p:UseSharedCompilation=false in E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e
// command took 11.38s and exited with 1
// ***** Done, took 00:00:28 (28.57 sec) *****
// Found benchmarks:
// WriteBenchmarks.InsertInt32: Job-NMMVKM(Runtime=Core, Toolchain=CoreRun, InvocationCount=1, UnrollFactor=1)
// WriteBenchmarks.SyncFloat32: Job-NMMVKM(Runtime=Core, Toolchain=CoreRun, InvocationCount=1, UnrollFactor=1)
// Build Exception: Standard output:
Microsoft (R) Build Engine version 15.9.19+g938f3292a0 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj : warning NU1603: SqlBench depends on System.Data.SqlClient (>= 4.7.0-dev.18554.1) but System.Data.SqlClient 4.7.0-dev.18554.1 was not found. An approximate best match of System.Data.SqlClient 4.7.0-preview.18551.3 was resolved. [E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e\BenchmarkDotNet.Autogenerated.csproj]
E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e\BenchmarkDotNet.Autogenerated.csproj : warning NU1603: SqlBench depends on System.Data.SqlClient (>= 4.7.0-dev.18554.1) but System.Data.SqlClient 4.7.0-dev.18554.1 was not found. An approximate best match of System.Data.SqlClient 4.7.0-preview.18551.3 was resolved.
Restore completed in 21.91 ms for E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj.
Restore completed in 21.91 ms for E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e\BenchmarkDotNet.Autogenerated.csproj.
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(142,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview [E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e\BenchmarkDotNet.Autogenerated.csproj]
E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\fd45b377-cd98-4d6a-9318-c234993c8d6e\BenchmarkDotNet.Autogenerated.csproj : warning NU1603: SqlBench depends on System.Data.SqlClient (>= 4.7.0-dev.18554.1) but System.Data.SqlClient 4.7.0-dev.18554.1 was not found. An approximate best match of System.Data.SqlClient 4.7.0-preview.18551.3 was resolved.
E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj : warning NU1603: SqlBench depends on System.Data.SqlClient (>= 4.7.0-dev.18554.1) but System.Data.SqlClient 4.7.0-dev.18554.1 was not found. An approximate best match of System.Data.SqlClient 4.7.0-preview.18551.3 was resolved.
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 2 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 3 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 4 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): warning MSB3026: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): error MSB3027: Could not copy "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". Exceeded retry count of 10. Failed. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
E:\Programming\csharp7\sdk\sdk\3.0.100-preview-009744\Microsoft.Common.CurrentVersion.targets(4551,5): error MSB3021: Unable to copy file "E:\Programming\csharp7\dev\SqlBench\obj\Release\netcoreapp3.0\SqlBench.exe" to "bin\Release\netcoreapp3.0\SqlBench.exe". The process cannot access the file 'E:\Programming\csharp7\dev\SqlBench\bin\Release\netcoreapp3.0\SqlBench.exe' because it is being used by another process. [E:\Programming\csharp7\dev\SqlBench\SqlBench.csproj]
Can you help me get this to the point where I have a working project I can develop in and produce benchmark results to backup my performance assertions and pull requests please.
Activity
ViktorHofer commentedon Dec 21, 2018
@adamsitnik can you help here? I think you have tools available that help @Wraith2 in his work.
adamsitnik commentedon Jan 11, 2019
Hi @Wraith2
I have created a PR to your repo with the fix: Wraith2/SqlBench#1
A copy of my PR's description so others when google this issue can find the answer too:
To tell the long story short, all you need to do right now to run against local CoreFX build is providing the path to CoreRun.exe via
--coreRunconsole line argument.It's important to provide the path to the right CoreRun.exe, because CoreFX\artifacts\bin has at least few of them.
The right one is:
artifacts\bin\runtime\netcoreapp-Windows_NT-Release-x64\CoreRun.exeWhich one is the right one? The one where CoreFX build puts updated dlls after every CoreFX rebuild. For example: you change System.Collections.Immutable.dll and rebuild CoreFX, then the scripts are going to update System.Collections.Immutable.dll in
artifacts\bin\runtime\netcoreapp-Windows_NT-Release-x64\How it works? When we use CoreRun.exe to run a .NET dll it does not care what it references, it loads the .dlls from it's folder first. So when you reference System.ABC.dll v 4.5 but CoreRun has System.ABC v 4.5.1 then it's going to load and use 4.5.1.
How to run the benchmarks:
dotnet run -c Release --filter * --coreRun "C:\Projects\corefx_fresh\artifacts\bin\runtime\netcoreapp-Windows_NT-Release-x64\CoreRun.exe"Sample output from my machine:
@Wraith2 Please excuse me for a very late reply. If something still does not work for you, please feel free to reopen the isse.
[-]multi use corefx dev project help[/-][+]How to run benchmarks against local CoreFX build?[/+]