BenchmarkDotNet
BenchmarkDotNet copied to clipboard
Feature Request: Add ability to automatically hide metric columns if value is not set
trafficstars
When using ThreadingDiagnoser/ExceptionDiagnoser.
Following metric columns are displayed always .
ExceptionsCompleted Work ItemsLock Contentions
Is it able to automatically hide these columns if all metric values are 0 ?.
It seems to be able to change behaviors by modifying following code.
Excample benchmark code
[ShortRunJob]
[ThreadingDiagnoser]
// [HideColumns(Column.CompletedWorkItems, Column.LockContentions, Column.Exceptions)]
public class Benchmarks
{
[Benchmark]
public void Benchmark()
{
Thread.Sleep(1);
}
}
Console Output
| Method | Mean | Error | StdDev | Exceptions | Completed Work Items | Lock Contentions |
|---------- |---------:|---------:|---------:|-----------:|---------------------:|-----------------:|
| Benchmark | 15.57 ms | 0.364 ms | 0.020 ms | - | - | - |