ant-user mailing list archives

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

> /*
> 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

until eventually it times out. There's no correlation with reality at all.

Steve Loughran        
Author: Ant in Action 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message