dotnet nbench
μλ λ‘κ·Έλ‘ μ€ν¨νμ΅λλ€.
β― dotnet nbench
Building for framework netcoreapp2.1...
Benchmark.SimepleOneway.Local -> /SolutionDir/ProjectDir/bin/Release/netcoreapp2.1/Benchmark.SimepleOneway.Local.dll
Running .NET Core 2.1 tests for framework netcoreapp2.1...
OutputDir /SolutionDir/ProjectDir/PerfResults
The specified framework version '2.1' could not be parsed
The specified framework 'Microsoft.NETCore.App', version '2.1' was not found.
- Check application dependencies and target a framework version installed at:
/usr/local/share/dotnet/
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
2.0.9 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
2.1.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
2.1.5 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
@HIPERCUBE νκ²½μ λ¬Έμ κ° μμ μ μμ§λ§ λ€μ νμΈνκ² μ΅λλ€.
νλ‘μ νΈμ λ°νμ λ²μ μ μ§μ νλ global.json
λλ κΈ°ν νλͺ©μ΄ μμ΅λκΉ?
dotnet core 2.1λ‘ NBenchλ₯Ό μ€ννλ λ¬Έμ λ₯Ό νμΈν μ μμ΅λλ€.
The specified framework version '2.1' could not be parsed
The specified framework 'Microsoft.NETCore.App', version '2.1' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
2.0.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.3-servicing-26724-03 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.1.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
gloabl.json
νμΌμ΄ μκ³ λ€λ₯Έ 2.1 νλ‘μ νΈκ° μ μ€νλκ³ μμ΅λλ€. λν λ²μ λΆμΌμΉκ° μλμ§ λ€μ νμΈνκΈ° μν΄ 2.1 λ°νμμ μ€μΉνμ§λ§ μ¬μ ν μλνμ§ μμ΅λλ€.
λμμ΄ λμλ€λ©΄ .csprojμ <RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion>
λ₯Ό μΆκ°νλ©΄ λ¬Έμ κ° ν΄κ²°λμμ΅λλ€(ν¬λ λ§μ https://github.com/dotnet/cli/issues/μ λμ΄λ μ루μ
μ λν΄ @Rene-Sackersμκ² μ 곡λ©λλ€. 10111#issuecomment-429014700).
μ΄κ²μ λ΄κ° λ§ν μ μλ ν dotnet
CLIμ λ¬Έμ μΈ κ² κ°μ΅λλ€. μ°κ²°λ λ¬Έμ λ±μ μ΄ν΄λ΄
λλ€. μ¬κΈ°μ μ°μ¬μ§ μ€λ₯λ NBenchμμ μ¨ κ²μ΄ μλλΌ dotnet-nbench
κ° ν
μ€νΈ λ¬λλ₯Ό μ€ννκΈ° μν΄ μμ±νλ dotnet
νλ‘μΈμ€μμ λ°μν κ²μ
λλ€.
λ¬Έμ μ κ·Όλ³Έ μμΈμ ASP.NET Coreμμ κ°μ Έμ¨ μ΄ DotNetMuxer
ν΄λμ€λ₯Ό μ¬μ©νμ¬ dotnet
νλ‘μΈμ€λ₯Ό νΈμΆνλ λ°©μμΌ μ μλ€λ λλμ΄ λλλ€.
μ¬μμ° νλ‘μ νΈλ₯Ό λ§λ€μμ΅λλ€. https://github.com/Aaronontheweb/NBenchNetCore2.1Repro
dotnet build
νΈμΆν λ€μ κ±°κΈ°μ μλ μν νλ‘μ νΈμμ dotnet nbench
λ₯Ό νΈμΆνλ©΄ λ€μκ³Ό κ°μ μΆλ ₯μ΄ λνλ©λλ€.
Ξ» dotnet nbench
Building for framework netcoreapp2.1...
NBenchRepro -> C:\Repositories\NBenchNetCore2.1Repro\NBenchRepro\bin\Release\netcoreapp2.1\NBenchRepro.dll
Running .NET Core 2.1.0 tests for framework netcoreapp2.1...
OutputDir C:\Repositories\NBenchNetCore2.1Repro\NBenchRepro\PerfResults
Executing Benchmarks in C:\Repositories\NBenchNetCore2.1Repro\NBenchRepro\bin\Release\netcoreapp2.1\NBenchRepro.dll
------------ STARTING NBenchRepro.CounterPerfSpecs+Benchmark ----------
--------------- BEGIN WARMUP ---------------
Elapsed: 00:00:00.1657419
[Counter] TestCounter - operations: 25,439,744.00 ,operations: /s 153,490,119.28 , ns / operations: 6.52
--------------- END WARMUP ---------------
--------------- BEGIN WARMUP ---------------
Elapsed: 00:00:00.1663968
[Counter] TestCounter - operations: 25,439,744.00 ,operations: /s 152,886,017.04 , ns / operations: 6.54
--------------- END WARMUP ---------------
--------------- BEGIN WARMUP ---------------
Elapsed: 00:00:00.1670527
[Counter] TestCounter - operations: 25,439,744.00 ,operations: /s 152,285,739.77 , ns / operations: 6.57
--------------- END WARMUP ---------------
--------------- BEGIN RUN ---------------
Elapsed: 00:00:00.1659459
[Counter] TestCounter - operations: 25,439,744.00 ,operations: /s 153,301,431.37 , ns / operations: 6.52
--------------- END RUN ---------------
--------------- BEGIN RUN ---------------
Elapsed: 00:00:00.1654938
[Counter] TestCounter - operations: 25,439,744.00 ,operations: /s 153,720,223.96 , ns / operations: 6.51
--------------- END RUN ---------------
--------------- BEGIN RUN ---------------
Elapsed: 00:00:00.1651669
[Counter] TestCounter - operations: 25,439,744.00 ,operations: /s 154,024,468.58 , ns / operations: 6.49
--------------- END RUN ---------------
--------------- RESULTS: NBenchRepro.CounterPerfSpecs+Benchmark ---------------
Test to ensure that a minimal throughput test can be rapidly executed.
--------------- DATA ---------------
[Counter] TestCounter: Max: 25,439,744.00 operations, Average: 25,439,744.00 operations, Min: 25,439,744.00 operations, StdDev: 0.00 operations
[Counter] TestCounter: Max / s: 154,024,468.58 operations, Average / s: 153,682,041.30 operations, Min / s: 153,301,431.37 operations, StdDev / s: 363,027.74 operations
--------------- ASSERTIONS ---------------
[PASS] Expected [Counter] TestCounter to must be greater than 10,000,000.00 operations; actual value was 153,682,041.30 operations.
------------ FINISHED NBenchRepro.CounterPerfSpecs+Benchmark ----------
μ΄ κ²½μ° NBench 1.2.2 λ° dotnet --version
2.1.300μ μ¬μ©ν©λλ€.
λ°λΌμ μ΄κ²μ κ³Όκ±°μ dotnet xunit
μμ μ μ¬ν λ¬Έμ κ° μμ£Ό λ°μνλ κ²μ²λΌ νκ²½ λ¬Έμ μ λ§€μ° μ μ¬ν©λλ€. νκ²½μ΄ μ΄λ»κ² μκ²Όλμ§ λλ μ¬μμ° μ¬μμ λν μΆκ° μ 보λ₯Ό μ κ³΅ν΄ μ£Όμλ©΄ μ΄ λ¬Έμ λ₯Ό λ€μ μ΄κ³ κ³μν΄μ μ€λͺ
νκ² μ΅λλ€.
κ·Έλμ @C-Babbageμ μ μμ λ°λΌ λͺ μμ λ°νμ λ²μ μ μ§μ νμ¬ ν΄κ²° λ°©λ²μ μλν μ μμ΅λλ€.
μ΄μ λν νμ μ‘°μΉ - https://github.com/petabridge/Petabridge.Tracing.Zipkin/pull/68μμ μμ νλ λμ μ΄ λ¬Έμ λ₯Ό μ§μ μ¬νν μ μμμ΅λλ€.
Entity Framework λ° XUnit νκ³Ό λμΌν κ²°λ‘ μ λλ¬νμ΅λλ€. μ΄κ²μ CLI μ체μ λ¬Έμ μ΄λ©° ν΄κ²° λ°©λ²μ ν
μ€νΈ νλ‘μ νΈ λ΄μμ RuntimeFrameworkVersion
μ§μ νλ κ²μΌλ‘ 보μ
λλ€. κ·Έλ¬λ©΄ .NET Core λ°νμμ μ¬λ°λ₯΄κ² ν΄κ²°νλ λ° νμν μ λ³΄κ° CLIμ μ 곡λ©λλ€.
μ΄κ²μ΄ ν₯ν κ°μ λκΈ°λ₯Ό λ°λΌμ§λ§ μ΄ μ€λ₯λ dotnet-nbench
κ° μ¬μμ μ€ννκΈ° μν΄ μλ‘μ΄ dotnet
νλ‘μΈμ€λ₯Ό μμν νμ λ°μν©λλ€. μ΄λ CLI λ¬Έμ μ
λλ€.