Skip to content
CAI
Software that uses CAICheck a score

dotnet/BenchmarkDotNet

50.4

Adequate · 12 November 2026

60.5k

lines of production code

C#

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add ARM64 disassembly support

The DisassemblyDiagnoser now supports ARM64 targets on Windows, Linux, and macOS. This change introduces a new \Arm64Disassembler\ and supporting classes (\Arm64InstructionFormatter\, \Arm64RegisterValueAccumulator\) that use the Capstone engine to decode ARM64 instructions. The implementation includes logic to resolve ARM64-specific precode/stub shapes (StubPrecode, FixupPrecode, CallCountingStub) and handles .NET 10 DMB-prefixed stubs, ensuring accurate disassembly of JIT-compiled code on 64-bit ARM platforms.

src/BenchmarkDotNet/Disassemblers · high confidence

Add JSON output format to benchmark listing

The \--list\ command now supports a \json\ mode, allowing users to retrieve benchmark case information in a structured JSON format. This change introduces a new \BenchmarkCaseJsonConverter\ and \JsonBenchmarkCasesPrinter\ within the \ListBenchmarks\ module, enabling programmatic consumption of benchmark metadata such as unique IDs, filter names, full names, categories, job characteristics, and source code locations alongside the existing flat and tree text-based listing modes.

src/BenchmarkDotNet/ConsoleArguments/ListBenchmarks · high confidence

Add ScottPlot-based bar and box plot exporters

Users can now export benchmark results as PNG images using the new ScottPlotExporter, which generates both bar plots and box plots for time-per-operation measurements. The exporter is enabled by default and allows customization of plot dimensions, font sizes, label rotation, and the inclusion of specific plot types via configuration properties.

src/BenchmarkDotNet.Exporters.Plotting · high confidence

Add dotMemory memory profiling diagnoser

Users can now attach JetBrains dotMemory to their benchmarks to capture and analyze memory snapshots. This change introduces the DotMemoryDiagnoser class and a corresponding DotMemoryDiagnoserAttribute, allowing developers to easily enable memory profiling for their benchmark runs.

src/BenchmarkDotNet.Diagnostics.dotMemory · high confidence

Add dotTrace profiler integration

Users can now integrate JetBrains dotTrace profiling directly into BenchmarkDotNet runs. This change introduces the \DotTraceDiagnoser\ class and a corresponding \DotTraceDiagnoserAttribute\ to enable snapshot-based profiling for .NET Framework, .NET Core, and .NET 5+ runtimes on Windows and Linux, as well as R2R-compiled benchmarks.

src/BenchmarkDotNet.Diagnostics.dotTrace · high confidence

Add macOS CPU information detection

BenchmarkDotNet now detects CPU details on macOS by running the \sysctl -a\ command and parsing the output. This change introduces a new \MacOsCpuDetector\ and a corresponding \SysctlCpuInfoParser\ that extract processor name, physical and logical core counts, and frequency information, making this data available for benchmarks running on macOS.

src/BenchmarkDotNet/Detectors/Cpu/Linux, src/BenchmarkDotNet/Detectors/Cpu/macOS · high confidence

Add vstestadapter filter support

The TestAdapter now supports filtering benchmarks using vstest-style test case filters. A new TestCaseFilter utility parses filter expressions from the discovery and run contexts, enabling users to filter tests by fully qualified name, display name, or custom traits. A new LoggerHelper utility standardizes logging output, prefixing messages with timestamps and optional assembly names to improve traceability during test execution.

src/BenchmarkDotNet.TestAdapter/Utility · high confidence

Added auto-generated entry points for C\#, F\#, and VB.NET

The BenchmarkDotNet.TestAdapter now includes new \EntryPoint.cs\, \EntryPoint.fs\, and \EntryPoint.vb\ files in the \entrypoints\ directory. These files provide a standard entry point for each supported language that automatically discovers and runs benchmarks within the current assembly using \BenchmarkSwitcher\. This change supports the updated pack file layout for the test adapter.

src/BenchmarkDotNet.TestAdapter/entrypoints · high confidence

Added launch profiles for CLI commands and benchmark filtering

The sample project now includes a launchSettings.json file that configures Visual Studio launch profiles for common BenchmarkDotNet CLI operations. Users can now easily run specific benchmark sets (e.g., IntroBasic) via command-line filters, execute benchmarks in-process, or invoke CLI commands such as --list json, --info, --help, and --version directly from the IDE without manually typing arguments.

samples/BenchmarkDotNet.Samples/Properties · high confidence

Added polyfills for .NET Standard 2.0 and older .NET versions

Added a set of internal extension methods and types to support APIs introduced in newer .NET versions, ensuring compatibility for users running on .NET Standard 2.0 or older frameworks. This includes argument validation helpers (ThrowIfNullOrEmpty, ThrowIfNullOrWhiteSpace, ThrowIfNull), asynchronous file I/O methods (ReadAllTextAsync, WriteAllTextAsync) with cancellation support, enum utilities (GetValues, Parse, GetNames), a string Contains(char) overload, an UnreachableException type, and a custom AsyncEnumerable implementation that avoids capturing the SynchronizationContext.

src/BenchmarkDotNet/Extensions/Polyfills · high confidence

Added scripts to install templates from source

New batch (Windows) and shell (Linux/macOS) scripts have been added to the templates directory, allowing users to build, pack, and install the BenchmarkDotNet templates directly from source code. These scripts handle the necessary steps to ensure the local template installation does not conflict with the NuGet package version by uninstalling the existing template and installing from the generated .nupkg file.

templates · high confidence

Expanded runtime and toolchain moniker support up to .NET 12

The RuntimeMoniker class now exposes constants for .NET 10, 11, and 12, allowing users to target these versions via attributes or the --runtimes CLI option. Support has also been added for NativeAOT, MonoVM, composite ReadyToRun (R2R), and Mono WebAssembly (including AOT) toolchains across .NET 8 through .NET 11/12, enabling benchmarks to run on these specific execution environments.

src/BenchmarkDotNet.Annotations/Jobs · high confidence

Introduce ConfigOptions flags and new configuration APIs

The configuration system now uses a \ConfigOptions\ enum (bit flags) to control runtime behavior, adding options such as \Resume\ (to continue a stopped run), \ApplesToApples\ (for comparison mode), \DisableParallelBuild\, \GenerateMSBuildBinLog\, and \LogBuildOutput\. A new \WakeLockType\ enum allows benchmarks to prevent the system from sleeping or turning off the display. The \IConfig\ interface and \ManualConfig\ builder have been updated to support these options, along with new fluent extension methods for setting them. Additionally, a new \EventProcessor\ abstraction and \CompositeEventProcessor\ allow users to hook into benchmark lifecycle events (validation, build, run stages) for custom logging or monitoring.

src/BenchmarkDotNet/Configs · high confidence

Introduce ExecuteParameters to consolidate benchmark execution context

A new ExecuteParameters class has been added to the Toolchains/Parameters area to bundle the context required for running a benchmark. This class encapsulates the build result, the specific BenchmarkCase and its ID, logging and resolution services, the launch index, and diagnoser configuration (including a new CompositeInProcessDiagnoser and a standard IDiagnoser with a default NullDiagnoser fallback). It also defines a 2-second process exit timeout, providing a unified parameter set for toolchain execution steps.

src/BenchmarkDotNet/Toolchains/Parameters · high confidence

Introduce InProcessNoEmitToolchain for reflection-based in-process benchmarking

A new InProcessNoEmitToolchain is introduced, allowing benchmarks to run in-process using reflection and delegates instead of emitting dynamic code. This toolchain supports a wide range of return types, including void, Task, ValueTask, and async enumerables, and provides a pluggable IBenchmarkActionFactory for custom action creation. It also includes an InProcessNoEmitSettings option to run benchmarks on a separate thread with a dedicated synchronization context, ensuring consistent execution environments.

src/BenchmarkDotNet/Toolchains/InProcess/NoEmit · high confidence

Introduce JSON export for benchmark results

Users can now export benchmark summaries to JSON format using the new JsonExporter. The exporter provides four built-in modes (Brief, Full, BriefCompressed, FullCompressed) and includes detailed host environment information, benchmark metadata, hardware intrinsic status, and optional memory diagnosis and measurement data.

src/BenchmarkDotNet/Exporters/Json · high confidence

Introduce VSTest adapter for running benchmarks via dotnet test

