[llvm-commits] CVS: nightlytest-serverside/NightlyTester.php ProgramResults.php fulltest.php individualgraph.php sidebar.php test.php

Patrick Jenkins pjenkins at apple.com
Thu Aug 17 20:50:32 PDT 2006



Changes in directory nightlytest-serverside:

NightlyTester.php updated: 1.15 -> 1.16
ProgramResults.php updated: 1.5 -> 1.6
fulltest.php updated: 1.12 -> 1.13
individualgraph.php updated: 1.1.1.1 -> 1.2
sidebar.php updated: 1.8 -> 1.9
test.php updated: 1.15 -> 1.16
---
Log message:

The change to sidebar.php makes the website more efficient by asking the
database for only what it needs instead of all the other junk that is
stored in the night table.

The changes to NightlyTester.php, ProgramResults.php, fulltest.php, and 
test.php reflect the new way we are storing dejagnu pass/fail/xfail results
in the datase. Rest assured, there is a hack in ProgramResults.php to
ensure we can still handle the old way these were stored in the database, 
although it should be noted that this old way is missing signifigant data.
This "functionality" of losing data is the reason I redesigned the database.

The changes to individualgraph.php are to bring it into compliance with the
LLVM coding standard (mainly it converts tabs to two spaces).



---
Diffs of the changes:  (+599 -368)

 NightlyTester.php   |   13 +
 ProgramResults.php  |  216 +++++++++++++++++++
 fulltest.php        |  581 ++++++++++++++++++++++++++--------------------------
 individualgraph.php |  120 +++++-----
 sidebar.php         |   15 -
 test.php            |   22 +
 6 files changed, 599 insertions(+), 368 deletions(-)


Index: nightlytest-serverside/NightlyTester.php
diff -u nightlytest-serverside/NightlyTester.php:1.15 nightlytest-serverside/NightlyTester.php:1.16
--- nightlytest-serverside/NightlyTester.php:1.15	Thu Aug 17 15:47:26 2006
+++ nightlytest-serverside/NightlyTester.php	Thu Aug 17 22:50:18 2006
@@ -117,6 +117,19 @@
 
 /*****************************************************
  *
+ * Purpose: Get night ids and date added associated 
+ *          with a specific machine for
+ *          which buildstatus is "OK"
+ * Returns: A mysql result
+ *
+ *****************************************************/
+function getNightsIDs($machine_id, $mysql_link, $start="2000-01-01 01:01:01", $end="2020-12-30 01:01:01", $order="DESC"){
+ $query = mysql_query("SELECT id, added FROM night WHERE machine=$machine_id and added<=\"$end\" and added>=\"$start\" ORDER BY added $order") or die (mysql_error());
+ return $query;
+}
+
+/*****************************************************
+ *
  * Purpose: Get the history of nights given a night and 
  *          specific machine 
  * Returns: A mysql query resource. Basically something you cal


Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.5 nightlytest-serverside/ProgramResults.php:1.6
--- nightlytest-serverside/ProgramResults.php:1.5	Wed Aug  2 17:12:13 2006
+++ nightlytest-serverside/ProgramResults.php	Thu Aug 17 22:50:18 2006
@@ -7,6 +7,15 @@
   mysql_select_db("nightlytestresults");
 }
 
+/*
+ * This variable is used to determine file size cutoffs for displaying
+ */
+$byte_threshold=1000;
+
+/*
+ * These variables are used in determining
+ * how to color table cells;
+ */
 $medium_number=0;
 $medium_change=5;
 $large_number=0;
@@ -135,7 +144,7 @@
     foreach ($array_of_measures as $x){
       $value=array();
       $reg_exp="/$x:\s*([[0-9\.]+|\*|\-|n\/a|\?],)/";
-      //print "running preg_match($reg_exp, $data, $value)<br>\n";
+      #print "{$row['program']} => running preg_match($reg_exp, $data, $value)<br>\n";
       preg_match($reg_exp, $data, $value);
       if(isset($value[1])){
         array_push($result["{$row['program']}"], $value[1]);
@@ -376,6 +385,211 @@
   }
 }
 
