in reply to Estimating computation time perl scripts
Most every long running program contain repetition in the form of loops, or recursion, or a set of work items to be processed; and the number of repetitions are normally known, or are quickly estimable.
If you time the first repetition and multiply by the known or first estimation of the repetition count, you can approximate the total time and derive a %complete.
As the time taken for each repetition can vary, you can time each successive repetition and adjust the percentage dynamically.
You'll get better/more specific suggestions if you give us more information about the nature of your program.
|
|---|