Benchmarking .NET Core 2.0 applications
Benchmarking applications is the process of evaluating and comparing artifacts with the agreed upon standards. To benchmark .NET Core 2.0 application code, we can use the BenchmarkDotNet
tool, which provides a very simple API to evaluate the performance of code in your application. Usually, benchmarking at the micro-level, such as with classes and methods, is not an easy task, and requires quite an effort to measure the performance, whereas BenchmarkDotNet
does all the low-level plumbing and the complex work associated with benchmark solutions.
Exploring BenchmarkDotNet
In this section, we will explore BenchmarkDotNet
and learn how effectively it can be used to measure application performance.
It can simply be installed using a NuGet package manager console window or through the Project References section of your project. To install BenchmarkDotNet
, execute the following command:
Install-Package BenchmarkDotNet
The preceding command adds a BenchmarkDotNet...