+/*
+ * Get Unexpected failing tests
+ *
+ * This is somewhat of a hack because from night 684 forward we now store the test 
+ * in their own table as oppoesd in the night table.
+ */
+function getUnexpectedFailures($night_id, $mysql_link){
+  $result="";
+  if($night_id<684){
+    $query = "SELECT unexpfail_tests FROM night WHERE id = $night_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    $row = mysql_fetch_array($program_query);
+    $result= $row['unexpfail_tests'];
+    $result=preg_replace("/\n/","<br>\n",$result);
+    mysql_free_result($program_query);
+  }
+  else{
+    $query = "SELECT * FROM tests WHERE night=$night_id AND result=\"FAIL\"";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      $result.="{$row['measure']} - {$row['program']}<br>\n";
+    }
+    mysql_free_result($program_query);
+  }
+  return $result;
+}
+
+/*
+ * Get New Tests
+ *
+ * This is somewhat of a hack because from night 684 forward we now store the test 
+ * in their own table as oppoesd in the night table.
+ */
+function getNewTests($cur_id, $prev_id, $mysql_link){
+  $result="";
+  if($cur_id<684){
+    $query = "SELECT new_tests FROM night WHERE id = $cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    $row = mysql_fetch_array($program_query);
+    $result= $row['unexpfail_tests'];
+    $result=preg_replace("/\n/","<br>\n",$result);
+    mysql_free_result($program_query);
+  }
+  else{
+    $test_hash=array();
+    $query = "SELECT * FROM tests WHERE night=$prev_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      $test_hash["{$row['measure']} - {$row['program']}"]=1;
+    }
+    mysql_free_result($program_query);
+
+    $query = "SELECT * FROM tests WHERE night=$cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      if( !isset($test_hash["{$row['measure']} - {$row['program']}"])){
+	$result = "{$row['measure']} - {$row['program']}<br>\n";
+      }
+    }
+    mysql_free_result($program_query);
+  }
+  return $result;
+}
+
+/*
+ * Get Removed Tests
+ *
+ * This is somewhat of a hack because from night 684 forward we now store the test 
+ * in their own table as oppoesd in the night table.
+ */
+function getRemovedTests($cur_id, $prev_id, $mysql_link){
+  $result="";
+  if($cur_id<684){
+    $query = "SELECT removed_tests FROM night WHERE id = $cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    $row = mysql_fetch_array($program_query);
+    $result= $row['unexpfail_tests'];
+    $result=preg_replace("/\n/","<br>\n",$result);
+    mysql_free_result($program_query);
+  }
+  else{
+    $test_hash=array();
+    $query = "SELECT * FROM tests WHERE night=$cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      $test_hash["{$row['measure']} - {$row['program']}"]=1;
+    }
+    mysql_free_result($program_query);
+
+    $query = "SELECT * FROM tests WHERE night=$prev_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      if( !isset($test_hash["{$row['measure']} - {$row['program']}"])){
+	$result = "{$row['measure']} - {$row['program']}<br>\n";
+      }
+    }
+    mysql_free_result($program_query);
+  }
+  return $result;
+}
+
+/*
+ * Get Fixed Tests
+ *
+ * This is somewhat of a hack because from night 684 forward we now store the test 
+ * in their own table as oppoesd in the night table.
+ */
+function getFixedTests($cur_id, $prev_id, $mysql_link){
+  $result="";
+  if($cur_id<684){
+    $query = "SELECT removed_tests FROM night WHERE id = $cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    $row = mysql_fetch_array($program_query);
+    $result= $row['unexpfail_tests'];
+    $result=preg_replace("/\n/","<br>\n",$result);
+    mysql_free_result($program_query);
+  }
+  else{
+    $test_hash=array();
+    $query = "SELECT * FROM tests WHERE night=$cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      if(strcmp("{$row['result']}", "PASS")===0){
+        $test_hash["{$row['measure']} - {$row['program']}"]=$row['result'];
+      }    
+    }
+    mysql_free_result($program_query);
+
+    $query = "SELECT * FROM tests WHERE night=$prev_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      if( isset($test_hash["{$row['measure']} - {$row['program']}"]) && 
+          strcmp($test_hash["{$row['measure']} - {$row['program']}"], $row['result'])!==0){
+	$result = "{$row['measure']} - {$row['program']}<br>\n";
+      }
+    }
+    mysql_free_result($program_query);
+  }
+  return $result;
+}
+
+/*
+ * Get Broken Tests
+ *
+ * This is somewhat of a hack because from night 684 forward we now store the test
+ * in their own table as oppoesd in the night table.
+ */
+function getBrokenTests($cur_id, $prev_id, $mysql_link){
+  $result="";
+  if($cur_id<684){
+    $query = "SELECT removed_tests FROM night WHERE id = $cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    $row = mysql_fetch_array($program_query);
+    $result= $row['unexpfail_tests'];
+    $result=preg_replace("/\n/","<br>\n",$result);
+    mysql_free_result($program_query);
+  }
+  else{
+    $test_hash=array();
+    $query = "SELECT * FROM tests WHERE night=$prev_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      if(strcmp("{$row['result']}", "PASS")===0){
+        $test_hash["{$row['measure']} - {$row['program']}"]=$row['result'];
+      }
+    }
+    mysql_free_result($program_query);
+
+    $query = "SELECT * FROM tests WHERE night=$cur_id";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      if( isset($test_hash["{$row['measure']} - {$row['program']}"]) &&
+          strcmp($test_hash["{$row['measure']} - {$row['program']}"], $row['result'])!==0){
+        $result = "{$row['measure']} - {$row['program']}<br>\n";
+      }
+    }
+    mysql_free_result($program_query);
+  }
+  return $result;
+}
+
+/*
+ * Get previous working night
+ *
+ * Returns the night id for the machine of the night passed in
+ * where build status = OK
+ */
+function getPreviousWorkingNight($night_id, $mysql_link){
+  $query = "SELECT machine FROM night WHERE id=$night_id";
+  $program_query = mysql_query($query) or die (mysql_error());
+  $row = mysql_fetch_array($program_query);
+  $this_machine_id=$row['machine'];
+  mysql_free_result($program_query);
+  
+  $query = "SELECT id FROM night WHERE machine=$this_machine_id ".
+           "and id<$night_id and buildstatus=\"OK\" order by added desc";
+  $program_query = mysql_query($query) or die (mysql_error());
+  $row = mysql_fetch_array($program_query);
+  $prev_id=$row['id'];
+  mysql_free_result($program_query);
+
+  return $prev_id;
+}
+
+
 
 /*$programs=array("Benchmarks/CoyoteBench/huffbench","Benchmarks/CoyoteBench/lpbench");
 $history = buildResultsHistory(18, $programs,"GCCAS",$mysql_link);


Index: nightlytest-serverside/fulltest.php
diff -u nightlytest-serverside/fulltest.php:1.12 nightlytest-serverside/fulltest.php:1.13
--- nightlytest-serverside/fulltest.php:1.12	Thu Aug 10 17:35:02 2006
+++ nightlytest-serverside/fulltest.php	Thu Aug 17 22:50:18 2006
@@ -6,8 +6,8 @@
 $night_id = $HTTP_GET_VARS['night'];
 
 if(!$machine_id || !$night_id){
-	print "Error, incorrect URL for test.php!\n";
-	die();
+  print "Error, incorrect URL for test.php!\n";
+  die();
 }
 
 
@@ -17,15 +17,15 @@
 $machine_query = mysql_query("SELECT * FROM machine WHERE id=$machine_id") or die (mysql_error());
 $row = mysql_fetch_array($machine_query);
 mysql_free_result($machine_query);
-$today_query = mysql_query("SELECT * FROM night WHERE id=$night_id") or die (mysql_error());
-$today_row = mysql_fetch_array($today_query);
-mysql_free_result($today_query);
-$cur_date=$today_row['added'];
 
-$today_query = mysql_query("SELECT * FROM night WHERE machine=$machine_id and added<\"$cur_date\" order by added desc") or die (mysql_error());
+$today_query = getSuccessfulNightsHistory($machine_id, $mysql_link, $night_id);
+$today_row = mysql_fetch_array($today_query);
 $yesterday_row = mysql_fetch_array($today_query);
+$oldday_row = mysql_fetch_array($today_query);
 mysql_free_result($today_query);
+$cur_date=$today_row['added'];
 
+$previous_succesful_id = getPreviousWorkingNight($night_id, $mysql_link);
 
 ?>
 
@@ -47,15 +47,15 @@
 <center><font size=+3 face=Verdana><b>LLVM Nightly Test Results For <?php print $cur_date; ?></b></font></center><br>
 
 <table cellspacing=0 cellpadding=0 border=0>
-	<tr>
-		<td valign=top>
-			<? 
-			$machine = $HTTP_GET_VARS['machine'];
-			$night = $HTTP_GET_VARS['night'];
-			include 'sidebar.php'; 
-			?>			
-		</td>
-		<td>
+  <tr>
+    <td valign=top>
+      <? 
+      $machine = $HTTP_GET_VARS['machine'];
+      $night = $HTTP_GET_VARS['night'];
+      include 'sidebar.php'; 
+      ?>      
+    </td>
+    <td>
 <?php
 
 /*****************************************************
@@ -101,8 +101,8 @@
  ******************************************************/
 $buildfile=str_replace(" ", "_", $cur_date);
 if(file_exists("machines/$machine_id/$buildfile-Build-Log.txt")){
-	print "<h4><a href=\"machines/$machine_id/$buildfile-Build-Log.txt\">".
-		  "View Build Log</a></h4>\n";
+  print "<h4><a href=\"machines/$machine_id/$buildfile-Build-Log.txt\">".
+      "View Build Log</a></h4>\n";
 }
 
 /*****************************************************
@@ -113,12 +113,12 @@
 $previous_query = mysql_query("SELECT * FROM night WHERE \"$cur_date\" > added and machine=$machine_id ORDER BY added DESC") or die (mysql_error());
 
 if(strpos($today_row['buildstatus'], "OK")===FALSE){
-	$disp="";
-	$sign="(+)";
+  $disp="";
+  $sign="(+)";
 }
 else{
-	$disp="none";
-	$sign="(-)";
+  $disp="none";
+  $sign="(-)";
 }
 print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('buildStatus');\", id=\"buildStatus_\">$sign Build Status</a></font>\n";
 print "<div id=\"buildStatus\" style=\"display: $disp;\" class=\"hideable\">\n";
@@ -132,10 +132,10 @@
  * Printing changes in test suite
  *
  ******************************************************/
