'This function should digest the contents of one line at a time, updating
object\'s state variables. Takes a single argument, the line to be parsed.'

def parse_line(self, line):

    count_match = self.count_reg.match(line)
    if count_match:
        countbits = count_match.groupdict()
        count_name = countbits['count_name']
        if (count_name not in self.counts):
            self.counts[count_name] = 0.0
        self.counts[count_name] += float(countbits['count_value'])
    time_match = self.time_reg.match(line)
    if time_match:
        time_name = time_match.groupdict()['time_name']
        if (time_name not in self.times):
            unit = time_match.groupdict()['time_unit']
            self.times[time_name] = {'unit': unit, 'values': []}
        self.times[time_name]['values'].append(float(time_match.groupdict()['time_value']))
