Allow users to hide Gen X columns by adamsitnik · Pull Request #1764 · dotnet/BenchmarkDotNet (original) (raw)
It seems that we have some problems with the column order. Let's consider the following benchmark class:
[MemoryDiagnoser] public class ColumnOrder { [Benchmark] public byte[] A() => new byte[8];
[Benchmark]
public void B()
{
byte[] b = new byte[8];
GC.Collect();
}}
It gives a summary table like this one:
| Method | Mean | Error | StdDev | Gen 0 | Allocated | Gen 1 | Gen 2 |
|---|---|---|---|---|---|---|---|
| A | 2.720 ns | 0.6458 ns | 0.0354 ns | 0.0077 | 32 B | - | - |
| B | 64,272.705 ns | 28,250.1984 ns | 1,548.4887 ns | 1000.0000 | 32 B | 1000.0000 | 1000.0000 |
As you can see, now we have the Allocated column between Gen 0 and Gen 1.