-$new_tests=preg_replace("/\n/","<br>\n",$today_row['new_tests']);
-$removed_tests=preg_replace("/\n/","<br>\n",$today_row['removed_tests']);
-$newly_passing_tests=preg_replace("/\n/","<br>\n",$today_row['newly_passing_tests']);
-$newly_failing_tests=preg_replace("/\n/","<br>\n",$today_row['newly_failing_tests']);
+$new_tests=getNewTests($night_id, $previous_succesful_id, $mysql_link);
+$removed_tests=getRemovedTests($night_id, $previous_succesful_id, $mysql_link);
+$newly_passing_tests=getFixedTests($night_id, $previous_succesful_id, $mysql_link);
+$newly_failing_tests=getBrokenTests($night_id, $previous_succesful_id, $mysql_link);
 
 if((strpos($new_tests, "none")!==FALSE &&
    strpos($removed_tests, "none")!==FALSE &&
@@ -149,8 +149,8 @@
         $sign="(-)";
 }
 else{
-	$disp="";
-	$sign="(+)";
+  $disp="";
+  $sign="(+)";
 }
 print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('testSuite');\", id=\"testSuite_\">$sign Test Suite Changes</a></font>\n";
 print "<div id=\"testSuite\" style=\"display: $disp;\" class=\"hideable\">\n";
@@ -173,8 +173,10 @@
 $delta_exppass = $today_row['teststats_exppass']-$yesterday_row['teststats_exppass'];
 $delta_expfail = $today_row['teststats_expfail']-$yesterday_row['teststats_expfail'];
 $delta_unexpfail = $today_row['teststats_unexpfail']-$yesterday_row['teststats_unexpfail'];
+$unexpected_failures = getUnexpectedFailures($night_id, $mysql_link);
 
-if($delta_exppass==0 && $delta_expfail==0 && $delta_unexpfail==0){
+if($delta_exppass==0 && $delta_expfail==0 && 
+   $delta_unexpfail==0 && strcmp($unexpected_failures, "")===0){
         $disp="none";
         $sign="(-)";
 }
@@ -227,8 +229,7 @@
 print "</table><br><br>\n";
 
 print"<a name=\"unexpfail_tests\"><b>Unexpected test failures:</b></a><br>\n";
-$unexpfail_tests=preg_replace("/\n/","<br>\n",$today_row['unexpfail_tests']);
-print "$unexpfail_tests<br><br>\n";
+print "$unexpected_failures<br><br>\n";
 
 print "</div><br><br>\n";
 
@@ -245,8 +246,8 @@
         $sign="(+)";
 }
 else{
-	$disp="none";
-	$sign="(-)";
+  $disp="none";
+  $sign="(-)";
 }
 print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('warningsChanges');\", id=\"warningsChanges_\">$sign Warning Information</a></font>\n";
 print "<div id=\"warningsChanges\" style=\"display: $disp;\" class=\"hideable\">\n";
@@ -295,99 +296,99 @@
 print "\t</tr>\n";
 
 if( $previous_row = mysql_fetch_array($previous_query) ){
-	print "\t<tr>\n";
-	print "\t\t<td>Previous nightly test ({$previous_row['added']})</td>\n";
-	print "\t\t<td>{$previous_row['getcvstime_cpu']}</td>\n";
-	print "\t\t<td>{$previous_row['getcvstime_wall']}</td>\n";
-	print "\t\t<td>{$previous_row['configuretime_cpu']}</td>\n";
-	print "\t\t<td>{$previous_row['configuretime_wall']}</td>\n";
-	print "\t\t<td>{$previous_row['buildtime_cpu']}</td>\n";
-	print "\t\t<td>{$previous_row['buildtime_wall']}</td>\n";
-	print "\t\t<td>{$previous_row['dejagnutime_cpu']}</td>\n";
-	print "\t\t<td>{$previous_row['dejagnutime_wall']}</td>\n";
-	print "\t</tr>\n";
-
-
-	print "\t<tr>\n";
-	print "\t\t<td>% change</td>\n";
-	
-	if($previous_row['getcvstime_cpu']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['getcvstime_cpu'] - $previous_row['getcvstime_cpu'])/$previous_row['getcvstime_cpu']) * 100,2);	
-		$color=DetermineColor($delta, "white");
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}	
-
-	$color="white";
-	if($previous_row['getcvstime_wall']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['getcvstime_wall'] - $previous_row['getcvstime_wall'])/$previous_row['getcvstime_wall']) * 100,2);
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-	
-	$color="white";
-	if($previous_row['configuretime_cpu']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['configuretime_cpu'] - $previous_row['configuretime_cpu'])/$previous_row['configuretime_cpu']) * 100,2);
-        	$color=DetermineColor($delta, "white");
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-	
-	$color="white";
-
-	if($previous_row['configuretime_wall']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['configuretime_wall'] - $previous_row['configuretime_wall'])/$previous_row['configuretime_wall']) * 100,2);
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-
-	$color="white";
-	if($previous_row['buildtime_cpu']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['buildtime_cpu'] - $previous_row['buildtime_cpu'])/$previous_row['buildtime_cpu']) * 100,2);
-	        $color=DetermineColor($delta, "white");
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-
-	$color="white";
-	if($previous_row['buildtime_wall']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['buildtime_wall'] - $previous_row['buildtime_wall'])/$previous_row['buildtime_wall']) * 100,2);
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-	
-	$color="white";
-	if($previous_row['dejagnutime_cpu']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['dejagnutime_cpu'] - $previous_row['dejagnutime_cpu'])/$previous_row['dejagnutime_cpu']) * 100,2);
-		$color=DetermineColor($delta, "white");
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-
-	$color="white";
-	if($previous_row['dejagnutime_wall']==0){
-		print "\t\t<td>-</td>\n";
-	}
-	else{
-		$delta = round((($today_row['dejagnutime_wall'] - $previous_row['dejagnutime_wall'])/$previous_row['dejagnutime_wall']) * 100,2);
-		print "\t\t<td bgcolor=$color>$delta</td>\n";
-	}
-	
-	print "\t</tr>\n";
+  print "\t<tr>\n";
+  print "\t\t<td>Previous nightly test ({$previous_row['added']})</td>\n";
+  print "\t\t<td>{$previous_row['getcvstime_cpu']}</td>\n";
+  print "\t\t<td>{$previous_row['getcvstime_wall']}</td>\n";
+  print "\t\t<td>{$previous_row['configuretime_cpu']}</td>\n";
+  print "\t\t<td>{$previous_row['configuretime_wall']}</td>\n";
+  print "\t\t<td>{$previous_row['buildtime_cpu']}</td>\n";
+  print "\t\t<td>{$previous_row['buildtime_wall']}</td>\n";
+  print "\t\t<td>{$previous_row['dejagnutime_cpu']}</td>\n";
+  print "\t\t<td>{$previous_row['dejagnutime_wall']}</td>\n";
+  print "\t</tr>\n";
+
+
+  print "\t<tr>\n";
+  print "\t\t<td>% change</td>\n";
+  
+  if($previous_row['getcvstime_cpu']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['getcvstime_cpu'] - $previous_row['getcvstime_cpu'])/$previous_row['getcvstime_cpu']) * 100,2);  
+    $color=DetermineColor($delta, "white");
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }  
+
+  $color="white";
+  if($previous_row['getcvstime_wall']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['getcvstime_wall'] - $previous_row['getcvstime_wall'])/$previous_row['getcvstime_wall']) * 100,2);
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+  
+  $color="white";
+  if($previous_row['configuretime_cpu']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['configuretime_cpu'] - $previous_row['configuretime_cpu'])/$previous_row['configuretime_cpu']) * 100,2);
+          $color=DetermineColor($delta, "white");
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+  
+  $color="white";
+
+  if($previous_row['configuretime_wall']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['configuretime_wall'] - $previous_row['configuretime_wall'])/$previous_row['configuretime_wall']) * 100,2);
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+
+  $color="white";
+  if($previous_row['buildtime_cpu']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['buildtime_cpu'] - $previous_row['buildtime_cpu'])/$previous_row['buildtime_cpu']) * 100,2);
+          $color=DetermineColor($delta, "white");
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+
+  $color="white";
+  if($previous_row['buildtime_wall']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['buildtime_wall'] - $previous_row['buildtime_wall'])/$previous_row['buildtime_wall']) * 100,2);
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+  
+  $color="white";
+  if($previous_row['dejagnutime_cpu']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['dejagnutime_cpu'] - $previous_row['dejagnutime_cpu'])/$previous_row['dejagnutime_cpu']) * 100,2);
+    $color=DetermineColor($delta, "white");
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+
+  $color="white";
+  if($previous_row['dejagnutime_wall']==0){
+    print "\t\t<td>-</td>\n";
+  }
+  else{
+    $delta = round((($today_row['dejagnutime_wall'] - $previous_row['dejagnutime_wall'])/$previous_row['dejagnutime_wall']) * 100,2);
+    print "\t\t<td bgcolor=$color>$delta</td>\n";
+  }
+  
+  print "\t</tr>\n";
 }
 mysql_free_result($previous_query);
 
