Opened 10 years ago

Last modified 4 years ago

#540 assigned enhancement

overhaul ETA calculation

Reported by: ipv6guru Owned by:
Priority: major Milestone: 1.0.+
Version: 0.7.10 Keywords: eta

Description (last modified by dustin)

The Progress and Expectation classes are overdue for a rewrite. They need to move to a scheme that I'll call Reverse Temporal Mapping because it sounds clever.

The idea is that each StepProgress? metric (an axis along which progress can be measured, like bytes of output or test cases run) should be sampled periodically during the Step. Nominally we'd like about 100 samples total, but if we have no idea how long the step will run then we can just sample every 10 seconds or something.

Those samples form a graph of progress-versus-time. We then invert the graph to give us one of time-versus-progress. This is used to create an interpolation table that will map from progress values into elapsed seconds. During the next build, we'll take the current progress value and use this table to estimate how many seconds are left to go.

The tables should be averaged over multiple builds, to provide some smoothing. The ETA values from the various metrics should be combined with some sort of weighted average (some metrics may be more accurate than others).

We also need to handle overdue builds better. It may be useful to report both the ETA and the percentage complete (since a slow build that still produces the same output as before will show <%100 complete even when the build is overdue).

It would also be useful to add some intstrumentation that lets us check the accurary of the ETA code, perhaps a table to show how the ETA changes as the build runs, comparing it to the actual elapsed time. The ETA should get more accurate as the build nears completion: it would be nice to see a graph of this convergence. Submitted: Brian Warner ( warner ) - 2005-05-18 05:19

Change History (8)

comment:1 Changed 10 years ago by dustin

  • Milestone changed from undecided to 0.7.+
  • Owner set to warner
  • Status changed from new to assigned

comment:2 Changed 9 years ago by marcusl

I did this for a loading-bar in an application once, simply tracking where in the script it was at the moment and recording the time. It works pretty well unless the output/progress you're tracking is changing alot.

comment:3 Changed 8 years ago by dustin

  • Keywords sourceforge 1203905 removed

comment:4 Changed 7 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

We should think about how this works in the statusdb world..

comment:5 Changed 6 years ago by dustin

  • Cc eta added

comment:6 Changed 6 years ago by dustin

  • Cc eta removed
  • Keywords eta added

comment:7 Changed 4 years ago by dustin

  • Description modified (diff)
  • Milestone changed from 0.9.+ to 0.9.0

I'm removing the existing support for this in #2818.

comment:8 Changed 4 years ago by dustin

  • Milestone changed from 0.9.0 to 1.0.+
  • Owner warner deleted

ETAs are a really nice feature, but badly inaccurate in 0.8.x, and hard to do well. Let's not promise to do so in the 0.9.x era.

Note: See TracTickets for help on using tickets.