execute method
Future<void>
execute(
- AnalysisResult analysis,
- List<
OptimizationResult> optimizations, - String outputPath
Implementation
Future<void> execute(
AnalysisResult analysis,
List<OptimizationResult> optimizations,
String outputPath,
) async {
try {
_state.startReporting();
// Generate and save analysis report
await _reportService.saveAnalysisReport(
analysis,
'$outputPath/analysis_report.json',
);
// Generate and save optimization report
if (optimizations.isNotEmpty) {
await _reportService.saveOptimizationReport(
optimizations,
'$outputPath/optimization_report.json',
);
}
_state.completeReporting();
} catch (e) {
_state.failReporting(e.toString());
rethrow;
}
}