-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Feature request: quiet mode #190
Comments
I realize that a multi-line updating status box may be tricky - a weaker form of this feature request would be a mode which just says which test it's executing each time it starts a new one, along with the count, e.g. output of
Also, "quiet" may not be an ideal option name for this, as that would probably suggest even quieter output... |
I've recently done something like this. The idea is borrowed from SynchronousProcessOutputLoggerWithDiagnoser. There's HostLogger class that filters the output and prints only error messages and messages that starts with This approach works well for us, for example, output for the test simplifies up to:
(the log content starts after the |
@ig-sinicyn would you be happy to submit a PR that adds It looks really nice and it would be good to have it available OOTB. |
@mattwarren will do. Any suggestions for prefixes / logger class name / constant names? UPD: Note that the logger name will be widely used, example: if (competitionState.HasCriticalErrorsInRun)
{
logger.WriteLineInfo($"{HostLogger.LogImportantInfoPrefix}Breaking the run. High severity error occured.");
break;
} so it has to be short and obvious. Also, I dislike the prefixes used to mark LogImportantAreaStart / End, but have no idea how to make it better.
The log contains sections with xml that are parsed and used to adjust perftest limits. It allows to collect timings from another machines / CI build servers and annotate perftest code with these timings. Here's the test that checks it. Note that the benchmark is automatically annotated with limits from the log. |
Well, the develop branch does not build at all, #187 . If this is urgent, feel free to copy the HostLogger' code by yourself. |
@ig-sinicyn do you suffer from the same problems when trying to build from develop branch? |
@adamsitnik yes, same issue here. |
I want similar functionality for different reason. Is this possible? For now I have
|
No, but the issue is up for grabs ;) |
Hi @adamsitnik , Is this issue still open? Regards, |
Some hints for the potential contributor:
cd samples\BenchmarkDotNet.Samples\
dotnet run -c Release -f net6.0 --filter *IntroDisassembly.* --job dry I am currently getting a lot of output:
Which could be minimized to:
The new option should be currently disabled by default. It should be possible to enable it via command line args, fluent API and an attribute. You can use
I don't have any strong preferences for how it should be implemented. One way would be passing NullLogger instead of actual logger in some places in BDN. The simpler the solution, the better. |
I want to work on this issue |
@franciscomoloureiro great, I've assigned you. Please let me know if you need help. |
Still verbose. We always have I would like to see the same
diag[nostic]current output: full logs d[etailed]like Adam suggests n[ormal]It should not contain any debug/log information:
Details
m[inimal]Show table without 'legend'. The console will be nice and clean.
Details
q[uiet]No output API example:
[ConsoleVerbosity(Verbosity.Minimal, redirectOutput: true)] |
@YegorStepanov your proposal sounds very reasonable, I like it! @franciscomoloureiro if possible, please take it into consideration |
I'm thinking about the next
Did I clean up more than necessary?If you ok with this, then I will try to make P.S Each verbosity level contains all the information of the less verbose level. ( |
@franciscomoloureiro do you plan to continue with #2161 to try to address this? |
@franciscomoloureiro can you please share an update about the PR to address this issue? |
It would be really nice to be able to start a long run, and instead of getting a long scrolling list where most of the time I can't see what's executing, instead have an in-place display, updated appropriately and consisting of:
I don't know enough about the execution timing to know whether estimating the total remaining time is viable, but I suspect it is... we have a target time for each test, right?
The text was updated successfully, but these errors were encountered: