-
-
Notifications
You must be signed in to change notification settings - Fork 986
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
add quiet logger #2161
Open
franciscomoloureiro
wants to merge
5
commits into
dotnet:master
Choose a base branch
from
franciscomoloureiro:quiet-mode
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add quiet logger #2161
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fcf693d
add quiet mode setting
franciscomoloureiro 80d2f38
use quiet logger
franciscomoloureiro c70dc82
add quiet log to statistics and process finish messages
franciscomoloureiro dc04230
merge
franciscomoloureiro 8a57548
fix docs
franciscomoloureiro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using BenchmarkDotNet.Configs; | ||
using JetBrains.Annotations; | ||
using System; | ||
|
||
namespace BenchmarkDotNet.Attributes | ||
{ | ||
/// <summary> | ||
/// Run benchmars in quiet mode. | ||
/// </summary> | ||
[PublicAPI] | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public class QuietModeAttribute : Attribute, IConfigSource | ||
{ | ||
public IConfig Config { get; } | ||
|
||
public QuietModeAttribute(bool value = false) | ||
{ | ||
Config = ManualConfig.CreateEmpty().WithOption(ConfigOptions.QuietMode, value); | ||
} | ||
} | ||
} |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
IMO there should be 1 attribute for all verbosity options and 1 cmd option instead of a separate attribute/option for each.
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.
I am not sure I understand this, the attribute/options are just different ways of configuring the same mode, with quiet=false you get the same output as before with quiet=true you only get the more relevant output
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.
Sorry, I'm mean about it: #190 (comment)
The PR should ideally implement all options, because it's not easy to add logging levels to the BDN.
It would be intuitive to see the following api:
cmd
If we implement your PR, it would be hard to do the standard .NET
--verbosity
option.And the naming
[QuietMode]
is super confusing.Below I have written 3 possible options. By my opinion it should mean 1) or 3).
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.
I understand now the full proposal, I had not seen last Adam's message on the issue, I will work on this during the next couple of days!
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 to me that this can be quite complicated.
My proposal is not final.
It's worth to post verbosity output to #190 (as mine) to start a discussion (because it affects the BDN a lot)
PS. If you don't do it, I'll get to it in a month. Any progress that you make will be very helpful!!