b.r.RecordCounter(object) : class documentation

Part of bzrlib.recordcounter View In Hierarchy

Container for maintains estimates of work requires for fetch.

Instance of this class is used along with a progress bar to provide the user an estimate of the amount of work pending for a fetch (push, pull, branch, checkout) operation.

Method __init__ Undocumented
Method is_initialized Undocumented
Method setup Setup RecordCounter with basic estimate of work pending.
Method increment Increment self.current by count.
Method _estimate_max Estimate the maximum amount of 'inserting stream' work.
def __init__(self):
Undocumented
def is_initialized(self):
Undocumented
def _estimate_max(self, key_count):
Estimate the maximum amount of 'inserting stream' work.

This is just an estimate.

def setup(self, key_count, current=0):
Setup RecordCounter with basic estimate of work pending.

Setup self.max and self.current to reflect the amount of work pending for a fetch.

def increment(self, count):
Increment self.current by count.

Apart from incrementing self.current by count, also ensure that self.max > self.current.

API Documentation for Bazaar, generated by pydoctor at 2019-08-20 00:32:01.