Rebhan, Gilbert wrote:
-----Original Message-----
From: Steve Loughran [mailto:[EMAIL PROTECTED]
/*
One problem with a progress bar is estimating time remaining;
a build does not know how much work is left or how long it will take,
so its hard to present.
*/
if not impossible at all
At its most rigorous, predicting how long something will take to
complete requires a solution to the halting problem: a way to predict
when/whether something will terminate.
However, remembering how long something took last time is a good metric,
and is generally what things like grid workload schedulers do. If you
submit a job "to the grid", it remembers how long this took last time
and uses that as a metric of what is likely to be needed.
For ant you could have some profile listener that knows how long
specific targets/tasks took, and the next run, moves the progress forwards.
Incidentally, if you look at IE's progress bar in its status, it just
does a fake thing, doing an exponential tick every second 1s=1/2=0.5
2s =1/2+1/4=.75
3s=1/2+1/4+1/8...
until eventually it times out. There's no correlation with reality at all.
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]