Atmoos.Sphere.BenchmarkDotNet 0.1.5

dotnet add package Atmoos.Sphere.BenchmarkDotNet --version 0.1.5                
NuGet\Install-Package Atmoos.Sphere.BenchmarkDotNet -Version 0.1.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Atmoos.Sphere.BenchmarkDotNet" Version="0.1.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Atmoos.Sphere.BenchmarkDotNet --version 0.1.5                
#r "nuget: Atmoos.Sphere.BenchmarkDotNet, 0.1.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Atmoos.Sphere.BenchmarkDotNet as a Cake Addin
#addin nuget:?package=Atmoos.Sphere.BenchmarkDotNet&version=0.1.5

// Install Atmoos.Sphere.BenchmarkDotNet as a Cake Tool
#tool nuget:?package=Atmoos.Sphere.BenchmarkDotNet&version=0.1.5                

Atmoos.Sphere.BenchmarkDotNet

Exports benchmark results into the defining benchmark source files.

nuget package

Summary

This library exports your benchmark results into the corresponding benchmark source files, which can be useful to keep track of the benchmarking results as work on the project progresses.

One scenario is to run all benchmarks before a release or major PR. Improvements and regressions will become visible in the diff.

For examples of this use case please see: Atmoos.Sphere.Benchmark, where this library is used.

Preparing Benchmark Source Files

To mark the location into which the results should be inserted in your benchmark source files, simply add a /* Summary start and Summary */ end tag.

For example like so in MyBenchmark.cs:

public class MyBenchmark
{
    // Your benchmarks go here...
}

/* Summary
Summary */

The benchmark report will be inserted in-between those two tags.

Example Program.cs File

A simple Program.cs file might look something like this:

using BenchmarkDotNet.Running;
using Atmoos.Sphere.BenchmarkDotNet;

var assembly = typeof(Program).Assembly;

var summary = BenchmarkSwitcher.FromAssembly(assembly).Run(args);
await assembly.Export(summary); // this exports your results

Configuration

The Export extension method has an overload which takes an ExportConfig instance with which the export can be configured. This includes custom start and end tags.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.5 141 8/22/2024
0.1.4 92 7/13/2024
0.1.3 111 5/22/2024
0.1.2 115 5/13/2024
0.1.1 107 5/12/2024
0.1.0 94 5/11/2024