Adds a new VSTest adapter (BenchmarkDotNet.TestAdapter) that allows BenchmarkDotNet benchmarks to be discovered and executed using the standard VSTest protocol (e.g., via \dotnet test\). The adapter handles test discovery by enumerating benchmarks from assemblies, generates unique fully qualified names to prevent hierarchy splitting in Visual Studio and Rider, and maps benchmark execution results, logs, and validation errors back to the VSTest test runner. It also supports filtering benchmarks by category and ensures proper serialization across AppDomain boundaries.

src/BenchmarkDotNet.TestAdapter · high confidence

Introduce baseline comparison columns and refined column architecture

This change adds new summary table columns for comparing benchmarks against a baseline: a Baseline column to identify the baseline case, BaselineRatio and BaselineRatioSD columns to show mean and standard deviation ratios, and a BaselineAllocationRatio column to display memory allocation ratios. These columns support Value, Percentage, and Trend display styles. The update also refactors the column system by introducing the IColumn, IColumnProvider, and IColumnHidingRule interfaces, along with providers like DefaultColumnProvider and SimpleColumnProvider, to allow more flexible column selection and hiding in reports.

src/BenchmarkDotNet/Columns · high confidence

Introduce in-process diagnosers and new metric descriptors

The diagnosers subsystem now supports in-process execution via the new IInProcessDiagnoser interface and its associated handler and router classes, enabling diagnostics like the ExceptionDiagnoser to run directly within the benchmark process. Additionally, new metric descriptors (AllocatedMemoryMetricDescriptor, AllocatedNativeMemoryDescriptor, NativeMemoryLeakDescriptor) have been added to standardize how memory metrics are reported, and the DiagnoserResults class now exposes a Measurements collection for richer data access.

src/BenchmarkDotNet/Diagnosers · high confidence

Introduction of new benchmarking attributes and lifecycle hooks

This change introduces a suite of new attributes to the BenchmarkDotNet.Annotations library, enabling more granular control over benchmark execution and parameterization. Users can now define setup and cleanup phases at the global and iteration levels using GlobalSetupAttribute, GlobalCleanupAttribute, IterationSetupAttribute, and IterationCleanupAttribute. Parameter handling is expanded with ArgumentsAttribute and ArgumentsSourceAttribute for method-level arguments, alongside ParamsAttribute, ParamsAllValuesAttribute, and ParamsSourceAttribute for field/property parameters. Additional features include BenchmarkCancellationAttribute for cooperative cancellation, AsyncCallerTypeAttribute to override async caller return types, GenericTypeArgumentsAttribute for specifying generic type arguments, and AggressivelyOptimizeMethodsAttribute to force tier-1 JIT compilation. The PriorityAttribute base class allows controlling the display order of columns, while TargetedAttribute provides a mechanism for targeting specific methods.

src/BenchmarkDotNet.Annotations/Attributes · high confidence

New AsciiDoc exporter and updated RPlotExporter script handling

BenchmarkDotNet now includes an AsciiDocExporter that generates reports in the AsciiDoc format, including environment details, benchmark tables, and warnings for any benchmarks that encountered issues. Additionally, the RPlotExporter has been updated to improve how it locates the R script executable, specifically by enhancing the fallback strategy when the R\_HOME environment variable points to an incorrect location.

src/BenchmarkDotNet/Exporters · high confidence

New CSV and CSV Measurements exporters

BenchmarkDotNet now includes dedicated exporters for CSV output. The CsvExporter generates a summary table of benchmark results, supporting configurable separators (comma, semicolon, or current culture) and applying a summary style that formats zero metric values as '0'. The CsvMeasurementsExporter provides a detailed, per-measurement CSV file that includes target, job, and parameter metadata alongside raw measurement data (nanoseconds, operations, and calculated values), with optional memory diagnostic columns (Gen 0/1/2 collections and allocated bytes) when the MemoryDiagnoser is enabled.

src/BenchmarkDotNet/Exporters/Csv · high confidence

New CoreRun toolchain and updated .NET runtime support

Users can now execute benchmarks using a local CoreRun installation via the new CoreRunToolchain, which automatically shadows the CoreRun binary to avoid modifying the original and updates duplicated dependencies in the CoreRun folder with newer versions from the published output. The toolchain infrastructure has been refactored to support .NET 10, 11, and 12 across the NetCoreApp and R2R toolchains, with corresponding static instances added for these versions.

src/BenchmarkDotNet/Toolchains/CoreRun · high confidence

New ETW-based Windows tracing infrastructure for hardware counters and native memory

The Windows diagnostics module now includes a new Event Tracing for Windows (ETW) engine that parses benchmark engine events and kernel hardware performance counter (PMC) samples to calculate precise metrics. This change introduces new tracing classes (BenchmarkEvent, IterationEvent, EngineEventLogParser, TraceLogParser, NativeMemoryLogParser) that enable the EtwProfiler diagnoser to subtract overhead from workload measurements and track native memory allocations, providing more accurate performance data for long-running benchmarks.

src/BenchmarkDotNet.Diagnostics.Windows/Tracing · high confidence

New F\# benchmark samples for string key comparison and tail call analysis

Added a new F\# sample project (\samples/BenchmarkDotNet.Samples.FSharp\) that demonstrates benchmarking patterns in F\#. The sample includes a \StringKeyComparison\ benchmark comparing standard dictionary lookups against ordinal string comparisons, and a \TailCallDetector\ benchmark (enabled on .NET Framework) that analyzes tail call optimization in recursive factorial implementations.

samples/BenchmarkDotNet.Samples.FSharp · high confidence

New HTML, Markdown, and Diff exporters for disassembly reports

The DisassemblyDiagnoser now includes new exporters that generate richer, more readable output. An HTML exporter provides a styled, interactive report with clickable labels and references, while Markdown exporters produce GitHub-flavored syntax-highlighted assembly listings and side-by-side diffs for comparing JIT outputs. These changes improve the clarity and usability of disassembly analysis results.

src/BenchmarkDotNet/Disassemblers/Exporters · high confidence

New IL-emitting async support for InProcess benchmarks

The InProcess Emit toolchain now generates IL code directly to support async benchmarks, replacing the previous synchronous task-consumption approach. This change introduces dedicated emitters (AsyncCoreEmitter, AsyncEnumerableCoreEmitter, AsyncStateMachineEmitter) that construct async state machines at runtime, enabling proper handling of async/await patterns, async enumerables, and runtime-async workloads within the in-process execution model.

src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters · high confidence

New Mono toolchain implementations for .NET 6–11 and AOT support

This change introduces new Mono-specific toolchain classes (CsProjMonoCoreToolchain, RoslynMonoToolchain, RoslynMonoAotToolchain) and their associated builders and executors within the Mono toolchain directory. Users can now benchmark against Mono runtimes for .NET versions 6 through 11 using the new CsProjMonoCoreToolchain, which automatically configures self-contained publishing and runtime identifiers. Additionally, the new RoslynMonoToolchain and RoslynMonoAotToolchain provide support for running benchmarks on Mono, including Ahead-of-Time (AOT) compilation via the LegacyMonoAotBuilder, with validation ensuring Mono is installed and required paths exist.

src/BenchmarkDotNet/Toolchains/Mono · high confidence

New OS and architecture filtering attributes

Users can now filter benchmarks by operating system and CPU architecture using new attributes: \OperatingSystemsFilterAttribute\ (supporting Windows, Linux, macOS, and Browser) and \OperatingSystemsArchitectureFilterAttribute\. These attributes allow enabling or disabling specific platforms and architectures at the method, class, or assembly level, integrating with the existing job category filters (\AllCategoriesFilterAttribute\, \AnyCategoriesFilterAttribute\, \JobCategoryFilterAttribute\) via a shared base class.

src/BenchmarkDotNet/Attributes/Filters · high confidence

New OpenMetrics exporter for benchmark reports

BenchmarkDotNet now includes an OpenMetrics exporter that writes benchmark results to .metrics files. The exporter exposes execution time statistics (mean, error, standard deviation, P90, P95) as gauge metrics in nanoseconds. When the MemoryDiagnoser is enabled, it also exposes garbage collection counters (Gen0, Gen1, Gen2, total operations) and allocated bytes per operation. Additional custom metrics defined in benchmarks are included as gauge metrics, with reserved names handled to avoid conflicts.

src/BenchmarkDotNet/Exporters/OpenMetrics · high confidence

New Roslyn analyzers for \[Arguments\], \[Params\], and \[BenchmarkCancellation\] usage

