New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to hide Gen X columns #1764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
…rColumns # Conflicts: # src/BenchmarkDotNet/Diagnosers/MemoryDiagnoser.cs
@AndreyAkinshin great catch! I've fixed that in 51d39f0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamsitnik now it works great, thanks!
Some of our users, are not interested in the
Gen 0/1/2
columns, all they want to see is theAllocated
column.Example:
Before:
First commit (don't display Gen X collumn if there was no collections in Gen X):
cc @stephentoub