'Yields accumulated timing and counter data and resets the buffer.'

def flush(self):

    (data, self.data) = (self.data, collections.defaultdict(complex))
    while True:
        try:
            (k, v) = data.popitem()
        except KeyError:
            break
        (total_time, count) = (v.real, v.imag)
        divisor = (count or 1)
        mean = (total_time / divisor)
        (yield (k, (str((mean * 1000)) + '|ms')))
