Table of Contents

BenchmarkDotNet v0.11.4

It's been few months since our last release, but we have been working hard and have some new features for you!

Highlights

  • Features
    • BenchmarkDotNet as a global tool: a new global tool which allows you to run benchmarks from given library. Now you can run benchmarks from the command line via dotnet benchmark. You can find more information about it in the documentation #1006 #213
    • InProcessEmitToolchain: new, full-featured InProcess toolchain which allows executing benchmarks in the current process without spawning additional process per benchmark. It supports [Arguments], [ArgumentsSource], passing the arguments by out, ref and returning stack-only types like Span<T>. #919, #921 #843
    • ARM support: BenchmarkDotNet supports now ARM and ARM64. #780, #979 #385
    • Mono AOT support: a new toolchain which allows running benchmarks using AOT version of Mono #940
    • NuGet symbol server support: BenchmarkDotNet publishes now the symbols to NuGet.org symbol server and you can easily debug it. #967 #968
    • Experimental support for .NET Core 3.0 WPF benchmarks #1066 For a working example please go to https://github.com/dotMorten/WPFBenchmarkTests
  • Improvements:
    • CoreRT Toolchain improvements - thanks to help from CoreRT Team we were able to make the CoreRT Toolchain work with the latest version of CoreRT #1001, #1057
    • Display the number of benchmarks to run: we now display how many benchmarks are going to be executed before running them and how many remained after running each of them #1048
    • Better list of suggested benchmarks for wrong filter #834 #957
    • Invalid assembly binding redirects generated by VS were a pain to many of our users, we have now implemented an approach that tries to work around this issue. #895, #667, #896, #942
    • Handling duplicates in IConfig #912, #938, #360, #463
    • Disassembly diagnoser should be kept in a separate directory to avoid dependency conflicts #1059
    • Give a warning when the [Benchmark] method is static - we now produce an error when users fail into this common issue #983 #985
    • C# keywords are prohibited as benchmark names #849
    • File names should be consistent across all OSes - < and > are valid on Unix, but not on Windows. We have unified that and now files produced on Unix and Windows have the same names. #981
    • Improve restore, build and publish projects #1002, #1013
    • Make it possible to disable OptimizationsValidator #988
    • Sort enum parameters by value instead of name #977
    • Detect .NET Core benchmark failures from LINQPad #980
    • Improved error logging #1008
    • Improved disassembly diff #1022
    • Using invariant culture for Roslyn Toolchain error messages #1042
    • Use only full names in the auto-generated code to avoid any possible conflicts with user code #1007, #1009 #1010
    • Write the GitHub table format to the console by default #1062
    • Proper cleanup on Ctrl+C/console Window exit #1061
    • Introduce StoppingCriteria - the first step to writing your own heuristic that determines when benchmarking should be stopped #984
  • Breaking changes:
    • .NET Standard 2.0 only - BenchmarkDotNet has a single target now, which should help with some assembly resolving issues. We had to drop .NET 4.6 support because of that and .NET 4.6.1 is now the oldest supported .NET Framework. #1032
    • CustomCoreClrToolchain has been removed, it's recommended to use CoreRunToolchain instead #928
  • Bug fixes:
    • NRE in Summary ctor #986 #987
    • ArgumentNullException when running benchmarks from published .NET Core app #1018
    • Dry jobs can eat iteration failures #1045
    • NullReferenceException in BenchmarkDotNet.Reports.SummaryTable after iteration failure #1046
    • Running the example throws NullReference #1049
    • Fix race condition in process output reader #1051 #1053
    • Fix a rare but really annoying bug where for some reason we were sometimes setting ForegroundColor to the same color as BackgroundColor and some parts of the logged output were invisible commit
    • StopOnFirstError must be respected commit

Milestone details

In the v0.11.4 scope, 42 issues were resolved and 41 pull requests were merged. This release includes 99 commits by 18 contributors.

