Package buildbot :: Package status :: Module progress :: Class StepProgress
[frames] | no frames]

Class StepProgress

source code

I keep track of how much progress a single BuildStep has made.

Progress is measured along various axes. Time consumed is one that is available for all steps. Amount of command output is another, and may be better quantified by scanning the output for markers to derive number of files compiled, directories walked, tests run, etc.

I am created when the build begins, and given to a BuildProgress object so it can track the overall progress of the whole build.

Instance Methods
 
__init__(self, name, metricNames) source code
 
setBuildProgress(self, bp) source code
 
setExpectations(self, metrics)
The step can call this to explicitly set a target value for one of its metrics.
source code
 
setExpectedTime(self, seconds) source code
 
start(self) source code
 
setProgress(self, metric, value)
The step calls this as progress is made along various axes.
source code
 
finish(self)
This stops the 'time' metric and marks the step as finished overall.
source code
 
totalTime(self) source code
 
remaining(self) source code
Class Variables
  startTime = None
hash(x)
  stopTime = None
hash(x)
  expectedTime = None
hash(x)
  buildProgress = None
hash(x)
  debug = False
Method Details

setExpectations(self, metrics)

source code 

The step can call this to explicitly set a target value for one of its metrics. E.g., ShellCommands knows how many commands it will execute, so it could set the 'commands' expectation.

finish(self)

source code 

This stops the 'time' metric and marks the step as finished overall. It should be called after the last .setProgress has been done for each axis.