Changeset 27914

Show
Ignore:
Timestamp:
22.07.2013 10:38:06 (6 years ago)
Author:
jmt12
Message:

Trying to get around a couple of divide-by-zero issues when generating charts from HadoopGreenstoneIngest?2

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/bin/script/generate_gantt.pl

    r27753 r27914  
    223223        } 
    224224        # Shorten filename 
    225         if (defined $timing_data->{$worker_id}->{'F'}->{$job_start}->{'FN'}) 
     225        if (defined $timing_data->{$worker_id}->{'F'}->{$job_start}->{'FN'} && $timing_data->{$worker_id}->{'F'}->{$job_start}->{'FN'} ne '') 
    226226        { 
    227227          $timing_data->{$worker_id}->{'F'}->{$job_start}->{'FN'} = substr($timing_data->{$worker_id}->{'F'}->{$job_start}->{'FN'}, length($import_dir) + 1); 
     
    234234      } 
    235235    } 
     236  } 
     237  if ($file_count <= 0) 
     238  { 
     239    $file_count = 1; 
     240  } 
     241  if ($total_process_time <= 0) 
     242  { 
     243    $total_process_time = 1; 
    236244  } 
    237245  my $avg_processing_time = floor(($total_io_time + $total_process_time) / $file_count);