/[soft]/build_system/web/index.php
ViewVC logotype

Diff of /build_system/web/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 953 by rda, Tue Apr 19 13:16:24 2011 UTC revision 956 by rda, Tue Apr 19 22:55:18 2011 UTC
# Line 398  if ($total > 0) { Line 398  if ($total > 0) {
398      uksort($buildtime_stats, "timesort");      uksort($buildtime_stats, "timesort");
399    
400      $bts = '';      $bts = '';
401        $max = max($buildtime_stats);
402      foreach ($buildtime_stats as $time => $count) {      foreach ($buildtime_stats as $time => $count) {
403          $bts .= sprintf('<tr><td>%s</td><td>%d</td></tr>',          $bts .= sprintf('<tr><td>%s</td><td><span style="width: %dpx; height: 10px; background: #aaa; display: block;" title="%d"></span></td></tr>',
404              $time, $count);              $time,
405                round($count/$max*100),
406                $count);
407    
408          $tmp = explode(' ', $time);          $tmp = explode(' ', $time);
409      }      }
410    
411      $s .= '<table style="width: 100%;"><caption>Build time</caption>';      $s .= '<table><caption>Build time</caption>';
412    
413      $s .= sprintf('<tr><td>Total time</td><td>%s hours</td></tr>      $s .= sprintf('<tr><td>Total time</td><td>%s hours</td></tr>
414          <tr><td>Average</td><td>%s minutes</td></tr>          <tr><td>Average</td><td>%s minutes</td></tr>
# Line 418  if ($total > 0) { Line 421  if ($total > 0) {
421      $s .= $bts;      $s .= $bts;
422      $s .= '</table><span style="font-size: 85%;">Does not take<br />build failures<br />into account.</span>';      $s .= '</table><span style="font-size: 85%;">Does not take<br />build failures<br />into account.</span>';
423    
424      $s .= '<table style="width:100%;"><caption>Build times</caption>';      $s .= '<table><caption>Build times</caption>';
425      $max = max($build_dates);      $max = max($build_dates);
426      foreach ($build_dates as $time => $count)      foreach ($build_dates as $time => $count)
427          $s .= sprintf('<tr><td>%d</td><td><span style="width: %dpx; height: 10px; background: #aaa; display: block;" title="%d"></span></td></tr>',          $s .= sprintf('<tr><td>%d</td><td><span style="width: %dpx; height: 10px; background: #aaa; display: block;" title="%d"></span></td></tr>',
428              $time, round($count / $max * 100), $count);              $time,
429                round($count / $max * 100),
430                $count);
431      $s .= '</table>';      $s .= '</table>';
432    
433      $s .= '</div>';      $s .= '</div>';

Legend:
Removed from v.953  
changed lines
  Added in v.956

  ViewVC Help
Powered by ViewVC 1.1.30