@@ -424,43 +425,43 @@
 print"<b>Added files:</b><br>\n";
 $added_files  = $row['cvs_added'];
 if(strcmp($added_files,"")!=0){
-	$added_files = str_replace("\n","<br>",$added_files);
-	print "<table>\n";
-	print "\t<tr>\n";
-	print "\t\t<td>$added_files</td>\n";
-	print "\t</tr>\n";
-	print "</table><br><br>\n";
+  $added_files = str_replace("\n","<br>",$added_files);
+  print "<table>\n";
+  print "\t<tr>\n";
+  print "\t\t<td>$added_files</td>\n";
+  print "\t</tr>\n";
+  print "</table><br><br>\n";
 }
 else{
-	print "No removed files<br><br>\n";
+  print "No removed files<br><br>\n";
 }
 
 print"<b>Removed files:</b><br>\n";
 $removed_files  = $row['cvs_removed'];
 if(strcmp($removed_files,"")!=0){
-	$removed_files = str_replace("\n","<br>",$removed_files);
-	print "<table>\n";
-	print "\t<tr>\n";
-	print "\t\t<td>$removed_files</td>\n";
-	print "\t</tr>\n";
-	print "</table><br><br>\n";
+  $removed_files = str_replace("\n","<br>",$removed_files);
+  print "<table>\n";
+  print "\t<tr>\n";
+  print "\t\t<td>$removed_files</td>\n";
+  print "\t</tr>\n";
+  print "</table><br><br>\n";
 }
 else{
-	print "No removed files<br><br>\n";
+  print "No removed files<br><br>\n";
 }
 
 print"<b>Modified files:</b><br>\n";
 $modified_files  = $row['cvs_modified'];
 if(strcmp($modified_files,"")!=0){
-	$modified_files = str_replace("\n","<br>",$modified_files);
-	print "<table>\n";
-	print "\t<tr>\n";
-	print "\t\t<td>$modified_files</td>\n";
-	print "\t</tr>\n";
-	print "</table><br><br>\n";
+  $modified_files = str_replace("\n","<br>",$modified_files);
+  print "<table>\n";
+  print "\t<tr>\n";
+  print "\t\t<td>$modified_files</td>\n";
+  print "\t</tr>\n";
+  print "</table><br><br>\n";
 }
 else{
-	print "No removed files<br><br>\n";
+  print "No removed files<br><br>\n";
 }
 print "</div><br><br>\n";
 
@@ -565,8 +566,8 @@
 
 $today_results = GetDayResults($today_row['id'], $category_array, $mysql_link);
 if(isset($yesterday_row['id'])){
-	$yesterday_results = GetDayResults($yesterday_row['id'], $category_array, $mysql_link);
-	$percent_difference = CalculateChangeBetweenDays($yesterday_results, $today_results,.2);	
+  $yesterday_results = GetDayResults($yesterday_row['id'], $category_print_array, $mysql_link);
+  $percent_difference = CalculateChangeBetweenDays($yesterday_results, $today_results,.2);  
 }
 /********************** external table **********************/
 print "<form method=GET action=\"resultsgraph.php\">\n";
@@ -577,63 +578,63 @@
 print"<b>External tests:</b><br>\n";
 print "<table border='0' cellspacing='0' cellpadding='2'><tr><td bgcolor=#000000>\n"; #creating the black border around the table 
 print "<table class=\"sortable\" id=\"external_tests_\" border='1' cellspacing='0' cellpadding='0'>\n";
-print "\t<tr bgcolor=#FFCC99>\n";	
-print "\t\t<th>Program</th>\n";	
+print "\t<tr bgcolor=#FFCC99>\n";  
+print "\t\t<th>Program</th>\n";  
 $index=0; //here to ensure we dont print %diff for GCC comparisons
 foreach ($category_print_array as $x){
-	print "\t\t<th>Today's $x</th>\n";
-	if($index<10 && isset($percent_difference)){
-		print "\t\t<th>% change in $x</th>\n";
-	}
-	$index++;
+  print "\t\t<th>Today's $x</th>\n";
+  if($index<10 && isset($percent_difference)){
+    print "\t\t<th>% change in $x</th>\n";
+  }
+  $index++;
 }
-print "\t</tr>\n";	
+print "\t</tr>\n";  
 print "\t<tr bgcolor=#FFCC99>\n";
 print "\t\t<td></td>\n";
-$index=0;	
+$index=0;  
 foreach ($category_print_array as $x){
-	if($index<10 && isset($percent_difference)){
-		$col_width=2;
-	}
-	else{
-		$col_width=1;
-	}
-	print "\t\t<td colspan=\"$col_width\" align=center><input type=checkbox name=\"measure[]\" multiple=\"multiple\" value=\"$x\">\n";
-	print "<span style=\"position:relative;\">\n";
-	print "<span id=\"external_$index\" class=\"popup2\">\n";
-	print "<pre>{$category_print_array_description[$index]}</pre>\n";
-	print "</span><a href=\"javascript:void(0);\" onClick=\"TogglePop('external_$index');\">?</a></span>\n";
-	print "</td>\n";
-	$index++;
+  if($index<10 && isset($percent_difference)){
+    $col_width=2;
+  }
+  else{
+    $col_width=1;
+  }
+  print "\t\t<td colspan=\"$col_width\" align=center><input type=checkbox name=\"measure[]\" multiple=\"multiple\" value=\"$x\">\n";
+  print "<span style=\"position:relative;\">\n";
+  print "<span id=\"external_$index\" class=\"popup2\">\n";
+  print "<pre>{$category_print_array_description[$index]}</pre>\n";
+  print "</span><a href=\"javascript:void(0);\" onClick=\"TogglePop('external_$index');\">?</a></span>\n";
+  print "</td>\n";
+  $index++;
 }
