fix savePerformanceMetrics