NBench.Runner 0.3.0

NBench is a cross-platform automated performance profiling and testing framework for.NET applications.

No packages depend on NBench.Runner.

This release introduces some breaking changes to NBench: Tracing** The biggest feature included in this release is the addition of tracing support, which is exposed directly to end-users so they can capture trace events and include them in the output produced by NBench. You can access the `IBenchmarkTrace` object through the `BenchmarkContext` passed into any of your `PerfSetup`, `PerfBenchmark`, or `PerfCleanup` methods like such: ```csharp public class TracingBenchmark { [PerfSetup] public void Setup(BenchmarkContext context) { context.Trace.Debug(SetupTrace); } [PerfBenchmark(TestMode = TestMode.Test, NumberOfIterations = IterationCount, RunTimeMilliseconds = 1000)] [MemoryMeasurement(MemoryMetric.TotalBytesAllocated)] [MemoryAssertion(MemoryMetric.TotalBytesAllocated, MustBe.LessThan, ByteConstants.EightKb)] public void Run1(BenchmarkContext context) { context.Trace.Debug(RunTrace); } [PerfCleanup] public void Cleanup(BenchmarkContext context) { context.Trace.Info(CleanupTrace); } } ``` `NBench.Runner.exe` now takes a `trace=true|false` commandline argument, which will enable the new tracing feature introduced in this release. Tracing is disabled by default**. Skippable Warmups** You can now elect to skip warmups altogether for your specs. This feature is particularly useful for long-running iteration benchmarks, which are often used for stress tests. Warmups don't add any value here. Here's how you can skip warmups: ```csharp [PerfBenchmark(TestMode = TestMode.Test, NumberOfIterations = IterationCount, RunTimeMilliseconds = 1000, SkipWarmups = true)] [MemoryMeasurement(MemoryMetric.TotalBytesAllocated)] [MemoryAssertion(MemoryMetric.TotalBytesAllocated, MustBe.LessThan, ByteConstants.EightKb)] public void Run1(BenchmarkContext context) { context.Trace.Debug(RunTrace); } ``` Just set `SkipWarmups = true` on your `PerfBenchmark` attribute wherever you wish to skip a warmup. Foreground thread is no longer given high priority when concurrent mode is on**. If you are running the `NBench.Runner` with `concurrent=true`, we no longer give the main foreground thread high priority as this resulted in some unfair scheduling during concurrent tests. All threads within the `NBench.Runner` process all share the same priority now. Markdown reports include additional data** All markdown reports now include: The concurrency setting for NBench The tracing setting for NBench A flag indicating if warmups were skipped or not All of these were added in order to make it easy for end-users reading the reports to know what the NBench settings were at the time the report was produced.

This package has no dependencies.

Version Downloads Last updated
1.2.2 20 04/10/2024
1.2.1 15 04/10/2024
1.2.0 19 04/10/2024
1.1.0 22 02/13/2024
1.0.4 19 04/10/2024
1.0.3 21 02/13/2024
1.0.2 17 02/13/2024
1.0.1 19 02/13/2024
1.0.0 18 02/13/2024
0.3.4 41 02/13/2024
0.3.3 21 02/13/2024
0.3.2 40 02/13/2024
0.3.1 23 02/13/2024
0.3.0 22 02/13/2024
0.2.2 21 02/13/2024
0.2.1 20 02/13/2024
0.2.0 19 02/13/2024
0.1.6 32 02/10/2020
0.1.5 19 02/10/2020
0.1.4 25 02/13/2024
0.1.3 31 02/13/2024
0.1.2 31 02/13/2024
0.1.1 29 02/13/2024
0.1.0 18 02/13/2024