a14381a65d94efd21600039ed9fb723fd8d5f51a
hiram
  Thu Sep 30 12:14:45 2021 -0700
prevent divide by zero no redmine

diff --git src/hg/utils/automation/perlPara.pl src/hg/utils/automation/perlPara.pl
index d79edba..6fb0e46 100755
--- src/hg/utils/automation/perlPara.pl
+++ src/hg/utils/automation/perlPara.pl
@@ -171,26 +171,27 @@
 #############################################################################
 ### show all exit codes for all jobs
 #############################################################################
 printf STDERR "# process exit codes:\n";
 for (my $i = 0; $i < $cmdCount; ++$i) {
   my $childPid = $pidList[$i];
   my $elapsedSeconds = $endTimes{$childPid} - $startTimes{$childPid};
   my $exitCode = $exitCodes{$childPid};
   printf STDERR "# cmd $i pid $childPid exit code '$exitCode' %d %d seconds %s\n", $exitCode >> 8, $elapsedSeconds, $cmdQueue{$childPid};
 }
 
 my $avgTime = $totalRunTime / $jobsDone;
 my $overallTimeDone = `date "+%s"`;
 chomp $overallTimeDone;
 my $wallClockTime = $overallTimeDone - $overallTimeStart;
-my $speedUpMultiple = $totalRunTime / $wallClockTime;
+my $speedUpMultiple = 1;
+$speedUpMultiple = $totalRunTime / $wallClockTime if ($wallClockTime > 0);
 
 printf STDERR "# %d jobs %d totalSec %d sec/job %d wallClock %.2f X speedup multiple\n", $jobsDone, $totalRunTime, $avgTime, $wallClockTime, $speedUpMultiple;
 
 printf STDERR "# Completed: %d of %d jobs\n", $jobsDone, $cmdCount;
 printf STDERR "# CPU time in finished jobs: %10ds %10.2fm %8.2fh %7.2fd %6.3fy\n", $totalRunTime, $totalRunTime / 60, $totalRunTime / 3600, $totalRunTime / 86400, $totalRunTime / (86400 * 365.2524);
 printf STDERR "# Average job time:          %10ds %10.2fm %8.2fh %7.2fd\n",
    $avgTime, $avgTime / 60, $avgTime / 3600, $avgTime / 86400;
 printf STDERR "# Longest finished job:      %10ds %10.2fm %8.2fh %7.2fd\n",
    $longestRunningJob, $longestRunningJob / 60, $longestRunningJob / 3600,
    $longestRunningJob / 86400;