summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf.php3
-rw-r--r--test_index.php8
2 files changed, 9 insertions, 2 deletions
diff --git a/conf.php b/conf.php
index a644ed8..0a14fd2 100644
--- a/conf.php
+++ b/conf.php
@@ -27,6 +27,9 @@ $upload_dir = '/var/lib/schedbot/uploads';
/** How long a history should we keep, in days. */
$max_modified = 2;
+/** How many nodes are available. */
+$nodes_count = 2;
+
/** html > body > h1 title */
$title = '<a href="http://mageia.org/">Mageia</a> build system status';
diff --git a/test_index.php b/test_index.php
index f96f3ed..e931ecb 100644
--- a/test_index.php
+++ b/test_index.php
@@ -268,13 +268,17 @@ if ($total > 0) {
<div id="status-chart"></div>
<div id="packagers-chart"></div>';
+ $total_buildtime = round($buildtime_total / 60, 2);
+ $avail_capacity = $max_modified * $g_nodes_count;
+ $capacity_used = round($total_buildtime / $avail_capacity * 100, 2);
$s .= sprintf(
'<table style="width: 70%%; margin: 2em 0 2em 80px;">
- <tr><td>Total time</td><td>%s hours</td></tr>
+ <tr><td>Total time</td><td>%s hours (%s%% of capacity with %d nodes)</td></tr>
<tr><td>Average</td><td>%s minutes</td></tr>
<tr><td>Builds count</td><td>%s</td></tr>
</table>',
- round($buildtime_total / 60, 2),
+ $total_buildtime,
+ $capacity_used,
$buildtime_avg,
$build_count
);