diff --git a/testing/testing-workflow-optimizer.md b/testing/testing-workflow-optimizer.md index 286b903a..02b0decf 100644 --- a/testing/testing-workflow-optimizer.md +++ b/testing/testing-workflow-optimizer.md @@ -246,7 +246,7 @@ class WorkflowOptimizer: def calculate_improvement_impact(self, current_metrics: WorkflowMetrics, optimized_metrics: WorkflowMetrics) -> Dict: - """Calculate quantified improvement impact""" + """Calculate impact; a zero cost baseline has no defined percentage.""" improvements = { "cycle_time_reduction": { "absolute": current_metrics.total_cycle_time - optimized_metrics.total_cycle_time, @@ -255,8 +255,11 @@ class WorkflowOptimizer: }, "cost_reduction": { "absolute": current_metrics.cost_per_execution - optimized_metrics.cost_per_execution, - "percentage": ((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution) - / current_metrics.cost_per_execution) * 100 + "percentage": ( + ((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution) + / current_metrics.cost_per_execution) * 100 + if current_metrics.cost_per_execution != 0 else None + ) }, "quality_improvement": { "absolute": current_metrics.error_rate - optimized_metrics.error_rate, @@ -457,4 +460,4 @@ You're successful when: --- -**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance. \ No newline at end of file +**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance.