in src/cloudwatch/modules/flusher.py [0:0]
def _flush_if_need(self, current_time):
"""
Checks if metrics should be flushed and starts the flush procedure
"""
if self._is_flush_time(current_time):
if self.config.debug and self.metric_map:
state = ""
for dimension_metrics in self.metric_map:
state += str(dimension_metrics) + "[" + str(self.metric_map[dimension_metrics][0].statistics.sample_count) + "] "
self._LOGGER.info("[debug] flushing metrics " + state)
self._flush()