The BenchmarkDotNet.Analyzers package now includes a comprehensive set of Roslyn analyzers that validate the usage of \[Arguments\], \[ArgumentsSource\], \[Params\], \[ParamsSource\], and \[BenchmarkCancellation\] attributes at compile time. These new rules (BDN1500–BDN1509, BDN1305–BDN1312, BDN1600–BDN1605, and others) catch common configuration errors early, such as mismatched parameter counts, invalid source return types (e.g., missing enumerables or ambiguous async shapes), required parameters in source methods, and incorrect types or accessibility for cancellation tokens. The analyzers also enforce that source methods are not generic and do not yield ref structs, ensuring that the runtime can correctly discover and invoke parameter sources.

src/BenchmarkDotNet.Analyzers · high confidence

New WebAssembly toolchains for Mono and CoreCLR runtimes

BenchmarkDotNet now supports running benchmarks on WebAssembly via new toolchains for both Mono and CoreCLR runtimes. Users can target specific .NET versions (8.0 through 11.0) using Mono WebAssembly (interpreter or AOT) or CoreCLR WebAssembly. The implementation includes a new builder that generates WebAssembly-specific project files and a new executor that handles process execution via either WebSocket or file-based IPC, depending on the JavaScript engine's capabilities.

src/BenchmarkDotNet/Toolchains/Wasm · high confidence

New Windows ETW-based diagnosers and profilers

This release introduces a suite of new diagnostic tools for Windows benchmarks, all built on the Event Tracing for Windows (ETW) infrastructure. The new EtwProfiler provides a configurable base for ETW tracing, enabling the NativeMemoryProfiler to track low-level memory allocations and the ConcurrencyVisualizerProfiler to generate .CvTrace files compatible with Visual Studio's Concurrency Visualizer plugin. Additionally, JIT-level insights are now available via the JitStatsDiagnoser (reporting methods JITted, tiered compilation stats, and JIT-allocated memory), the InliningDiagnoser (tracking method inlining successes and failures with namespace filtering), and the new TailCallDiagnoser (monitoring tail call optimizations). Hardware performance counters are also supported via the EtwProfiler, allowing users to measure metrics like instruction retired and cache misses directly on Windows.

src/BenchmarkDotNet.Diagnostics.Windows · high confidence

New attribute-based API for configuring benchmark exporters

Users can now configure benchmark output formats using dedicated attributes in the \BenchmarkDotNet.Attributes\ namespace, such as \AsciiDocExporterAttribute\, \CsvExporterAttribute\, \HtmlExporterAttribute\, \JsonExporterAttribute\, \MarkdownExporterAttribute\, \OpenMetricsExporterAttribute\, \PlainExporterAttribute\, \RPlotExporterAttribute\, and \XmlExporterAttribute\. These attributes inherit from a new \ExporterConfigBaseAttribute\ base class, which implements \IConfigSource\ to integrate with the configuration system. The attributes support various options, including CSV separators, JSON/XML indentation and measurement exclusion, and specific Markdown dialects (GitHub, StackOverflow, Atlassian). This change introduces a fluent, attribute-driven approach to selecting and customizing export formats directly on benchmark classes or assemblies.

src/BenchmarkDotNet/Attributes/Exporters · high confidence

New attribute-based validators for execution and return value checks

Users can now configure validation behavior directly on benchmark classes using the new ExecutionValidatorAttribute and ReturnValueValidatorAttribute. These attributes, which inherit from the newly introduced ValidatorConfigBaseAttribute, allow you to specify whether validation errors should cause the benchmark run to fail (the default) or be ignored, providing a declarative way to control validation strictness without manual configuration.

src/BenchmarkDotNet/Attributes/Validators · high confidence

New automated changelog generation system

The build process now includes a new changelog generation workflow that automatically fetches release details from GitHub milestones and commits, then assembles structured Markdown files for documentation. This replaces manual changelog updates with an automated pipeline that pulls issue counts, merged pull requests, and contributor lists for each version, ensuring the documentation site always reflects the latest release activity.

build/BenchmarkDotNet.Build/Runners/Changelog · high confidence

New category and attribute-based filtering options

Users can now filter benchmarks by job categories, target categories, or custom attributes in addition to existing name and glob patterns. The new \JobCategoryFilter\ allows selecting benchmarks based on the categories assigned to their jobs, while \AllCategoriesFilter\ and \AnyCategoriesFilter\ enable filtering based on categories attached to the benchmark descriptors themselves. Additionally, \AttributesFilter\ lets users include or exclude benchmarks that possess specific custom attributes on their types or methods, providing more granular control over which benchmarks are executed.

src/BenchmarkDotNet/Filters · high confidence

New code generation engine for benchmark runnables

BenchmarkDotNet now uses a new code generation engine in the \src/BenchmarkDotNet/Code\ directory to produce the runnable benchmark code. This introduces a new \CSharpParameterRenderer\ that renders parameter values as C\# expressions, handling complex source reads and ensuring fully qualified type names to avoid conflicts. The engine supports both synchronous and asynchronous entry points (\CodeGenEntryPointType\) and allows choosing between reflection-based or direct switch-based calls to the benchmark's Run method (\CodeGenBenchmarkRunCallType\) to support AOT scenarios. It also includes dedicated providers for different workload types (sync, async, async enumerable) and manages global setup/cleanup, iteration setup/cleanup, and argument passing with support for by-ref parameters and async cancellation.

src/BenchmarkDotNet/Code · high confidence

New column attributes for benchmark statistics and configuration

This change introduces a comprehensive set of new attributes in the \BenchmarkDotNet.Attributes.Columns\ namespace, allowing users to configure benchmark output columns directly via code annotations. The diff adds attributes for standard statistics (Mean, Median, Min, Max, StdDev, StdError, Q1, Q3, Kurtosis, Skewness, Iterations, MValue, OperationsPerSecond), grouping and metadata (Baseline, Categories, LogicalGroup, Namespace), and statistical testing (ConfidenceIntervalError, WelchTTestPValue/StatisticalTestColumn with configurable thresholds and significance levels). A new \AllStatisticsColumnAttribute\ is also provided to include all available statistics at once. These attributes inherit from a new \ColumnConfigBaseAttribute\ which implements \IConfigSource\, enabling declarative column configuration on benchmark classes or assemblies.

src/BenchmarkDotNet/Attributes/Columns · high confidence

New declarative attributes for configuring benchmarks and diagnosers

This change introduces a comprehensive set of new attributes in the \BenchmarkDotNet.Attributes\ namespace, allowing users to configure benchmark behavior directly via code annotations rather than imperative setup. New attributes include \ArtifactsPathAttribute\ for output directory control, \ConfigAttribute\ for applying custom configurations, and various diagnoser/profiler attributes (\DisassemblyDiagnoserAttribute\, \EventPipeProfilerAttribute\, \ExceptionDiagnoserAttribute\, \HardwareCountersAttribute\, \MemoryDiagnoserAttribute\, \PerfCollectProfilerAttribute\, \ThreadingDiagnoserAttribute\) that enable specific performance analysis tools. Additionally, attributes like \GroupBenchmarksByAttribute\, \HideColumnsAttribute\, \KeepBenchmarkFilesAttribute\, \OrdererAttribute\, \StopOnFirstErrorAttribute\, \UnicodeConsoleLoggerAttribute\, and \WakeLockAttribute\ provide declarative control over grouping, output formatting, error handling, and system power settings.

src/BenchmarkDotNet/Attributes · high confidence

New diagnostic attributes for Windows profiling

Added new attribute-based configuration classes for Windows-specific diagnostics, allowing users to easily enable profiling via attributes on benchmark classes. The new attributes include ConcurrencyVisualizerProfilerAttribute, EtwProfilerAttribute (with configurable buffer size and extra run options), InliningDiagnoserAttribute (with flexible namespace filtering), JitStatsDiagnoserAttribute, NativeMemoryProfilerAttribute, and TailCallDiagnoserAttribute.

src/BenchmarkDotNet.Diagnostics.Windows/Configs · high confidence

New extension methods for process management, statistics formatting, and reflection