-print "\t</tr>\n";	
+print "\t</tr>\n";  
 $row_color=1;
 $count=0;
 foreach(array_keys($today_results) as $program){
-	if(strcmp($today_results["$program"][0],"external")==0){
-		if($row_color % 2 == 0){
-			$def_color="white";
-		}
-		else{
-			$def_color="#DDDDDD";
-		}	
-		print "\t<tr bgcolor='$def_color'>\n";		
-		print "\t\t<td><input type=checkbox name=program[] multiple=\"multiple\" value=\"$program\">$program</td>\n";
-		for($y=1; $y<sizeof($today_results["$program"]); $y++){
-			print "\t\t<td>{$today_results["$program"][$y]}</td>\n";		
-			if($y<11 && isset($percent_difference)){
-				$delta=round($percent_difference["$program"][$y-1], 2);
-				$color=DetermineColor($delta, $def_color);
-				print "\t\t<td bgcolor=\"$color\">$delta</td>\n";	
-			}
-		} 
-		print "\t</tr>\n";	
-		$row_color++;
-		if($row_color > 4){
-			$row_color=1;
-		}
-		$count++;
-	}//end if strcmp
+  if(strcmp($today_results["$program"][0],"external")==0){
+    if($row_color % 2 == 0){
+      $def_color="white";
+    }
+    else{
+      $def_color="#DDDDDD";
+    }  
+    print "\t<tr bgcolor='$def_color'>\n";    
+    print "\t\t<td><input type=checkbox name=program[] multiple=\"multiple\" value=\"$program\">$program</td>\n";
+    for($y=1; $y<sizeof($today_results["$program"]); $y++){
+      print "\t\t<td>{$today_results["$program"][$y]}</td>\n";    
+      if($y<11 && isset($percent_difference)){
+        $delta=round($percent_difference["$program"][$y-1], 2);
+        $color=DetermineColor($delta, $def_color);
+        print "\t\t<td bgcolor=\"$color\">$delta</td>\n";  
+      }
+    } 
+    print "\t</tr>\n";  
+    $row_color++;
+    if($row_color > 4){
+      $row_color=1;
+    }
+    $count++;
+  }//end if strcmp
 }//end foreach
 print "</table>\n";
 print "</td></tr></table><br><br>\n"; #ending black border around table
@@ -643,63 +644,63 @@
 print"<b>Multisource tests:</b><br>\n";
 print "<table border='0' cellspacing='0' cellpadding='2'><tr><td bgcolor=#000000>\n"; #creating the black border around the table 
 print "<table class=\"sortable\" id=\"multisource_tests\" border='1' cellspacing='0' cellpadding='0'>\n";
-print "\t<tr bgcolor=#FFCC99>\n";	
-print "\t\t<th>Program</th>\n";	
+print "\t<tr bgcolor=#FFCC99>\n";  
+print "\t\t<th>Program</th>\n";  
 $index=0; //here to ensure we dont print %diff for GCC comparisons
 foreach ($category_print_array as $x){
-	print "\t\t<th>Today's $x</th>\n";
-	if($index<10 && isset($percent_difference)){
-		print "\t\t<th>% change in $x</th>\n";
-	}
-	$index++;
+  print "\t\t<th>Today's $x</th>\n";
+  if($index<10 && isset($percent_difference)){
+    print "\t\t<th>% change in $x</th>\n";
+  }
+  $index++;
 }
-print "\t</tr>\n";	
+print "\t</tr>\n";  
 print "\t<tr bgcolor=#FFCC99>\n";
 print "\t\t<td></td>\n";
-$index=0;	
+$index=0;  
 foreach ($category_print_array as $x){
-	if($index<10 && isset($percent_difference)){
-		$col_width=2;
-	}
-	else{
-		$col_width=1;
-	}
-	print "\t\t<td colspan=\"$col_width\" align=center><input type=checkbox name=\"measure[]\" multiple=\"multiple\" value=\"$x\">\n";
-	print "<span style=\"position:relative;\">\n";
-	print "<span id=\"multi_$index\" class=\"popup2\">\n";
-	print "<pre>{$category_print_array_description[$index]}</pre>\n";
-	print "</span><a href=\"javascript:void(0);\" onClick=\"TogglePop('multi_$index');\">?</a></span>\n";
-	print "</td>\n";
-	$index++;
+  if($index<10 && isset($percent_difference)){
+    $col_width=2;
+  }
+  else{
+    $col_width=1;
+  }
+  print "\t\t<td colspan=\"$col_width\" align=center><input type=checkbox name=\"measure[]\" multiple=\"multiple\" value=\"$x\">\n";
+  print "<span style=\"position:relative;\">\n";
+  print "<span id=\"multi_$index\" class=\"popup2\">\n";
+  print "<pre>{$category_print_array_description[$index]}</pre>\n";
+  print "</span><a href=\"javascript:void(0);\" onClick=\"TogglePop('multi_$index');\">?</a></span>\n";
+  print "</td>\n";
+  $index++;
 }
-print "\t</tr>\n";	
+print "\t</tr>\n";  
 $row_color=1;
 $count=0;
 foreach(array_keys($today_results) as $program){
-	if(strcmp($today_results["$program"][0],"multisource")==0){
-		if($row_color % 2 == 0){
-			$def_color="white";
-		}
-		else{
-			$def_color="#DDDDDD";
-		}	
-		print "\t<tr bgcolor='$def_color'>\n";		
-		print "\t\t<td><input type=checkbox name=program[] multiple=\"multiple\" value=\"$program\">$program</td>\n";
-		for($y=1; $y<sizeof($today_results["$program"]); $y++){
-			print "\t\t<td>{$today_results["$program"][$y]}</td>\n";
-			if($y<11 && isset($percent_difference)){
-				$delta=round($percent_difference["$program"][$y-1], 2);
-				$color=DetermineColor($delta, $def_color);
-				print "\t\t<td bgcolor=\"$color\">$delta</td>\n";	
-			}
-		} 
-		print "\t</tr>\n";	
-		$row_color++;
-		if($row_color > 4){
-			$row_color=1;
-		}
-		$count++;
-	}//end if strcmp
+  if(strcmp($today_results["$program"][0],"multisource")==0){
+    if($row_color % 2 == 0){
+      $def_color="white";
+    }
+    else{
+      $def_color="#DDDDDD";
+    }  
+    print "\t<tr bgcolor='$def_color'>\n";    
+    print "\t\t<td><input type=checkbox name=program[] multiple=\"multiple\" value=\"$program\">$program</td>\n";
+    for($y=1; $y<sizeof($today_results["$program"]); $y++){
+      print "\t\t<td>{$today_results["$program"][$y]}</td>\n";
+      if($y<11 && isset($percent_difference)){
+        $delta=round($percent_difference["$program"][$y-1], 2);
+        $color=DetermineColor($delta, $def_color);
+        print "\t\t<td bgcolor=\"$color\">$delta</td>\n";  
+      }
+    } 
+    print "\t</tr>\n";  
+    $row_color++;
+    if($row_color > 4){
+      $row_color=1;
+    }
+    $count++;
+  }//end if strcmp
 }//end foreach
 print "</table>\n";
 print "</td></tr></table><br><br>\n"; #ending black border around table
@@ -713,63 +714,63 @@
 print"<b>Singlesource tests:</b><br>\n";
 print "<table border='0' cellspacing='0' cellpadding='2'><tr><td bgcolor=#000000>\n"; #creating the black border around the table 
 print "<table class=\"sortable\" id=\"singlesource_tests\" border='1' cellspacing='0' cellpadding='0'>\n";
-print "\t<tr bgcolor=#FFCC99>\n";	
-print "\t\t<th>Program</th>\n";	
+print "\t<tr bgcolor=#FFCC99>\n";  
+print "\t\t<th>Program</th>\n";  
 $index=0; //here to ensure we dont print %diff for GCC comparisons
 foreach ($category_print_array as $x){
-	print "\t\t<th>Today's $x</th>\n";
-	if($index<10 && isset($percent_difference)){
-		print "\t\t<th>% change in $x</th>\n";
-	}
-	$index++;
+  print "\t\t<th>Today's $x</th>\n";
+  if($index<10 && isset($percent_difference)){
+    print "\t\t<th>% change in $x</th>\n";
+  }
+  $index++;
 }
-print "\t</tr>\n";	
+print "\t</tr>\n";  
 print "\t<tr bgcolor=#FFCC99>\n";
 print "\t\t<td></td>\n";
-$index=0;	
+$index=0;  
 foreach ($category_print_array as $x){
-	if($index<10 && isset($percent_difference)){
-		$col_width=2;
-	}
-	else{
-		$col_width=1;
-	}
-	print "\t\t<td colspan=\"$col_width\" align=center><input type=checkbox name=\"measure[]\" multiple=\"multiple\" value=\"$x\">\n";
-	print "<span style=\"position:relative;\">\n";
-	print "<span id=\"single_$index\" class=\"popup2\">\n";
-	print "<pre>{$category_print_array_description[$index]}</pre>\n";
-	print "</span><a href=\"javascript:void(0);\" onClick=\"TogglePop('single_$index');\">?</a></span>\n";
-	print "</td>\n";
-	$index++;
+  if($index<10 && isset($percent_difference)){
+    $col_width=2;
+  }
+  else{
+    $col_width=1;
+  }
+  print "\t\t<td colspan=\"$col_width\" align=center><input type=checkbox name=\"measure[]\" multiple=\"multiple\" value=\"$x\">\n";
+  print "<span style=\"position:relative;\">\n";
+  print "<span id=\"single_$index\" class=\"popup2\">\n";
+  print "<pre>{$category_print_array_description[$index]}</pre>\n";
+  print "</span><a href=\"javascript:void(0);\" onClick=\"TogglePop('single_$index');\">?</a></span>\n";
+  print "</td>\n";
+  $index++;
 }
-print "\t</tr>\n";	
+print "\t</tr>\n";  
 $row_color=1;
 $count=0;
 foreach(array_keys($today_results) as $program){
-	if(strcmp($today_results["$program"][0],"singlesource")==0){
-		if($row_color % 2 == 0){
-			$def_color="white";
-		}
-		else{
-			$def_color="#DDDDDD";
-		}	
-		print "\t<tr bgcolor='$def_color'>\n";		
-		print "\t\t<td><input type=checkbox name=program[] multiple=\"multiple\" value=\"$program\">$program</td>\n";
-		for($y=1; $y<sizeof($today_results["$program"]); $y++){
-			print "\t\t<td>{$today_results["$program"][$y]}</td>\n";
-			if($y<11 && isset($percent_difference)){
-				$delta=round($percent_difference["$program"][$y-1], 2);
-				$color=DetermineColor($delta, $def_color);
-				print "\t\t<td bgcolor=\"$color\">$delta</td>\n";	
-			}
-		} 
-		print "\t</tr>\n";	
-		$row_color++;
-		if($row_color > 4){
-			$row_color=1;
-		}
-		$count++;
-	}//end if strcmp
+  if(strcmp($today_results["$program"][0],"singlesource")==0){
+    if($row_color % 2 == 0){
+      $def_color="white";
+    }
+    else{
+      $def_color="#DDDDDD";
+    }  
+    print "\t<tr bgcolor='$def_color'>\n";    
+    print "\t\t<td><input type=checkbox name=program[] multiple=\"multiple\" value=\"$program\">$program</td>\n";
+    for($y=1; $y<sizeof($today_results["$program"]); $y++){
+      print "\t\t<td>{$today_results["$program"][$y]}</td>\n";
+      if($y<11 && isset($percent_difference)){
+        $delta=round($percent_difference["$program"][$y-1], 2);
+        $color=DetermineColor($delta, $def_color);
+        print "\t\t<td bgcolor=\"$color\">$delta</td>\n";  
+      }
+    } 
+    print "\t</tr>\n";  
+    $row_color++;
+    if($row_color > 4){
+      $row_color=1;
+    }
+    $count++;
+  }//end if strcmp
 }//end foreach
 print "</table>\n";
 print "</td></tr></table><br><br>\n"; #ending black border around table


Index: nightlytest-serverside/individualgraph.php
diff -u nightlytest-serverside/individualgraph.php:1.1.1.1 nightlytest-serverside/individualgraph.php:1.2
--- nightlytest-serverside/individualgraph.php:1.1.1.1	Wed Jul  5 15:56:33 2006
+++ nightlytest-serverside/individualgraph.php	Thu Aug 17 22:50:18 2006
@@ -50,12 +50,12 @@
 
 if(isset($HTTP_GET_VARS['measure'])){
         $measure_arr=$HTTP_GET_VARS["measure"];
-	$measure=$measure_arr[0];
+  $measure=$measure_arr[0];
 }
 else{$URL_ERROR=1;$error_msg="no value for measure";}
 
 if(isset($HTTP_GET_VARS['program'])){
-	$program_arr=$HTTP_GET_VARS['program'];
+  $program_arr=$HTTP_GET_VARS['program'];
         $program=$HTTP_GET_VARS['program'];
 }
 else{$URL_ERROR=1;$error_msg="no value for program";}
@@ -80,7 +80,7 @@
 else{$URL_ERROR=1;$error_msg="no value for machine";}
 
 if(isset($HTTP_GET_VARS['start'])){
-    	if(preg_match("/\d\d\d\d\-\d\d\-\d\d \d\d:\d\d:\d\d/", "{$HTTP_GET_VARS['start']}")>0){
+      if(preg_match("/\d\d\d\d\-\d\d\-\d\d \d\d:\d\d:\d\d/", "{$HTTP_GET_VARS['start']}")>0){
                 $start = $HTTP_GET_VARS['start'];
                 $start_query = "and added >= \"$start\"";
                 $start_url = "&start=$start";
@@ -91,14 +91,14 @@
         }
 }
 else{
-	$start_url="";
+  $start_url="";
         $start = "";
         $start_query = " ";
 }
 
 if(isset($HTTP_GET_VARS['end'])){
         if(preg_match("/\d\d\d\d\-\d\d\-\d\d \d\d:\d\d:\d\d/", $HTTP_GET_VARS['end'])>0){
-		$end = $HTTP_GET_VARS['end'];
+    $end = $HTTP_GET_VARS['end'];
                 $end_url="&end=$end";
                 $end_query = "and added <= \"$end\"";
         }
@@ -108,7 +108,7 @@
         }
 }
 else{
-	$end_url="";
+  $end_url="";
         $end = "";
         $end_query = " ";
 }
