buildlogs: index.php - print build runtime in header block

glen glen at pld-linux.org
Sat Sep 7 23:18:51 CEST 2013


Author: glen                         Date: Sat Sep  7 21:18:51 2013 GMT
Module: buildlogs                     Tag: HEAD
---- Log message:
- print build runtime in header block

---- Files affected:
buildlogs:
   index.php (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: buildlogs/index.php
diff -u buildlogs/index.php:1.22 buildlogs/index.php:1.23
--- buildlogs/index.php:1.22	Sat Sep  7 23:18:24 2013
+++ buildlogs/index.php	Sat Sep  7 23:18:46 2013
@@ -356,6 +356,7 @@
 	$toc = array();
 	ob_start();
 	$err_count = 0;
+	$time = "";
 	while (($s = fgets($fd, 102400)) != false) {
 		if (strlen($s) > 800) {
 			$s = chunk_split($s, 800, "\n    ");
@@ -381,12 +382,18 @@
 			$toc[] = "files ".$m['name'];
 			$err[] = $s;
 			$s = "<span class=section id=files-{$m['name']}>$s</span>";
+		} elseif (preg_match("/^ended at: (?P<date>.+), done in (?P<time>[\d:.]+)/", $s, $m)) {
+			$time = $m['time'];
 		}
 		echo $s;
 	}
 	pclose($fd);
 	$code = ob_get_contents();
 	ob_end_clean();
+
+	if ($time) {
+		one_item(_("Runtime"), $time);
+	}
 
 	echo "</table>";
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/buildlogs/index.php?r1=1.22&r2=1.23



More information about the pld-cvs-commit mailing list