dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #11597
Re: less irritating Progress meter
On Thu, Jan 08, 2009 at 03:28:57PM -0700, Bartosz Sawicki wrote:
> On 08/01/09 03:12 PM, Anders Logg wrote:
> > On Thu, Jan 08, 2009 at 03:07:02PM -0700, Bartosz Sawicki wrote:
> >> On 08/01/09 02:55 PM, Anders Logg wrote:
> >>> On Thu, Jan 08, 2009 at 02:46:26PM -0700, Bartosz Sawicki wrote:
> >>>> Class Progress is brilliant. I really love it, but sometimes progress
> >>>> meter is too talkative for me. I think that if the time needed to
> >>>> compute something is very short, we don't need any extra information
> >>>> about it. Progress bar should be completely silent in such cases.
> >>>>
> >>>> On the other hand progress bar is used too rarely. Mesh connectivity
> >>>> computation, assembling usually takes a lot of time for bigger meshes.
> >>>> It would be great to use Progress in such places.
> >>>>
> >>>> So I've prepared patch which changes behavior of Progress class. I
> >>>> introduced some logical flags which control when to display information.
> >>>> Nothing special, but now you can use Progress as much as you want,
> >>>> without worry that there will be too much messages.
> >>>>
> >>>> regrds.
> >>>> BArtek
> >>>>
> >>>> ps.
> >>>> Progress class destructor shouldn't display anything. It is inconvenient
> >>>> to call destructor when you want to close progress bar.
> >>>>
> >>>> ps1.
> >>>> If user really wants progress bar even when the task takes 1ms, I give
> >>>> him new constructor Progress p(string, int, bool always). If last
> >>>> argument is true, progress bar always will be displayed.
> >>> Would it be better to make it a global option? Something like
> >>>
> >>> dolfin_set("always display progress", true/false);
> >>>
> >> To be honest, I can't imagine when I would need a progress meter even if
> >> the task takes milliseconds.
> >> For me the parameter "always" is not needed. I've just enable it,
> >> because I was not sure if you agree with me.
> >>
> >> But you are right that global option would be some compromise.
> >
> > What I meant was a global option for always printing something
> > (without the ticks if the task is completed fast) like we have now.
> > Maybe the option should be named something else?
> >
>
> Please forgive me, but I don't understand.
> I want to make a progress bar less talkative. I've checked in the Logger
> class, but I haven't found any global option that controls progress bar.
> Option for "always printing something" has completely reverse meaning -
> I tried to limit the printout, not to make them longer.
>
> BArtek
There is no such option now, but my suggestion was to add such an
option,
But on second thought, maybe we should use the debug level. We just
need to make sure that the thing that gets printed if the task takes
less than 1 second is printed on debug level 1. That way, one may
raise the debug level to make the messages visible again.
Could that work?
--
Anders
Attachment:
signature.asc
Description: Digital signature
References