

def flush(self, timestamp, interval):
    if (not self.values):
        return []
    try:
        return [self.formatter(hostname=self.hostname, device_name=self.device_name, tags=self.tags, metric=self.name, value=len(self.values), timestamp=timestamp, metric_type=MetricTypes.GAUGE, interval=interval)]
    finally:
        self.values = set()

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