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> |
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>'; |