← Back to team overview

dolfin team mailing list archive

Re: less irritating Progress meter

 

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.

regrd.
BArtek




------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev



Follow ups

References