'Run any necessary calculations on the data collected from the logs
and return a list of metric objects.'

def get_state(self, duration):

    self.duration = float(duration)
    metrics = [MetricObject(level, (getattr(self, level) / self.duration)) for level in self.levels]
    return metrics
