- ';
$buildtime_stats = array();
// Builds in progress
if (count($hosts) > 0) {
echo '
- ',
sprintf('
%d build%s in progress:
', count($hosts), plural(count($hosts))); $s = ''; $tmpl = <<%s %s %s %s/%s %s %s TB; foreach ($hosts as $machine => $b) { foreach ($b as $arch => $key) { $s .= sprintf($tmpl, $pkgs[$key]['package'], $pkgs[$key]['user'], $pkgs[$key]['user'], $pkgs[$key]['version'], $pkgs[$key]['media'], $pkgs[$key]['section'], $machine, $arch); } } echo '', '', '', ' ', $s, 'Package User Target media Machine arch ';
} else {
//echo ' No build in progress.
';
}
}
$upload_time = get_upload_time();
if (!is_null($upload_time)) {
echo sprintf('Upload in progress for %s.
', timediff($upload_time));
}
// Build queue
$s = '';
$tmpl = <<%d packages submitted in the past %d hours:
', $total, $max_modified * 24); // Last submitted packages echo '', '
'; echo 'Package Who when Target media Status process time
Stats
';
$total_buildtime = round($buildtime_total / 60, 1);
$avail_capacity = 24 * $max_modified * $g_nodes_count;
$capacity_used = round($total_buildtime / $avail_capacity * 100, 1);
$s .= sprintf(
'
Total time | %s hours (%s%% of capacity with %d nodes) |
Average | %s minutes |
Builds count | %s |
No package has been submitted in the past %d hours.