This change introduces a suite of new extension methods in the \BenchmarkDotNet.Extensions\ namespace to support benchmark execution and reporting. \ProcessExtensions\ now handles process priority and affinity settings, kills process trees on termination, and configures environment variables (such as disabling ReSharper's DPA agent and controlling JIT optimizations) for benchmarked processes. \StatisticsExtensions\ provides a detailed \ToString\ formatter for benchmark results, including mean, standard error, quartiles, and histograms, while \ReflectionExtensions\ adds helpers to resolve attributes, generate correct C\# type names for code generation, and disambiguate type display names. Additional utilities include \CommonExtensions\ for collection operations, \StringAndTextExtensions\ for command-line escaping and file name sanitization, and \TaskExtensions\ for async waiting with cancellation support on .NET Standard 2.0.

src/BenchmarkDotNet/Extensions · high confidence

New fluent attribute API for job configuration

A new set of attributes has been introduced in the Mutators folder, allowing users to configure benchmark jobs directly via attributes on classes or methods. These include \JobMutatorConfigBaseAttribute\ as the base, along with specific mutators for controlling garbage collection (\GcConcurrent\, \GcForce\, \GcServer\), iteration and invocation counts (\IterationCount\, \InvocationCount\, \InnerIterationCount\, \MinInvokeCount\), timing (\IterationTime\, \MinIterationTime\), warmup (\WarmupCount\, \MinWarmupCount\, \MaxWarmupCount\), accuracy (\MaxAbsoluteError\, \MaxRelativeError\, \EvaluateOverhead\), and other behaviors like \MemoryRandomization\, \Outliers\, \ProcessCount\, \RunOncePerIteration\, \ConsumeTasksSynchronously\, and \JitTiering\. This provides a declarative alternative to the previous configuration methods.

src/BenchmarkDotNet/Attributes/Mutators · high confidence

New helper utilities for file naming, async handling, and process termination

The Helpers directory now includes several new internal utilities: ArtifactFileNameHelper manages trace file paths with length limits and job disambiguation; AwaitHelper and DynamicAwaitHelper provide safe, allocation-aware ways to block on and enumerate async types like ValueTask and IAsyncEnumerable; CancelableStreamReader/StreamWriter offer cancellation support for process I/O; CtrlCCanceler and DisposeAtProcessTermination improve graceful shutdown and cleanup on Ctrl+C or window close; and AsciiHelper, DefaultCultureInfo, DirtyAssemblyResolveHelper, and ExecutionContextHelper provide foundational support for consistent naming, culture, assembly loading, and execution context flow.

src/BenchmarkDotNet/Helpers · high confidence

New in-process toolchain using runtime IL emission

BenchmarkDotNet now includes a new in-process toolchain that generates and executes benchmark code via runtime IL emission rather than compiling to a separate assembly. This change introduces a new \InProcessEmitToolchain\ and associated builder, executor, and runner components that handle artifact paths, thread synchronization, and in-process diagnoser integration, providing an alternative execution model for in-process benchmarks.

src/BenchmarkDotNet/Toolchains/InProcess/Emit · high confidence

New job configuration attributes for in-process and dry-run benchmarks

This change introduces new attribute classes in the \BenchmarkDotNet.Attributes\ namespace to simplify benchmark configuration. \InProcessAttribute\ allows users to run benchmarks within the same process, with options to select between Emit and NoEmit toolchains and to control whether execution occurs on a separate thread. \DryJobAttribute\ provides a quick way to configure a dry-run job that skips actual benchmark execution, useful for validating setup. Additionally, \JobConfigBaseAttribute\ serves as the new base class for job attributes, introducing a \Categories\ property that lets users tag jobs for filtering without affecting execution behavior.

src/BenchmarkDotNet/Attributes/Jobs · high confidence

New sample code and IDE settings for BenchmarkDotNet.Samples

The samples project now includes a .DotSettings file to configure ReSharper inspection severities, alongside a large set of new C\# sample files demonstrating various BenchmarkDotNet features. These samples cover argument handling (IntroArguments, IntroArgumentsPriority, IntroArgumentsSource, IntroArrayParam), configuration sources and unions (IntroConfigSource, IntroConfigUnion), culture info settings (IntroCultureInfo), custom Mono toolchains and arguments (IntroCustomMono, IntroCustomMonoArguments), deferred execution pitfalls (IntroDeferredExecution), disassembly analysis across JITs (IntroDisassembly, IntroDisassemblyAllJits, IntroDisassemblyDry, IntroDisassemblyRyuJit), memory and CPU profiling via dotMemory and dotTrace (IntroDotMemoryDiagnoser, IntroDotTraceDiagnoser), environment variables (IntroEnvVars), EventPipe profiling (IntroEventPipeProfiler, IntroEventPipeProfilerAdvanced), exception tracking (IntroExceptionDiagnoser), various export formats (IntroExport, IntroExportJson, IntroExportXml), filtering logic (IntroFilters), fluent configuration building (IntroFluentConfigBuilder), GC modes (IntroGcMode), generic type arguments (IntroGenericTypeArguments), hardware counters (IntroHardwareCounters), column hiding (IntroHidingColumns), in-process execution (IntroInProcess, IntroInProcessWrongEnv), inlining diagnostics (IntroInliningDiagnoser), JIT statistics (IntroJitStatsDiagnoser), job-level baselines (IntroJobBaseline), joining benchmarks (IntroJoin), and large address awareness (IntroLargeAddressAware).

samples/BenchmarkDotNet.Samples · high confidence

New statistical types and legacy confidence interval support

The Mathematics module now exposes new public types for benchmark analysis: \LegacyConfidenceInterval\ and \LegacyConfidenceLevel\ (supporting levels from 50% to 99.9%) for backward-compatible confidence reporting, \RatioStatistics\ for computing the statistical relationship between two data sets, and \PercentileValues\ for accessing specific percentile metrics (P0–P100). The core \Statistics\ class now includes \OriginalValues\ and \SortedValues\ properties, making raw data available for export to JSON and reuse by external tools.

src/BenchmarkDotNet/Mathematics · high confidence

New templates for in-process diagnostics, WebAssembly support, and Linux performance collection

This update introduces several new code-generation and utility templates. The C\# templates (BenchmarkProgram.txt, BenchmarkType.txt) now support in-process diagnoser handlers and use fully qualified names to prevent naming conflicts with user code, while also poly-filling C\# 11 \required\ members for older runtimes. A new WebAssembly toolchain is supported via benchmark-main.mjs (handling IPC via WebSocket or file-based transports) and WasmLinkerDescription.xml (preventing trimming of System.IntPtr). Additionally, a new BuildPlots.R template generates density plots using the Sheather & Jones bandwidth selector, and a perfcollect bash script is added to facilitate Linux performance data collection via perf\_event.

src/BenchmarkDotNet/Templates · high confidence

Removals

Removed legacy benchmark programs and runner infrastructure

The legacy benchmark suite has been removed, specifically deleting the IncrementBenchmark, MultidimensionalArrayBenchmark, StaticFieldBenchmark, and the Program.cs entry point that managed them. This eliminates the old manual runner and competition-based execution model for these specific tests, aligning with the broader refactoring of the benchmarks directory.

Benchmarks · high confidence

Architecture

Migrate solution format to slnx and add .editorconfig

The repository has migrated its solution file from the legacy .sln format to the new .slnx format (BenchmarkDotNet.slnx), which reorganizes the project structure into folders for build, samples, src, templates, and tests. Additionally, a new .editorconfig file has been introduced to enforce consistent coding styles, such as UTF-8 encoding, LF line endings, and specific C\# formatting rules (e.g., file-scoped namespaces, ConfigureAwait warnings), while a corresponding .slnx.DotSettings file provides JetBrains Rider/ReSharper configuration profiles for the new solution format.

(repo-wide) · high confidence

Refactored benchmark execution engine with new core model classes

The benchmark running infrastructure has been restructured to improve modularity and support for in-process diagnostics. New model classes have been introduced: \BenchmarkCase\ now encapsulates the descriptor, job, parameters, and configuration for a single benchmark instance, replacing the previous \Benchmark\ type; \BenchmarkRunInfo\ aggregates the cases for a specific type along with configuration and validation errors; and \BenchmarkBuildInfo\ tracks build-specific details including the in-process diagnoser. The \BenchmarkConverter\ now produces \BenchmarkRunInfo\ objects, which are partitioned by \BenchmarkPartitioner\ based on runtime properties (toolchain, JIT, platform, GC, etc.) to optimize build concurrency. The \BenchmarkRunnerClean\ class handles the core execution loop, including validation, build (parallel or sequential), and run stages, while \BenchmarkRunner\ (renamed from \BenchmarkRunnerDirty\) manages assembly resolution helpers for .NET Framework compatibility.

src/BenchmarkDotNet/Running · high confidence

Refactored build system into dedicated runner classes

The build automation logic in the \build/BenchmarkDotNet.Build/Runners\ directory has been restructured into distinct, single-responsibility classes: \BuildRunner\ (handling solution restoration, building, and NuGet packaging), \DocumentationRunner\ (managing docfx generation, changelog updates, and analyzer rule documentation), \GitRunner\ (wrapping Git operations with command-line fallbacks for stability), \ReleaseRunner\ (orchestrating version increments, GitHub tagging, milestone updates, and NuGet publishing), and \UnitTestRunner\ (executing unit, analyzer, and integration tests across target frameworks). This change improves maintainability and clarity of the internal build pipeline without altering the external build commands available to users.

build/BenchmarkDotNet.Build/Runners · high confidence

Behavioural changes

3 commits (0 fixes) modifying samples/BenchmarkDotNet.Samples.Maui

A change to existing behaviour in samples/BenchmarkDotNet.Samples.Maui — 3 commits, 31 files: “Port Xamarin samples to .NET MAUI (\#2929)”; “Remove UTF-8 byte order marks”; “chore: Update Samples.Maui projects (\#3314)” (refs \#2929, \#3314).

samples/BenchmarkDotNet.Samples.Maui · medium confidence · unverified

Assembly metadata and visibility configuration for dotTrace diagnostics

The BenchmarkDotNet.Diagnostics.dotTrace module now includes an AssemblyInfo.cs file that explicitly marks the assembly as CLS-compliant and grants internal visibility to the BenchmarkDotNet.Tests assembly, enabling the test suite to access internal implementation details for verification.

src/BenchmarkDotNet.Diagnostics.dotMemory/Properties, src/BenchmarkDotNet.Diagnostics.dotTrace/Properties · high confidence

Assembly weaving now preserves strong-name signatures and applies aggressive optimization

The assembly weaver task now re-signs assemblies with their original strong-name key after weaving, ensuring that signed builds remain valid. It also applies the AggressiveOptimization attribute to all methods in benchmark types (excluding those marked NoOptimization) to improve benchmark accuracy, and enforces NoInlining on benchmark methods to prevent unwanted inlining during execution.

src/BenchmarkDotNet.Weaver/src · high confidence

Build helpers refactored with new utility extensions

The build helper infrastructure has been reorganized by introducing new utility classes: OctokitExtensions provides helper methods for formatting GitHub user and commit information, while Utils adds capabilities for detecting the operating system, parsing .NET verbosity levels, creating authenticated GitHub clients, applying regex replacements, and determining target frameworks based on the CI job context.

build/BenchmarkDotNet.Build/Helpers · high confidence

CLS compliance and internal visibility configured for Windows diagnostics assembly

The BenchmarkDotNet.Diagnostics.Windows assembly is now explicitly marked as CLS-compliant, ensuring it adheres to Common Language Specification standards for broader interoperability. Additionally, the assembly now exposes its internals to the BenchmarkDotNet.IntegrationTests project, facilitating internal testing access without requiring public API exposure.

src/BenchmarkDotNet.Diagnostics.Windows/Properties · high confidence

Centralized assembly metadata and version branding logic

The project now uses a new \BenchmarkDotNetInfo\ class to centralize version handling, stripping build metadata from the informational version to create a clean \BrandVersion\ for user-facing output, and applies \CLSCompliant(true)\ and specific \InternalsVisibleTo\ attributes via a generated \AssemblyInfo.cs\ file.

src/BenchmarkDotNet/Properties · high confidence

Comprehensive validation framework for benchmark definitions

The validation layer has been completely rewritten to use a new \IValidator\ interface with async enumeration, ensuring robust checks before benchmark execution. This update introduces specific validators that enforce correct usage of benchmark attributes: \ParamsValidator\ and \ParamsAllValuesValidator\ now prevent invalid parameter configurations (such as using multiple parameter attributes on the same member or using disallowed types like flags enums). \CompilationValidator\ ensures benchmark methods are instance methods, classes are public and unsealed, and names do not use C\# keywords. \BaselineValidator\ prevents multiple baselines within the same logical group, while \DeferredExecutionValidator\ catches methods returning deferred execution types like \IEnumerable\ or \IQueryable\. Additionally, \AwaitableAsyncEnumerableAmbiguityValidator\ warns when a method returns an awaitable that also matches the async enumerable pattern, and \BenchmarkCancellationValidator\ validates the correct usage of \CancellationToken\ fields and properties.

src/BenchmarkDotNet/Validators · high confidence

CsProj toolchain rejects .NET 12+ Mono SDKs and enforces RyuJit

The CsProj toolchain now validates the target runtime before execution. It rejects benchmarks targeting Mono runtimes when the target framework is .NET 12 or later, as Mono runtime packs are unavailable for those versions. Additionally, it enforces that the RyuJit compiler is used, rejecting configurations that attempt to use the legacy JIT, CPU groups, or very large object support.

src/BenchmarkDotNet/Toolchains/CsProj · high confidence

Engine refactored into stage-based architecture with improved JIT tiering and async handling

The benchmark engine has been restructured into a multi-stage execution model (Jit, Pilot, Warmup, Actual) to improve measurement accuracy and control over the JIT compilation process. The new EngineJitStage actively monitors JIT tier-up events to ensure benchmarks run at tier-1 optimization levels, while also implementing a heuristic to skip unnecessary tiering for long-running benchmarks. The Engine class now uses a dedicated BenchmarkSynchronizationContext to correctly handle async continuations, ensuring they post back to the original thread. Additionally, the Consumer class has been expanded to prevent dead code elimination for a wider range of types, including unmanaged pointers and generic values, without boxing.

src/BenchmarkDotNet/Engines · high confidence

In-process toolchain validation and execution settings

The in-process toolchain now includes explicit validation to ensure that supported environment characteristics (such as JIT, GC, and platform settings) match the current runtime, failing the run if they do not. Additionally, a new \InProcessSettings\ option allows users to configure whether benchmarks execute on a separate thread, and the \InProcessHost\ now supports in-process diagnosers for collecting metrics without spawning a separate process.

src/BenchmarkDotNet/Toolchains/InProcess · high confidence

Introduce structured BuildResult and ExecuteResult types for benchmark execution

The results handling in the toolchain has been refactored to use dedicated \BuildResult\ and \ExecuteResult\ classes instead of ad-hoc return values. \BuildResult\ now explicitly tracks build success, error messages, exceptions, and artifacts to clean up, while \ExecuteResult\ encapsulates execution outcomes including exit codes, process IDs, standard output, parsed measurements, and GC stats. This change provides a more robust and inspectable contract for build and execution phases, allowing users and toolchains to access detailed failure reasons and execution data programmatically.

src/BenchmarkDotNet/Toolchains/Results · high confidence

Introduces a new Characteristics system for job configuration

The \src/BenchmarkDotNet/Characteristics\ directory now contains a new internal framework for managing job settings. This includes core classes like \CharacteristicObject\ and \Characteristic\<T\>\ to define configuration properties, \IResolver\ and \Resolver\ to handle default value resolution, and various \\*Presenter\ classes to format these settings for display, folder naming, and source code generation. This change establishes the structural foundation for how job parameters are stored, resolved, and presented in summaries.

src/BenchmarkDotNet/Characteristics · high confidence

NativeAOT toolchain now supports .NET 12 and uses a new CsProj-based builder

The NativeAOT toolchain has been refactored to use a new \CsProjNativeAotBuilder\ and \CsProjNativeAotToolchain\, replacing the previous implementation. This change adds support for .NET 12 (via \Net12\_0\ static instances) alongside existing versions 7–11. The new builder generates project files using \XElement\ for XML handling and automatically configures NuGet feeds, including a specific feed for local .NET 12 builds. It also ensures reflection directives are generated for types like \System.GC\ to enable \GC.GetAllocatedBytesForCurrentThread()\ during benchmarks, and correctly sets AOT-specific properties such as \PublishAot\ and instruction sets based on the target runtime version.

src/BenchmarkDotNet/Toolchains/NativeAot · high confidence

New analyser infrastructure and baseline custom column warnings

The Analysers module has been refactored to use a new \AnalyserBase\ class and a \Conclusion\ model that categorizes findings as Errors, Warnings, or Hints, with a \CompositeAnalyser\ to aggregate results. This change introduces a new \BaselineCustomAnalyzer\ that warns users when custom baseline columns cannot be computed because the baseline value is too close to zero or the baseline/benchmark is missing. Additionally, the \EnvironmentAnalyser\ now warns if benchmarks are built without optimization (DEBUG configuration) or executed with an attached debugger, and the \ZeroMeasurementAnalyser\ continues to warn when method duration is indistinguishable from empty method duration.

src/BenchmarkDotNet/Analysers · high confidence

New benchmark ordering policies and category-aware sorting

The benchmark execution and summary ordering logic has been updated to support more granular control over how results are presented. Users can now configure job ordering via the new \JobOrderPolicy\ enum (Numeric or Ordinal), which determines whether jobs are sorted by their numeric parameter values or by their declaration order. Additionally, a new \CategoryComparer\ ensures that benchmarks are grouped and sorted by their categories before other criteria, addressing issues where category priority was not respected. The \DefaultOrderer\ now also supports \MethodOrderPolicy\ (Alphabetical or Declared) and \SummaryOrderPolicy\ options (FastestToSlowest, SlowestToFastest, Method, Declared), allowing users to customize the order of benchmarks in both the execution sequence and the final summary report.

src/BenchmarkDotNet/Order · high confidence

New build infrastructure for MAUI samples

The MAUI sample project now includes dedicated build configuration files to streamline compilation and integration. A new solution file (BenchmarkDotNet.Maui.slnx) organizes the sample alongside core BenchmarkDotNet projects, while Directory.Build.props disables documentation generation and packaging for the sample to keep outputs clean. Additionally, Directory.Build.targets explicitly imports the main BenchmarkDotNet build targets, ensuring that samples using ProjectReference correctly inherit the necessary build logic.

samples · high confidence

New build meta classes for repository metadata and version history

Added Repo.cs and VersionHistory.cs to the build meta layer. Repo.cs defines repository constants (owner, name, branches) and provides a method to fetch the number of dependent projects from GitHub. VersionHistory.cs parses a version file to extract the first commit, current version, and stable versions, supporting automated changelog and documentation generation workflows.

build/BenchmarkDotNet.Build/Meta · high confidence

New build system command-line argument parsing infrastructure

The build system introduces a new, structured approach to parsing command-line arguments for its internal tasks. This change adds a dedicated options framework (BoolOption, StringOption, IOption, and KnownOptions) that replaces ad-hoc parsing, enabling consistent handling of flags like --exclusive, --preview, --stable, and --push, as well as string parameters like --verbosity and --next-version. Users interacting with the build scripts will benefit from more robust argument validation and clearer help documentation for these internal build commands.

build/BenchmarkDotNet.Build/Options · high confidence

New centralized build infrastructure and coding standards

The build system has been restructured with new configuration files in the build directory. A new CodingStyle.ruleset enforces Microsoft and StyleCop analyzer rules, while common.props centralizes project properties including C\# 14 language version, nullable context, and assembly signing. Build automation is now handled by new build.sh and build.ps1 scripts that install and use the .NET 8 SDK. Additional files include cSpell.json for spell checking, common.targets for packaging, roslynBands.props for multi-targeting Roslyn analyzers, and versions.txt for version history.

build · high confidence

New command-line argument parsing and configuration system

The console argument handling has been replaced with a new system built on the CommandLine library. This introduces a comprehensive set of new command-line options (defined in CommandLineOptions) for configuring benchmarks, including explicit control over runtimes, exporters, diagnosers, hardware counters, and build settings. The new ConfigParser handles response file expansion and validates arguments, while a new CorrectionsSuggester provides typo-tolerant suggestions for benchmark filters using Levenshtein distance.

src/BenchmarkDotNet/ConsoleArguments · high confidence

New environment information and resolver infrastructure

The environment detection and configuration system has been restructured with new classes and resolvers. BenchmarkEnvironmentInfo and HostEnvironmentInfo now provide detailed runtime, GC, and hardware details, with HostEnvironmentInfo adding CPU, OS, memory, and SDK version detection. A new resolver pattern (EnvironmentResolver, GcResolver, InfrastructureResolver) centralizes the resolution of platform, JIT, GC, and infrastructure settings. The Platform enum has been expanded to include Wasm, S390x, LoongArch64, Armv6, Ppc64le, and RiscV64. Physical memory detection is now available via PhysicalMemoryInfo, and a PowerPlan enum supports power management configuration.

src/BenchmarkDotNet/Environments · high confidence

Optimized build output and native API integration for Windows ARM disassembly

The BenchmarkDotNet package now includes MSBuild targets that automatically filter out unnecessary runtime assets (such as unused Capstone native libraries and satellite assemblies) based on the target platform, resulting in smaller and cleaner build outputs. Additionally, the library has migrated to using CsWin32 for Win32 API bindings, enabling support for Windows ARM disassembly and improving native method integration.

src/BenchmarkDotNet · high confidence

Refactored DotNetCli toolchain into new Builder/Command/Executor classes with improved build error diagnostics

The DotNetCli toolchain implementation has been restructured into new components: DotNetCliBuilder handles project building and artifact management, DotNetCliCommand constructs and executes dotnet CLI commands (restore, build, publish), DotNetCliExecutor runs the benchmark process, and MsBuildErrorMapper provides clearer error messages for common build failures like missing references or incompatible target frameworks. This refactoring improves build reliability, provides better error reporting for users, and maintains compatibility with existing toolchain behavior.

src/BenchmarkDotNet/Toolchains/DotNetCli · high confidence

Refactored IL emission helpers into dedicated extension classes

The IL generation logic in the Reflection.Emit helpers has been reorganized into specific extension classes (IlGeneratorCallExtensions, IlGeneratorDefaultValueExtensions, IlGeneratorEmitOpExtensions, IlGeneratorStatementExtensions, MethodBuilderExtensions, TypeBuilderExtensions) and a new EmitParameterInfo class. This change introduces optimized IL emission for local variables, arguments, and default values, adds support for aggressive optimization flags on emitted methods, and provides structured helpers for defining constructors and methods, improving the maintainability and performance of the dynamic code generation used for benchmarks.

src/BenchmarkDotNet/Helpers/Reflection.Emit · high confidence

Refactored OS and CPU detection to use platform-specific detectors

The OS and CPU detection logic has been restructured to use dedicated, platform-specific detector classes (Windows, Linux, macOS) rather than monolithic implementations. The new OsDetector now explicitly identifies WSL environments by checking for the WSLInterop file and retrieves the Windows Update Build Revision (UBR) from the registry for more precise version reporting. CPU detection is now handled by a composite CpuDetector that delegates to platform-specific implementations, allowing for cleaner separation of concerns and easier maintenance of platform-specific logic.

src/BenchmarkDotNet/Detectors · high confidence

Refactored benchmark reporting into a new report-centric model

The reporting layer in src/BenchmarkDotNet/Reports has been restructured to use a new \BenchmarkReport\ class that encapsulates per-benchmark data (measurements, GC stats, metrics) and a \Summary\ class that aggregates these reports. This change introduces a \BaseliningStrategy\ to support both descriptor-based and job-based baselines, a \DisplayPrecisionManager\ for smarter decimal precision in tables, and a \SummaryStyle\ that now includes \RatioStyle\ and \TextJustification\ settings. The \SummaryTable\ and its extensions have been updated to work with this new structure, enabling features like logical grouping, column hiding, and improved text formatting in the final output.

src/BenchmarkDotNet/Reports · high confidence

Refactored in-process runnable argument and parameter binding logic

The in-process benchmark engine now uses a new \RunnableReflectionHelpers\ class to handle the mapping of arguments and parameters to benchmark instances. This change introduces specific logic for type conversion (including handling \ReadOnlySpan\<char\>\ and custom operators) and ensures that static and instance parameters are correctly resolved and set on the runnable object, improving the reliability of argument injection during in-process execution.

src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Runnable · high confidence

Refactored job configuration into a modular, fluent API

The job configuration system has been restructured from a flat set of properties into a hierarchical model with dedicated mode classes: AccuracyMode, EnvironmentMode, GcMode, InfrastructureMode, RunMode, and MetaMode. This change introduces a fluent API via extension methods (e.g., WithGcServer, WithPlatform, WithIterationCount) that allow users to configure benchmarks in a more readable and composable way. The refactoring also introduces new capabilities such as MSBuild argument escaping via MsBuildProperty, processor affinity support wider than 32 processors, large address awareness for 32-bit benchmarks, and power plan enforcement. Job comparison and deduplication logic has been updated to ignore categories and compare actual characteristic values to prevent silent deduplication of jobs that differ only in toolchain settings.

src/BenchmarkDotNet/Jobs · high confidence

Refactored logging infrastructure with new ILogger interface and thread-safe output handling

The logging system has been restructured around a new ILogger interface, introducing several new components to improve reliability and flexibility. A new CompositeLogger ensures thread-safe access when multiple loggers are active concurrently, preventing race conditions. The AsyncProcessOutputReader now uses a ConcurrentQueue and Channel-based architecture to read process output asynchronously, fixing previous hangs and race issues. Additionally, new loggers include AccumulationLogger for capturing logs in memory, LogCapture for structured test assertions, and LinqPadLogger with monospaced font support. The ConsoleLogger now respects the NO\_COLOR environment variable and correctly restores foreground colors after writing.

src/BenchmarkDotNet/Loggers · high confidence

Refactored parameter handling with deep comparison and improved display

The parameter system has been refactored to introduce a new \ParameterDefinition\ model and a \DeepEqualityComparer\ that compares parameters by their actual object values rather than string representations. This change enables accurate comparison and sorting for complex types like tuples, dictionaries, and multi-dimensional arrays. Additionally, array parameters are now displayed with their dimensions (e.g., "Int32\[3\]"), and long string arguments are intelligently trimmed with length indicators to improve readability in benchmark results.

src/BenchmarkDotNet/Parameters · high confidence

Refactored runtime detection and added JIT tiering analysis

The Portability module has been refactored to improve runtime identification and provide deeper insights into the Just-In-Time (JIT) compiler. A new JitInfo class now detects and exposes .NET tiered compilation settings (such as On-Stack Replacement and PGO) by reading environment variables and AppContext knobs, allowing users to understand how their benchmarks are being optimized. RuntimeInformation has been updated to disambiguate between NativeAOT, Wasm, and Mono AOT, and to correctly report versions for new Mono runtimes. Additionally, new helper classes for Antivirus, CodeGen, Hyper-V, VMware, VirtualBox, and libc support have been added to enhance platform detection and utility.

src/BenchmarkDotNet/Portability · high confidence

Refactored runtime model with explicit versioned classes and moniker parsing

The runtime detection and configuration system has been restructured from a single monolithic class into a hierarchy of specific runtime classes (ClrRuntime, CoreRuntime, MonoCoreRuntime, NativeAotRuntime, R2RRuntime, and various WebAssembly variants). This change introduces explicit support for newer .NET versions (up to .NET 12) and platform-specific target frameworks (e.g., net8.0-windows) in CoreRuntime. It also standardizes how runtimes are identified and selected via a new \Runtime.Parse\ method that handles both dotted and compact moniker strings, ensuring that benchmarks target the correct runtime version and toolchain automatically.

src/BenchmarkDotNet/Environments/Runtimes · high confidence

Refactored toolchain build and execution infrastructure

The toolchain layer has been restructured to improve modularity and reliability. A new \ArtifactsPaths\ record centralizes all build and execution file locations, replacing scattered path logic. The \BuilderBase\ class now provides a unified, asynchronous build pipeline that handles artifact generation, cleanup, and error handling, while \AppConfigGenerator\ ensures runtime settings (such as JIT and GC configurations) are correctly applied to the generated \app.config\. Additionally, the \Executor\ has been updated to use TCP-based communication with the benchmark process via a \Broker\, and a new \LargeAddressAware\ utility allows 32-bit benchmarks to access more than 2GB of memory. These changes streamline how benchmarks are built, configured, and executed, providing a more robust foundation for existing and future toolchains.

src/BenchmarkDotNet/Toolchains · high confidence

Removal of legacy Benchmark API and introduction of structured toolchain settings

The legacy, simple Benchmark API (including Benchmark, BenchmarkCompetition, and related classes) has been removed, requiring users to adopt the modern, attribute-based benchmarking approach. Concurrently, the toolchain configuration system has been refactored to use strongly-typed, immutable settings records (such as CoreRunSettings, NativeAotSettings, and WasmSettings) that provide value-based equality for accurate job deduplication and build partitioning, and a new BenchmarkId struct is introduced to robustly identify benchmarks and handle long argument names.

BenchmarkDotNet · high confidence

Replace SimpleJson with System.Text.Json serialization

The JSON serialization implementation in the Serialization module has been replaced with the native System.Text.Json library. This change introduces new serializer classes (BdnJsonSerializer, BdnSimpleJsonSerializer) and a source-generated context (BdnJsonSerializerContext) to handle benchmark data, removing the previous SimpleJson dependency. Users will benefit from improved performance and standard .NET serialization behavior, including specific handling for NaN and Infinity values in floating-point numbers to maintain compatibility with existing export formats.

src/BenchmarkDotNet/Serialization · high confidence

Replaced legacy build script with Cake Frosting automation

The build system has been rewritten using Cake Frosting, introducing a structured command-line interface with dedicated tasks for packing, restoring, building, and testing (including new integration tests for .NET 8 and .NET Framework 4.7.2). This change centralizes build configuration in BuildContext, standardizes MSBuild settings, and provides improved help documentation and argument parsing for developers running local builds.

build/BenchmarkDotNet.Build · high confidence

Roslyn toolchain restricted to .NET Framework and legacy Mono

The Roslyn-based toolchain now enforces validation that benchmarks can only run on .NET Framework or legacy Mono environments; attempts to use it with .NET Core or modern .NET will result in a validation error. Additionally, the toolchain no longer supports custom build configurations, as it generates its own build scripts rather than rebuilding the source project.

src/BenchmarkDotNet/Toolchains/Roslyn · high confidence

Updated CPU instruction set detection for .NET 10+ and modern x86/ARM features

The CPU detector in BenchmarkDotNet now accurately identifies newer hardware instruction sets, including AVX10 (v1 and v2), AVX512 v2/v3, and specific ARM extensions, by leveraging native runtime intrinsics for .NET 6.0 and later. This ensures that benchmark reports reflect the precise capabilities of modern x86-64 and ARM64 processors, providing more granular and correct hardware profiling data for users running on recent .NET versions.

src/BenchmarkDotNet/Detectors/Cpu · high confidence

Updated benchmark project templates with new framework support and configuration options

The C\#, F\#, and VB benchmark project templates have been updated to support .NET 10, .NET 11, and .NET 12 in addition to existing frameworks, with .NET 8.0 set as the default for console applications. The templates now include a \--console-app\ flag to generate either a console app or a class library, and a \--config\ flag to optionally include a \BenchmarkConfig\ class. The default BenchmarkDotNet version referenced in the templates has been updated to 0.16.0.

templates/templates · high confidence

Windows CPU detection now uses Win32 API and CIM as primary methods, with WMIC as fallback

The Windows CPU detector has been refactored to improve reliability on modern Windows versions. It now primarily uses the Win32 API (GetLogicalProcessorInformationEx) and the Windows Registry to detect CPU core counts and frequencies, with a new PowerShell CIM-based detector as an alternative. The legacy WMIC-based detector is retained but serves as a fallback, addressing issues where WMIC is not installed (e.g., Windows 11 25H2). This change removes the dependency on System.Management and ensures CPU information is detected even when WMIC is unavailable.

src/BenchmarkDotNet/Detectors/Cpu/Windows · high confidence

XML exporter rewritten to include memory allocation stats and measurements

The XML export functionality has been refactored to ensure that \BytesAllocatedPerOperation\ is correctly persisted in the report, addressing a previous omission. The new implementation also introduces a \Measurements\ property in the output, allowing users to access detailed measurement data when using the full export modes (e.g., \-full\), while brief modes continue to exclude these details. This change improves the completeness and accuracy of the XML benchmark reports.

src/BenchmarkDotNet/Exporters/Xml · high confidence

Test coverage

10 commits adding/updating tests in tests/BenchmarkDotNet.Tests/Environments; 2 commits adding/updating tests in tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/Properties; 7 commits adding/updating tests in tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly; Added AssemblyInfo.cs with GUID for integration tests; Added integration test for multi-framework benchmark execution; Added integration tests for CPU and PowerShell detection; Added integration tests for JIT optimization validation; Added integration tests for custom path DLL references and output file copying; Added integration tests for in-process emit scenarios; Added integration tests for runtime-async benchmarks and in-process diagnosers; Added integration tests for the InProcess Emit toolchain; Added manual integration tests for dotMemory, dotTrace, and MSBuild arguments; Added serialization tests for disassembler models and summary JSON handling; Added test fixtures for Roslyn analyzer validation; Added test infrastructure for Perfonar; Added test infrastructure for Roslyn analyzer validation; Added tests for BenchmarkDotNet helper utilities; Added tests for CPU info parsing and formatting; Added tests for DotMemory diagnoser runtime support; Added tests for HostEnvironmentInfo lazy initialization; Added tests for OutliersAnalyser and ZeroMeasurementHelper; Added tests for Perfonar table rendering and configuration; Added tests for ScottPlot exporter bar and box plots; Added tests for analyzer code fixes; Added tests for benchmark conversion, job mutators, and runtime grouping; Added tests for benchmark ordering and job comparison logic; Added tests for benchmark validation logic; Added tests for engine stage execution and configuration; Added tests for environment requirement checker; Added tests for general Roslyn analyzers; Added tests for hypervisor detection logic; Added tests for job categories, auto-generated IDs, and MSBuild argument escaping; Added tests for mutator attribute constraints and ParamsAllValues validation; Added tests for report column uniqueness, precision, and table formatting; Added tests for the dotTrace diagnoser; Added tests for version metadata removal logic; Added unit tests for BenchmarkDotNet configuration and job handling; Added unit tests for BenchmarkDotNet core components; Added unit tests for LoggerWithPrefix multiline handling; Added unit tests for Roslyn analyzers validating BenchmarkDotNet attributes; Added unit tests for benchmark report columns; Added unit tests for mathematics utilities; Added unit tests for the Arm64 disassembler; Added verification tests for benchmark exporters and XML serialization; Configure test collection behavior for integration tests; New shared test infrastructure and mock utilities; Standardized test execution and coverage configuration.

Dependencies

Upgrade to .NET 10 and update core dependencies

BenchmarkDotNet now targets .NET 10 (net10.0) across its build tools, samples, and test projects, adding it as a primary target framework alongside existing ones like net472 and net8.0. This update includes upgrading the build system to use Cake.Frosting 6.2.0 and Octokit 14.0.0, updating the Roslyn compiler packages to version 5.6.0, and refreshing diagnostic and plotting libraries such as TraceEvent 3.2.5, ScottPlot 5.1.59, and JetBrains.Profiler.SelfApi 2.5.18. The .NET 10 target enables users to benchmark applications running on the latest runtime version.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 54 → 50 (-3.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 64 → 64 (-0.0)
  • Architecture 99 → 73 (-25.6)
  • Maturity 60 → 64 (+3.8)
  • Readiness 79 → 65 (-14.5)
  • Security 39 → 33 (-6.1)
  • Performance 81 → 77 (-3.9)

Resolved (147)

  • Coverage not measured — no coverage collector is wired up
  • Duplicated block (10 lines × 2) (src/BenchmarkDotNet.Analyzers/AnalyzerHelper.cs)
  • Duplicated block (10 lines × 2) (src/BenchmarkDotNet/Columns/BaselineColumn.cs)
  • Duplicated block (10 lines × 2) (src/BenchmarkDotNet/Serialization/BdnSimpleJsonSerializer.cs)
  • Duplicated block (10 lines × 2) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/AsyncCoreEmitter.cs)
  • Duplicated block (10 lines × 2) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitExecutor.cs)
  • Duplicated block (10 lines × 3) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/AsyncCoreEmitterBase.cs)
  • Duplicated block (10 lines × 4) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/AsyncEnumerableCoreEmitter.cs)
  • Duplicated block (10–11 lines × 2) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/AsyncCoreEmitterBase.cs)
  • Duplicated block (11 lines × 2) (src/BenchmarkDotNet.Analyzers/Attributes/GeneralParameterAttributesAnalyzer.cs)
  • Duplicated block (11 lines × 2) (src/BenchmarkDotNet/Engines/EnginePilotStage.cs)
  • Duplicated block (11 lines × 2) (src/BenchmarkDotNet/Toolchains/DotNetCli/DotNetCliExecutor.cs)
  • Duplicated block (11 lines × 2) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitRunner.cs)
  • Duplicated block (11 lines × 3) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/AsyncCoreEmitter.cs)
  • Duplicated block (12 lines × 2) (src/BenchmarkDotNet/Configs/IConfig.cs)
  • Duplicated block (12 lines × 2) (src/BenchmarkDotNet/Engines/EngineActualStage.cs)
  • Duplicated block (12 lines × 2) (src/BenchmarkDotNet/Toolchains/Mono/RoslynMonoAotToolchain.cs)
  • Duplicated block (12 lines × 2) (src/BenchmarkDotNet/Validators/ExecutionValidator.cs)
  • Duplicated block (12 lines × 3) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/AsyncCoreEmitter.cs)
  • Duplicated block (13 lines × 2) (src/BenchmarkDotNet/Serialization/BdnJsonSerializer.cs)
  • …and 127 more