@@ -116,26 +116,26 @@
 if(isset($HTTP_GET_VARS['normalize'])){
         if(strcmp($HTTP_GET_VARS['normalize'],"true")==0){
                 $NORMALIZE=1;
-        	$normalize_url = "&normalize=true";
-		$def_normalize="CHECKED";
-		$def_unnormalize="";
-	}
+          $normalize_url = "&normalize=true";
+    $def_normalize="CHECKED";
+    $def_unnormalize="";
+  }
         else{
-		$normalize_url="";
+    $normalize_url="";
                 $NORMALIZE=0;
-		$def_normalize="";
-		$def_unnormalize="CHECKED";
+    $def_normalize="";
+    $def_unnormalize="CHECKED";
         }
 }
 else{
         $NORMALIZE=0;
-	$normalize_url="";
-	$def_normalize="";
-	$def_unnormalize="CHECKED";
+  $normalize_url="";
+  $def_normalize="";
+  $def_unnormalize="CHECKED";
 }
 if(isset($HTTP_GET_VARS['showdata'])){
         if(strcmp($HTTP_GET_VARS['showdata'],"true")==0){
-		$SHOWDATA=1;
+    $SHOWDATA=1;
                 $showdata="&showdata=true";
         }
         else{
@@ -144,22 +144,22 @@
         }
 }
 else{
-	$SHOWDATA=0;
+  $SHOWDATA=0;
         $showdata="";
 }
 
 if(isset($HTTP_GET_VARS['showpoints'])){
         if(strcmp($HTTP_GET_VARS['showpoints'],"true")==0){
                 $SHOWPOINTS=1;
-		$showpoints="&showpoints=true";
+    $showpoints="&showpoints=true";
         }
         else{
-		$SHOWPOINTS=0;
+    $SHOWPOINTS=0;
                 $showpoints="";
         }
 }
 else{
-	$SHOWPOINTS=0;
+  $SHOWPOINTS=0;
         $showpoints="";
 }
 
@@ -253,7 +253,7 @@
 
 $list_of_programs="";
 foreach($program as $prog){
-	$list_of_programs.="&program[]=$prog";
+  $list_of_programs.="&program[]=$prog";
 }
 print "\t<img src=\"drawresultsgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine_id&measure=$measure$list_of_programs$normalize_url$end_url$start_url$showdata$showpoints\" alt=\"$measure\" height=$ysize width=$xsize><br>\n";
 
@@ -320,66 +320,66 @@
 $all=0;
 if(strcmp($start, $all_tests)==0 && strcmp($end, $last_date)==0){$all=1; print "Time: <b>All</b> |";}
 else{ 
-	print "Time: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$last_date&$normalize_url$showpoints$showdata&start=$all_tests\">All</a> |\n";
+  print "Time: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$last_date&$normalize_url$showpoints$showdata&start=$all_tests\">All</a> |\n";
 }
 
 if($all==0 && strcmp($start, $all_tests)==0){
-	print "<b>From first measurement</b> |";
+  print "<b>From first measurement</b> |";
 }
 else{
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end&$normalize_url$showpoints$showdata&start=$all_tests\">From first measurement</a> |\n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end&$normalize_url$showpoints$showdata&start=$all_tests\">From first measurement</a> |\n";
 }
 
 if(strcmp($start, $one_year)!=0){
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$one_year\">1 year</a> | \n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$one_year\">1 year</a> | \n";
 }
 else { print " <b>1 year</b> |";}
 
 if(strcmp($start, $six_month)!=0){
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$six_month\">6 months</a> | \n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$six_month\">6 months</a> | \n";
 } 
 else { print " <b>6 months</b> |";}
 
 if(strcmp($start, $three_month)!=0){
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$three_month\">3 months</a> | \n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$three_month\">3 months</a> | \n";
 }
 else { print " <b>3 months</b> |";}
 
 if(strcmp($start, $one_month)!=0){
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$one_month&showdata=true&showpoints=true\">1 month</a> | \n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$one_month&showdata=true&showpoints=true\">1 month</a> | \n";
 }
 else { print " <b>1 month</b> |";}
 
 if(strcmp($start, $one_week)!=0){
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$one_week&showdata=true&showpoints=true\">1 week</a><br> \n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$showpoints$showdata&start=$one_week&showdata=true&showpoints=true\">1 week</a><br> \n";
 }
 else { print " <b>1 week</b><br>";}
 
 if($NORMALIZE==1){
-	print "Data normalization: <b>On</b> |\n";
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end&normalize=false&$start_url$showdata$showpoints\">Off</a><br>\n";
+  print "Data normalization: <b>On</b> |\n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end&normalize=false&$start_url$showdata$showpoints\">Off</a><br>\n";
 }
 else{
-	print "Data normalization: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end&normalize=true$start_url\">On</a> |\n";
-	print "<b>Off</b><br>\n";
+  print "Data normalization: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end&normalize=true$start_url\">On</a> |\n";
+  print "<b>Off</b><br>\n";
 }
 
 if($SHOWDATA==1){
-	print "Show data on graph: <b>On</b> |\n";
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url$showpoints\">Off</a><br>\n";
+  print "Show data on graph: <b>On</b> |\n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url$showpoints\">Off</a><br>\n";
 }
 else{
-	print "Show data on graph: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url$showpoints&showdata=true\">On</a> |\n";
-	print "<b>Off</b><br>\n";
+  print "Show data on graph: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url$showpoints&showdata=true\">On</a> |\n";
+  print "<b>Off</b><br>\n";
 }
 
 if($SHOWPOINTS==1){
-	print "Show points on graph: <b>On</b> |\n";
-	print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url$showdata\">Off</a><br>\n";
+  print "Show points on graph: <b>On</b> |\n";
+  print "<a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url$showdata\">Off</a><br>\n";
 }
 else{
-	print "Show points on graph: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url&$showdata&showpoints=true\">On</a> |\n";
-	print "<b>Off</b><br>\n";
+  print "Show points on graph: <a href=\"individualgraph.php?name=$measure&xsize=$xsize&ysize=$ysize&machine=$machine&night=$night&measure[]=$measure$list_of_programs&end=$end$normalize_url$start_url&$showdata&showpoints=true\">On</a> |\n";
+  print "<b>Off</b><br>\n";
 }
 
 
@@ -392,36 +392,36 @@
 print "<div id=\"dataTable\" style=\"display: none;\">\n";
 
 if(strcmp($start,"")!=0 && strcmp($end,"")!=0){
-	$history = buildResultsHistory($machine_id, $program,$measure,$mysql_link,$start,$end);
+    $history = buildResultsHistory($machine_id, $program,$measure,$mysql_link,$start,$end);
 }
 else if(strcmp($start,"")!=0){
-	$history = buildResultsHistory($machine_id, $program,$measure,$mysql_link,$start);
+    $history = buildResultsHistory($machine_id, $program,$measure,$mysql_link,$start);
 }
 else{
-	$history = buildResultsHistory($machine_id, $program,$measure,$mysql_link);
+    $history = buildResultsHistory($machine_id, $program,$measure,$mysql_link);
 }
 
 print "<table border=1 cellspacing=0 cellpadding=6>\n";
 print "\t<tr>\n";
 print "\t\t<td>Date</td>\n";
