We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf74930 commit 6127b59Copy full SHA for 6127b59
src/Services/TrendAnalysisService.php
@@ -175,8 +175,8 @@ public function analyzeThroughputTrend(
175
$avg = array_sum($throughputs) / $count;
176
$totalJobs = array_sum($throughputs);
177
178
- // Calculate jobs per minute
179
- $jobsPerMinute = ($totalJobs / $periodSeconds) * 60;
+ // Calculate jobs per minute (with defensive division by zero check)
+ $jobsPerMinute = $periodSeconds > 0 ? ($totalJobs / $periodSeconds) * 60 : 0.0;
180
181
// Trend analysis
182
$trend = $this->calculateLinearTrend($values);
0 commit comments