New (120)

  • Duplicated block (15 lines × 2) (src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitRunner.cs)
  • Edited copies of one member (4 members, 16+ corresponding lines) (src/BenchmarkDotNet.Analyzers/Attributes/ArgumentsAttributeAnalyzer.cs)
  • Edited copies of one member (4 members, 7+ corresponding lines) (src/BenchmarkDotNet/Extensions/TaskExtensions.cs)
  • Edited copy of a member (15 corresponding lines) (src/BenchmarkDotNet.Analyzers/Attributes/ParamsAttributeAnalyzer.cs)
  • Edited copy of a member (20 corresponding lines) (src/BenchmarkDotNet/Engines/GcStats.cs)
  • Edited copy of a member (25 corresponding lines) (src/BenchmarkDotNet.Analyzers/AnalyzerHelper.cs)
  • Edited copy of a member (26 corresponding lines) (src/BenchmarkDotNet.Analyzers/AnalyzerHelper.cs)
  • Edited copy of a member (26 corresponding lines) (src/BenchmarkDotNet/Helpers/CancelableStreamWriter.cs)
  • Edited copy of a member (31 corresponding lines) (src/BenchmarkDotNet.Analyzers/Attributes/SetupCleanupAsyncEnumerableAnalyzer.cs)
  • Edited copy of a member (38 corresponding lines) (src/BenchmarkDotNet/Helpers/Hashing/XxHashShared.cs)
  • Edited copy of a member (45 corresponding lines) (src/BenchmarkDotNet.Analyzers/Attributes/BenchmarkCancellationAttributeAnalyzer.cs)
  • Edited copy of a member (49 corresponding lines) (src/BenchmarkDotNet.Diagnostics.Windows/InliningDiagnoser.cs)
  • Edited copy of a member (52 corresponding lines) (src/BenchmarkDotNet.Analyzers/Attributes/SetupCleanupAsyncEnumerableAnalyzer.cs)
  • Edited copy of a member (6 corresponding lines) (samples/BenchmarkDotNet.Samples/IntroHardwareCounters.cs)
  • Edited copy of a member (6 corresponding lines) (src/BenchmarkDotNet/Extensions/TaskExtensions.cs)
  • Edited copy of a member (69 corresponding lines) (src/BenchmarkDotNet/Parameters/DeepEqualityComparer.cs)
  • Edited copy of a member (7 corresponding lines) (src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs)
  • Edited copy of a member (74 corresponding lines) (src/BenchmarkDotNet.Exporters.Plotting/ScottPlotExporter.cs)
  • Edited copy of a member (9 corresponding lines) (samples/BenchmarkDotNet.Samples/IntroDisassembly.cs)
  • High: security finding (details withheld)
  • …and 100 more

Changes since last survey

  • 25 commits — 18 feature/other, 7 fixes

By area

  • src/BenchmarkDotNet — 7 commits
  • build/BenchmarkDotNet.Build — 4 commits
  • .github/workflows — 2 commits
  • samples/BenchmarkDotNet.Samples.Maui — 2 commits
  • src/BenchmarkDotNet.Weaver — 2 commits
  • templates/templates — 2 commits
  • tests/BenchmarkDotNet.IntegrationTests — 2 commits
  • .github/actions — 1 commit
  • docs/articles — 1 commit
  • samples/BenchmarkDotNet.Samples — 1 commit
  • tests/Directory.Build.props — 1 commit

Notable commits

  • fix: Fix changelog compare max 250 commits.
  • fix: Fix detection of the debug assembles for F# (#3318)
  • fix: Fix next version message.
  • fix: Fix x64 disassembly addresses lost in JSON round-trip (#3323)
  • fix: Public API fix (#3320)
  • fix: Revert "Set next BenchmarkDotNet version: 0.16.1 and update released analyzer rules"
  • fix: chore: fix warning when running tests on specific test projects (#3317)
  • change: Document how to use runtimeconfig.template.json with the generated project (#3303)
  • change: Don't let a build option swallow a following /p: argument
  • change: Include instead of exclude polyfills (#3306)
  • change: Keep reference gathering framework-dependent (#3312)
  • change: Publish to NuGet before pushing the release
  • change: Re-pack the committed Weaver with the develop suffix after a version bump
  • change: Remove UTF-8 byte order marks
  • change: Set next BenchmarkDotNet version: 0.16.1 and update released analyzer rules
  • change: Support open generic method-level async method builders (#3322)
  • change: Tidy API surface that is new in 0.16 before release
  • change: Update dependencies.
  • change: Validate --maxWidth instead of throwing (#3309)
  • change: chore: Modify .editorconfig settings and apply dotnet format command. (#3295)
  • …and 5 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dotnet/BenchmarkDotNet was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 12 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 95f89955d3c91478d4c0f233b79ce7f34f34c213 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.42+preprod-6bc2a431cb25.