Changeset 27753
- Timestamp:
- 2013-07-04T13:45:08+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/bin/script/generate_gantt.pl
r27683 r27753 146 146 my $filepath = $parts[8]; 147 147 $filepath =~ s/^\s+|\s+$//g; 148 my $percent_complete = $parts[9]; 149 chomp($percent_complete); 148 150 $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}; 150 152 } 151 153 } … … 276 278 else 277 279 { 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"; 280 281 } 281 282 print HTMLOUT "</tr>\n"; … … 284 285 print HTMLOUT "<hr />\n"; 285 286 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); 287 288 foreach my $worker_id (nsort keys %{$timing_data}) 288 289 { … … 290 291 { 291 292 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); 293 294 } 294 295 } … … 393 394 sub renderLine 394 395 { 395 my ($table_width, $start, $end, $class, $tname, $tstart, $tend, $jobs ) = @_;396 my ($table_width, $start, $end, $class, $tname, $tstart, $tend, $jobs, $data_locality) = @_; 396 397 &debugPrint("renderLine($table_width, $start, $end, $class, $tname, $tstart, $tend, <jobs>)"); 397 398 # All timings need to be relative to 0 (relative start) … … 453 454 my $cpu_percent = int((($rpwidth / $jwidth) * 100) + 0.5); 454 455 $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) 456 457 { 457 458 $html .= 'border:1px dashed black;'; 458 459 } 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"> </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"> </span><span class="label"'; 461 if ($data_locality > 1 && $jobs->{$jstart}->{'DL'} != 1) 461 462 { 462 463 $html .= ' style="color:#FF0000"'; 463 464 } 464 465 $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) 466 471 { 467 472 $html .= ' [NL]';
Note:
See TracChangeset
for help on using the changeset viewer.