in reply to Recommended way to display progress

I think we may have what is called an X-Y problem.
Perhaps you are asking how to do X when you really need to do Y.

In general a terminal I/F or GUI is much better at displaying progress than an operation using a log file.

I absolutely hate the standard Windows "Circle of Death". This is often just a separate process that is just making a circle go around completely independent of whether the program is actually doing anything at all! That thing does have some value, but there is a user "patience factor".

How often does the user need a progress report?:
In my experience (yours may vary), the user will tolerate about a max of 60 to perhaps 90 seconds before thinking that the process is hung and "not doing anything" and that is even with the "warning" that this utility "can take a long time".

A main thing that you want to prevent is the user deciding that the program is "hung", and therefore "killing it" prematurely while it is in fact actually continuing to its job just fine!.

If you can provide a command line I/F, then think about just printing a simple "." per "unit" worked. Don't print dots via separate process (ala the "Windows Circle of Death"). If each dot represents actual progress towards the goal, the user will accept this. If a dot (period) appears at least every 30 seconds, that is often enough. It is completely fine if the appearance of the dots has an irregular rhythm. Humans are "pattern matching machines". The human (if he/she has used this utility before), will recognize a "good" vs "bad" pattern.

NEVER modify a log file. That is a very bad idea as other Monks have said.

I suggest that you don't have to get "fancy", just print a dot (period) on the command line I/F that is related to "actual work accomplished" and do that at least every 30 seconds and you will do just fine. The user will believe that the program is still running and won't "kill it".

  • Comment on Re: Recommended way to display progress