-
-
Notifications
You must be signed in to change notification settings - Fork 983
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature Request: Add ability to automatically hide metric columns if …
…value is not set (#2673) * Hide the columns described in the issue & add samples for test * Polish sample names * remove irrelevant commit from pr * remove leftovers * Added some helper classes to inject the configuration into the descriptor handler. Added attribute parameters instead of checking the metric.Value directly. * change the injection of configuration * add tests * return the singleton pattern * change private descriptors into internal Implement descriptorConfigInjector base class to keep the code dry * remove DescriptorConfigInjector * remove samples
- Loading branch information
1 parent
cd50f7b
commit cac4f6e
Showing
7 changed files
with
421 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/BenchmarkDotNet/Attributes/ExceptionDiagnoserConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using JetBrains.Annotations; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace BenchmarkDotNet.Attributes | ||
{ | ||
public class ExceptionDiagnoserConfig | ||
{ | ||
/// <param name="displayExceptionsIfZeroValue">Determines whether the Exceptions column is displayed when its value is not calculated. True by default.</param> | ||
|
||
[PublicAPI] | ||
public ExceptionDiagnoserConfig(bool displayExceptionsIfZeroValue = true) | ||
{ | ||
DisplayExceptionsIfZeroValue = displayExceptionsIfZeroValue; | ||
} | ||
|
||
public bool DisplayExceptionsIfZeroValue { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/BenchmarkDotNet/Diagnosers/ThreadingDiagnoserConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using JetBrains.Annotations; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace BenchmarkDotNet.Diagnosers | ||
{ | ||
public class ThreadingDiagnoserConfig | ||
{ | ||
/// <param name="displayLockContentionWhenZero">Display configuration for 'LockContentionCount' when it is empty. True (displayed) by default.</param> | ||
/// <param name="displayCompletedWorkItemCountWhenZero">Display configuration for 'CompletedWorkItemCount' when it is empty. True (displayed) by default.</param> | ||
|
||
[PublicAPI] | ||
public ThreadingDiagnoserConfig(bool displayLockContentionWhenZero = true, bool displayCompletedWorkItemCountWhenZero = true) | ||
{ | ||
DisplayLockContentionWhenZero = displayLockContentionWhenZero; | ||
DisplayCompletedWorkItemCountWhenZero = displayCompletedWorkItemCountWhenZero; | ||
} | ||
|
||
public bool DisplayLockContentionWhenZero { get; } | ||
public bool DisplayCompletedWorkItemCountWhenZero { get; } | ||
} | ||
} |
Oops, something went wrong.