Changeset 27753


Ignore:
Timestamp:
2013-07-04T13:45:08+12:00 (11 years ago)
Author:
jmt12
Message:

Adding Handbrake's percentage complete to report - although this is sometime less than 100% even for files that successfully converted

File:
1 edited

Legend:

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

    r27683 r27753  
    146146        my $filepath = $parts[8];
    147147        $filepath =~ s/^\s+|\s+$//g;
     148        my $percent_complete = $parts[9];
     149        chomp($percent_complete);
    148150        $import_dir = &longestCommonPath($filepath, $import_dir);
    149         $timing_data->{$worker_id}->{'F'}->{$parts[3]} = {'FN'=>$filepath, 'S'=>$parts[3], 'PS'=>($stop - $parts[5]), 'PE'=>$stop, 'E'=>$stop, 'DL'=>$parts[6]};
     151        $timing_data->{$worker_id}->{'F'}->{$parts[3]} = {'FN'=>$filepath, 'S'=>$parts[3], 'PS'=>($stop - $parts[5]), 'PE'=>$stop, 'E'=>$stop, 'DL'=>$parts[6], 'PC'=>$percent_complete};
    150152      }
    151153    }
     
    276278  else
    277279  {
    278     print HTMLOUT "  <th></th>\n";
    279     print HTMLOUT "  <td></td>\n";
     280    print HTMLOUT "  <th>Data Locality:</th><td><i>Not Applicable</i></td>\n";
    280281  }
    281282  print HTMLOUT "</tr>\n";
     
    284285  print HTMLOUT "<hr />\n";
    285286  print HTMLOUT "<h2>Timing Chart (Gantt)</h2>\n";
    286   print HTMLOUT renderLine($chart_width, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, 'master', $timing_data->{'M'}->{'N'}, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, {});
     287  print HTMLOUT renderLine($chart_width, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, 'master', $timing_data->{'M'}->{'N'}, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, {}, $data_locality);
    287288  foreach my $worker_id (nsort keys %{$timing_data})
    288289  {
     
    290291    {
    291292      my $data = $timing_data->{$worker_id};
    292       print HTMLOUT renderLine($chart_width, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, 'worker', $worker_id . ' [' . $data->{'N'} . ']', $data->{'S'}, $data->{'E'}, $data->{'F'});
     293      print HTMLOUT renderLine($chart_width, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, 'worker', $worker_id . ' [' . $data->{'N'} . ']', $data->{'S'}, $data->{'E'}, $data->{'F'}, $data_locality);
    293294    }
    294295  }
     
    393394sub renderLine
    394395{
    395   my ($table_width, $start, $end, $class, $tname, $tstart, $tend, $jobs) = @_;
     396  my ($table_width, $start, $end, $class, $tname, $tstart, $tend, $jobs, $data_locality) = @_;
    396397  &debugPrint("renderLine($table_width, $start, $end, $class, $tname, $tstart, $tend, <jobs>)");
    397398  # All timings need to be relative to 0 (relative start)
     
    453454    my $cpu_percent = int((($rpwidth / $jwidth) * 100) + 0.5);
    454455    $html .= '<div class="job" style="left:' . $jleft . 'px;width:' . $jwidth . 'px;';
    455     if ($jobs->{$jstart}->{'DL'} != 1)
     456    if ($data_locality > 1 && $jobs->{$jstart}->{'DL'} != 1)
    456457    {
    457458      $html .= 'border:1px dashed black;';
    458459    }
    459     $html .= '" title="FN:' . $jobs->{$jstart}->{'FN'} . ', S:' . &renderTime($rjstart) . ', E:' . &renderTime($rjend) . ', CPU: ' . $cpu_percent . '% [' . &renderTime($io_duration) . ', ' . &renderTime($cpu_duration) . ']"><span class="process" style="left:' . $rpleft . 'px;width:' . $rpwidth . 'px">&nbsp;</span><span class="label"';
    460     if ($jobs->{$jstart}->{'DL'} != 1)
     460    $html .= '" title="FN:' . $jobs->{$jstart}->{'FN'} . ', S:' . &renderTime($rjstart) . ', E:' . &renderTime($rjend) . ', CPU: ' . $cpu_percent . '% [' . &renderTime($io_duration) . ', ' . &renderTime($cpu_duration) . ', PC: ' . $jobs->{$jstart}->{'PC'} . '%]"><span class="process" style="left:' . $rpleft . 'px;width:' . $rpwidth . 'px">&nbsp;</span><span class="label"';
     461    if ($data_locality > 1 && $jobs->{$jstart}->{'DL'} != 1)
    461462    {
    462463      $html .= ' style="color:#FF0000"';
    463464    }
    464465    $html .=  '>' . $jobs->{$jstart}->{'FN'};
    465     if ($jobs->{$jstart}->{'DL'} != 1)
     466    if ($jobs->{$jstart}->{'PC'} ne 'NA')
     467    {
     468      $html .= ' <small>[' . $jobs->{$jstart}->{'PC'} . '%]</small>';
     469    }
     470    if ($data_locality > 1 && $jobs->{$jstart}->{'DL'} != 1)
    466471    {
    467472      $html .= ' [NL]';
Note: See TracChangeset for help on using the changeset viewer.