diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-04-19 22:55:18 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-04-19 22:55:18 +0000 |
commit | bc6671bc2023a4f413dcb7846475aae9f2b9d1ed (patch) | |
tree | 51f36c37514f3a3dce56439e9ff3540b1b8656dd | |
parent | 2778ec1e523d66d393f30269370460619fe03201 (diff) | |
download | pkgsubmit-bc6671bc2023a4f413dcb7846475aae9f2b9d1ed.tar pkgsubmit-bc6671bc2023a4f413dcb7846475aae9f2b9d1ed.tar.gz pkgsubmit-bc6671bc2023a4f413dcb7846475aae9f2b9d1ed.tar.bz2 pkgsubmit-bc6671bc2023a4f413dcb7846475aae9f2b9d1ed.tar.xz pkgsubmit-bc6671bc2023a4f413dcb7846475aae9f2b9d1ed.zip |
graph build time
-rw-r--r-- | index.php | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -398,14 +398,17 @@ if ($total > 0) { uksort($buildtime_stats, "timesort"); $bts = ''; + $max = max($buildtime_stats); foreach ($buildtime_stats as $time => $count) { - $bts .= sprintf('<tr><td>%s</td><td>%d</td></tr>', - $time, $count); + $bts .= sprintf('<tr><td>%s</td><td><span style="width: %dpx; height: 10px; background: #aaa; display: block;" title="%d"></span></td></tr>', + $time, + round($count/$max*100), + $count); $tmp = explode(' ', $time); } - $s .= '<table style="width: 100%;"><caption>Build time</caption>'; + $s .= '<table><caption>Build time</caption>'; $s .= sprintf('<tr><td>Total time</td><td>%s hours</td></tr> <tr><td>Average</td><td>%s minutes</td></tr> @@ -418,11 +421,13 @@ if ($total > 0) { $s .= $bts; $s .= '</table><span style="font-size: 85%;">Does not take<br />build failures<br />into account.</span>'; - $s .= '<table style="width:100%;"><caption>Build times</caption>'; + $s .= '<table><caption>Build times</caption>'; $max = max($build_dates); foreach ($build_dates as $time => $count) $s .= sprintf('<tr><td>%d</td><td><span style="width: %dpx; height: 10px; background: #aaa; display: block;" title="%d"></span></td></tr>', - $time, round($count / $max * 100), $count); + $time, + round($count / $max * 100), + $count); $s .= '</table>'; $s .= '</div>'; |