ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: target progress bar
Date Wed, 07 Nov 2007 12:20:48 GMT
Rebhan, Gilbert wrote:
>  
> 
> -----Original Message-----
> From: Steve Loughran [mailto:stevel@apache.org] 

> /*
> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message