Resolved issues (42)

  • #213 Add a "benchmark" cmd to dotnet
  • #343 FileNotFoundException on mono (assignee: @AndreyAkinshin)
  • #360 Duplicates handling for IConfig (assignee: @adamsitnik)
  • #385 Consider using S.R.InteropServices.RuntimeInformation.ProcessArchitecture instead pointer based detection of platform (assignee: @adamsitnik)
  • #387 Add a mode to BenchmarkSwitcher that allows to run a method inline for profiling (assignee: @adamsitnik)
  • #463 Review interface IConfig (assignee: @adamsitnik)
  • #660 [Params] should not change the order of provided values
  • #667 Does BenchMarkDotnet supports 4.7.1 Dotnet framework (assignee: @adamsitnik)
  • #687 Implement [Arguments] support for InProcessToolchain (assignee: @ig-sinicyn)
  • #714 Test BenchmarkDotNet against unstable/multimodal benchmarks from CoreCLR/CoreFX repo (assignee: @adamsitnik)
  • #780 ARM support (assignee: @adamsitnik)
  • #834 Better list of suggested benchmarks for wrong filter (assignee: @morgan-kn)
  • #843 Exception when returning a stackonly structure in a benchmark case using in-process toolchain (assignee: @ig-sinicyn)
  • #849 C# keywords are prohibited as benchmark names (assignee: @adamsitnik)
  • #895 Could not load file or assembly 'System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies (assignee: @adamsitnik)
  • #896 .NET 4.7.1 console app tries to use BenchmarkRunner, gets "Could not load file or assembly 'System.Runtime, Version=4.1.2.0" (assignee: @adamsitnik)
  • #919 Feature proposal: full-featured inprocess toolchain (assignee: @ig-sinicyn)
  • #928 Remove CustomCoreClrToolchain (assignee: @adamsitnik)
  • #938 Run benchmark with DisasemblyDiagnoser with --disasam option from console (assignee: @adamsitnik)
  • #942 System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0' after adding BenchmarkDotNet.Diagnostics.Windows (assignee: @adamsitnik)
  • #967 Publish a snupkg to the NuGet.org symbol server (assignee: @WojciechNagorski)
  • #970 False alarm bug report
  • #981 File names should be consistent across all OSes (assignee: @adamsitnik)
  • #982 Invalid string representaiton of CPU Affinity on a machine with more than 32 cores on ARM64 (assignee: @adamsitnik)
  • #983 Give a warning when the [Benchmark] method is static (assignee: @Rizzen)
  • #986 NRE in Summary ctor
  • #988 Make it possible to disable OptimizationsValidator (assignee: @adamsitnik)
  • #998 Missing images in docs (assignee: @AndreyAkinshin)
  • #1002 Multiple build/publish failure with --coreRun toolchain (assignee: @WojciechNagorski)
  • #1007 benchmark cannot have type Action (assignee: @adamsitnik)
  • #1010 Write unit tests which check that BenchmarkProgram.txt doesn't contain usings (assignee: @adamsitnik)
  • #1018 ArgumentNullException when running benchmarks from published .NET Core app
  • #1039 Some tests are broken on Net 461 (culture-dependent thing) (assignee: @ig-sinicyn)
  • #1045 Dry jobs can eat iteration failures (assignee: @adamsitnik)
  • #1046 NullReferenceException in BenchmarkDotNet.Reports.SummaryTable after iteration failure (assignee: @adamsitnik)
  • #1048 Display the number of benchmarks to run (assignee: @adamsitnik)
  • #1049 Running the example throws NullReference (assignee: @adamsitnik)
  • #1051 Fix race condition in process output reader (assignee: @adamsitnik)
  • #1056 Fails to build when targeting .NET Core 3.0 and .NET Framework (assignee: @adamsitnik)
  • #1059 Disassembly diagnoser should be kept in a separate directory to avoid dependency conflicts (assignee: @adamsitnik)
  • #1062 Write the GitHub table format to the console by default (assignee: @adamsitnik)
  • #1065 Allow benchmarking .NET Core Desktop apps (assignee: @adamsitnik)

Merged pull requests (41)

Commits (99)

Contributors (18)

Thank you very much!

Additional details

Date: February 15, 2019

Milestone: v0.11.4 (List of commits)

NuGet Packages: