

def flush(self, timestamp, interval):
    if (self.count is None):
        return []
    try:
        return [self.formatter(hostname=self.hostname, device_name=self.device_name, tags=self.tags, metric=self.name, value=self.count, timestamp=timestamp, metric_type=MetricTypes.COUNT, interval=interval)]
    finally:
        self.prev_counter = self.curr_counter
        self.curr_counter = None
        self.count = None

dataset/ETHPy150Open serverdensity/sd-agent/aggregator.py MonotonicCount.flush/original