-foreach ($program as $prog){	
-	print "\t\t<td>$prog</td>\n";
+foreach ($program as $prog){  
+  print "\t\t<td>$prog</td>\n";
 }
 print "\t</tr>\n";
 foreach (array_keys($history) as $date){
-	if(sizeof($history["$date"])>1){
-		print "\t<tr>\n";
-		print "\t\t<td>$date</td>\n";
-		for($x=1; $x<sizeof($history["$date"]); $x++){
-			if(isset($history["$date"][$x])){
-				print "\t\t<td align=center>{$history["$date"][$x]}</td>\n";
-			}	
-			else{
-				print "\t\t<td align=center>-</td>\n";
-			}
-		}
-		print "\t</tr>\n";
-	}
+  if(sizeof($history["$date"])>1){
+    print "\t<tr>\n";
+    print "\t\t<td>$date</td>\n";
+    for($x=1; $x<sizeof($history["$date"]); $x++){
+      if(isset($history["$date"][$x])){
+        print "\t\t<td align=center>{$history["$date"][$x]}</td>\n";
+      }  
+      else{
+        print "\t\t<td align=center>-</td>\n";
+      }
+    }
+    print "\t</tr>\n";
+  }
 }
 print "</table></div>\n";
 


Index: nightlytest-serverside/sidebar.php
diff -u nightlytest-serverside/sidebar.php:1.8 nightlytest-serverside/sidebar.php:1.9
--- nightlytest-serverside/sidebar.php:1.8	Wed Aug  2 12:08:55 2006
+++ nightlytest-serverside/sidebar.php	Thu Aug 17 22:50:18 2006
@@ -88,7 +88,7 @@
 	/********************** Creating list to future and past tests **********************/
 	
 	$next_stack = array();
-	$next_query = getNightsResource($machine,$mysql_link,$cur_date,"2020-12-30 01:01:01","ASC");
+	$next_query = getNightsIDs($machine,$mysql_link,$cur_date,"2020-12-30 01:01:01","ASC");
 	$next = mysql_fetch_array($next_query);
 	$x=0;
 	while($x<7 && $x<mysql_affected_rows()-1 && $next = mysql_fetch_array($next_query)){
@@ -105,7 +105,7 @@
 	$date = preg_replace("/\s\d\d:\d\d:\d\d/","",$today_row['added']);
 	print "\t<li><h3><a href=\"test.php?machine=$machine&night=$night\">$date</a></h3>\n"; 
 	
-	$previous_query = getNightsResource($machine,$mysql_link,"2000-01-01 01:01:01","$cur_date");
+	$previous_query = getNightsIDs($machine,$mysql_link,"2000-01-01 01:01:01","$cur_date");
 	$x=0;
 	$prev=mysql_fetch_array($previous_query); //eliminates current date
 	while($x<7 && $prev=mysql_fetch_array($previous_query)){
@@ -115,19 +115,20 @@
 	}
 	print "</ul>\n";
 	mysql_free_result($previous_query);
-	
-	$next_query = getNightsResource($machine,$mysql_link);
+       
+	$next_query = getNightsIDs($machine,$mysql_link);
 	print "<form method=GET action=\"test.php\">\n";
         print "<input type=hidden name=\"machine\" value=\"$machine\">\n";
 	print "<select name=night>\n";
-	while ($next = mysql_fetch_array($next_query)){
-		print "<option value={$next['id']}>{$next['added']}\n";
+	while($next=mysql_fetch_array($next_query)){
+	  print "<option value={$next['id']}>{$next['added']}\n";
 	}
+	mysql_free_result($next_query);
 	
 	print "</select><br>\n";
 	print "<input type=submit value=\"Jump to Date\">\n";
 	print "</form>\n";
-	mysql_free_result($next_query);
+	
 
 }
 


Index: nightlytest-serverside/test.php
diff -u nightlytest-serverside/test.php:1.15 nightlytest-serverside/test.php:1.16
--- nightlytest-serverside/test.php:1.15	Thu Aug 10 17:32:12 2006
+++ nightlytest-serverside/test.php	Thu Aug 17 22:50:18 2006
@@ -36,12 +36,13 @@
 $today_row = getNightInfo($night_id,$mysql_link);
 $cur_date=$today_row['added'];
 
-$today_query = getNightsResource($machine_id,$mysql_link,"2000-01-01 01:01:01",$cur_date);
+$today_query = getSuccessfulNightsHistory($machine_id,$mysql_link,$night_id);
 $today_row = mysql_fetch_array($today_query);
 $yesterday_row = mysql_fetch_array($today_query);
 $oldday_row = mysql_fetch_array($today_query);
 mysql_free_result($today_query);
 
+$previous_succesful_id = getPreviousWorkingNight($night_id, $mysql_link);
 
 ?>
 
@@ -147,10 +148,10 @@
  * Printing changes in test suite
  *
  ******************************************************/
-$new_tests=preg_replace("/\n/","<br>\n",$today_row['new_tests']);
-$removed_tests=preg_replace("/\n/","<br>\n",$today_row['removed_tests']);
-$newly_passing_tests=preg_replace("/\n/","<br>\n",$today_row['newly_passing_tests']);
-$newly_failing_tests=preg_replace("/\n/","<br>\n",$today_row['newly_failing_tests']);
+$new_tests=getNewTests($night_id, $previous_succesful_id, $mysql_link);
+$removed_tests=getRemovedTests($night_id, $previous_succesful_id, $mysql_link);
+$newly_passing_tests=getFixedTests($night_id, $previous_succesful_id, $mysql_link);
+$newly_failing_tests=getBrokenTests($night_id, $previous_succesful_id, $mysql_link);
 
 if((strpos($new_tests, "none")!==FALSE &&
    strpos($removed_tests, "none")!==FALSE &&
@@ -172,7 +173,7 @@
 print"<h3><u>Test suite changes:</u></h3>\n";
 print"<b>New tests:</b><br>\n";
 print "$new_tests<br><br>\n";
-print"<b>Removed tests</b><br>\n";
+print"<b>Removed tests:</b><br>\n";
 print "$removed_tests<br><br>\n";
 print"<b>Newly passing tests:</b><br>\n";
 print "$newly_passing_tests<br><br>\n";
@@ -188,14 +189,16 @@
 $delta_exppass = $today_row['teststats_exppass']-$yesterday_row['teststats_exppass'];
 $delta_expfail = $today_row['teststats_expfail']-$yesterday_row['teststats_expfail'];
 $delta_unexpfail = $today_row['teststats_unexpfail']-$yesterday_row['teststats_unexpfail'];
+$unexpected_failures = getUnexpectedFailures($night_id, $mysql_link);
 
-if($delta_exppass==0 && $delta_expfail==0 && $delta_unexpfail==0){
+if($delta_exppass==0 && $delta_expfail==0 && 
+   $delta_unexpfail==0 && strcmp($unexpected_failures,"")===0){
   $disp="none";
         $sign="(-)";
 }
 else{
   $disp="";
-        $sign="(+)";
+  $sign="(+)";
 }
 
 
@@ -242,8 +245,7 @@
 print "</table><br><br>\n";
 
 print"<a name=\"unexpfail_tests\"><b>Unexpected test failures:</b></a><br>\n";
-$unexpfail_tests=preg_replace("/\n/","<br>\n",$today_row['unexpfail_tests']);
-print "$unexpfail_tests<br><br>\n";
+print "$unexpected_failures<br><br>\n";
 
 print "</div><br><br>\n";
 






More information about the llvm-commits mailing list