auto flush for LocalFileMetricsCollector