Soenneker.Benchmarking.Extensions.Summary
11.0.246
Prefix Reserved
dotnet add package Soenneker.Benchmarking.Extensions.Summary --version 11.0.246
NuGet\Install-Package Soenneker.Benchmarking.Extensions.Summary -Version 11.0.246
<PackageReference Include="Soenneker.Benchmarking.Extensions.Summary" Version="11.0.246" />
<PackageVersion Include="Soenneker.Benchmarking.Extensions.Summary" Version="11.0.246" />
<PackageReference Include="Soenneker.Benchmarking.Extensions.Summary" />
paket add Soenneker.Benchmarking.Extensions.Summary --version 11.0.246
#r "nuget: Soenneker.Benchmarking.Extensions.Summary, 11.0.246"
#:package Soenneker.Benchmarking.Extensions.Summary@11.0.246
#addin nuget:?package=Soenneker.Benchmarking.Extensions.Summary&version=11.0.246
#tool nuget:?package=Soenneker.Benchmarking.Extensions.Summary&version=11.0.246
Soenneker.Benchmarking.Extensions.Summary
A BenchmarkDotNet Summary extension that copies the generated benchmark log into the current TUnit test output.
Installation
dotnet add package Soenneker.Benchmarking.Extensions.Summary
Usage in a TUnit test
using BenchmarkDotNet.Running;
using Soenneker.Benchmarking.Extensions.Summary;
public sealed class BenchmarkTests
{
[Test]
public async Task Run_benchmarks()
{
BenchmarkDotNet.Reports.Summary summary =
BenchmarkRunner.Run<SerializationBenchmarks>();
await summary.OutputSummaryToLog();
}
}
OutputSummaryToLog() reads Summary.LogFilePath and writes the full file contents to TestContext.Current.Output. This makes BenchmarkDotNet output visible in the TUnit report and CI test logs.
Behavior
- Outside an active TUnit test,
TestContext.Currentisnulland the method returns without output. - A missing, blank, or nonexistent
LogFilePathwrites a diagnostic message instead of throwing. - An empty log file writes an explicit empty-file message.
- The file is opened with shared read access, so BenchmarkDotNet or another process can still hold it open.
- Cancellation is checked before and during the asynchronous file read.
- Passing a null
SummarythrowsArgumentNullException.
BenchmarkDotNet logs can contain machine, runtime, path, and benchmark metadata. Review that content before publishing TUnit output from a public CI job.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- BenchmarkDotNet (>= 0.15.8)
- Soenneker.Utils.File (>= 11.0.2369)
- TUnit.Core (>= 1.90.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Benchmarking.Extensions.Summary:
| Package | Downloads |
|---|---|
|
Soenneker.Tests.Benchmark
A base class providing a reusable BenchmarkDotNet configuration for benchmark tests. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.246 | 0 | 12/6/2026 |
| 11.0.245 | 74 | 12/5/2026 |
| 11.0.244 | 105 | 12/4/2026 |
| 11.0.243 | 102 | 12/3/2026 |
| 11.0.242 | 59 | 12/3/2026 |
| 11.0.241 | 118 | 12/3/2026 |
| 11.0.240 | 77 | 12/3/2026 |
| 11.0.239 | 58 | 12/3/2026 |
| 11.0.238 | 73 | 12/2/2026 |
| 11.0.237 | 73 | 12/2/2026 |
| 11.0.236 | 53 | 12/2/2026 |
| 11.0.234 | 91 | 12/2/2026 |
| 11.0.233 | 160 | 12/2/2026 |
| 11.0.232 | 109 | 12/2/2026 |
| 11.0.231 | 120 | 12/1/2026 |
| 11.0.230 | 104 | 12/1/2026 |
| 11.0.229 | 127 | 12/1/2026 |
| 11.0.228 | 130 | 12/1/2026 |
| 11.0.227 | 118 | 12/1/2026 |
| 11.0.226 | 154 | 11/30/2026 |
Update dependency TUnit.Core to 1.90.6 (#256)