[llvm-commits] CVS: nightlytest-serverside/NightlyTester.php ProgramResults.php drawfilesizegraph.php fulltest.php index.php individualfilesizegraph.php individualgraph.php machine.php multiplemachinegraph.php multipleresultsgraph.php sidebar.php test.php testers.php
Jim Laskey
jlaskey at apple.com
Fri Sep 8 15:47:39 PDT 2006
Changes in directory nightlytest-serverside:
NightlyTester.php updated: 1.19 -> 1.20
ProgramResults.php updated: 1.44 -> 1.45
drawfilesizegraph.php updated: 1.3 -> 1.4
fulltest.php updated: 1.19 -> 1.20
index.php updated: 1.8 -> 1.9
individualfilesizegraph.php updated: 1.3 -> 1.4
individualgraph.php updated: 1.2 -> 1.3
machine.php updated: 1.5 -> 1.6
multiplemachinegraph.php updated: 1.1.1.1 -> 1.2
multipleresultsgraph.php updated: 1.1.1.1 -> 1.2
sidebar.php updated: 1.9 -> 1.10
test.php updated: 1.22 -> 1.23
testers.php updated: 1.1.1.1 -> 1.2
---
Log message:
reuse code for e-mail report #7
---
Diffs of the changes: (+81 -81)
NightlyTester.php | 46 ++++++++++++++++++++++----------------------
ProgramResults.php | 16 +++++++--------
drawfilesizegraph.php | 4 +--
fulltest.php | 10 ++++-----
index.php | 6 ++---
individualfilesizegraph.php | 2 -
individualgraph.php | 6 ++---
machine.php | 12 +++++------
multiplemachinegraph.php | 6 ++---
multipleresultsgraph.php | 6 ++---
sidebar.php | 26 ++++++++++++------------
test.php | 16 +++++++--------
testers.php | 6 ++---
13 files changed, 81 insertions(+), 81 deletions(-)
Index: nightlytest-serverside/NightlyTester.php
diff -u nightlytest-serverside/NightlyTester.php:1.19 nightlytest-serverside/NightlyTester.php:1.20
--- nightlytest-serverside/NightlyTester.php:1.19 Tue Aug 29 15:48:07 2006
+++ nightlytest-serverside/NightlyTester.php Fri Sep 8 17:47:25 2006
@@ -19,9 +19,9 @@
* being the column names
*
*****************************************************/
-function getMachineInfo($machine_id, $mysql_link){
+function getMachineInfo($machine_id){
$query="SELECT * FROM machine WHERE id=$machine_id";
- $machine_query = mysql_query($query, $mysql_link) or die ("$night failed! " . mysql_error());
+ $machine_query = mysql_query($query) or die ("$night failed! " . mysql_error());
$row = mysql_fetch_array($machine_query);
mysql_free_result($machine_query);
return $row;
@@ -34,7 +34,7 @@
* rows.
*
*****************************************************/
-function getMachineResource($mysql_link){
+function getMachineResource(){
$machine_query = mysql_query("SELECT * FROM machine ORDER BY nickname ASC") or die (mysql_error());
return $machine_query;
}
@@ -47,7 +47,7 @@
* rows.
*
*****************************************************/
-function getRecentMachineResource($mysql_link){
+function getRecentMachineResource(){
$night_query = mysql_query("SELECT machine FROM night where DATE_SUB(NOW(), INTERVAL 14 DAY) <= added") or die (mysql_error());
$machines="where id=0";
$machine_arr = array();
@@ -71,7 +71,7 @@
* rows.
*
*****************************************************/
-function getOldMachineResource($mysql_link){
+function getOldMachineResource(){
$night_query = mysql_query("SELECT machine FROM night where DATE_SUB(NOW(), INTERVAL 1 MONTH) > added") or die (mysql_error());
$machines="where id=0";
$machine_arr = array();
@@ -94,7 +94,7 @@
* being the column names
*
*****************************************************/
-function getNightInfo($night_id, $mysql_link){
+function getNightInfo($night_id){
$query="SELECT * FROM night WHERE id=$night_id";
$today_query = mysql_query("SELECT * FROM night WHERE id=$night_id") or die ("$query failed! " . mysql_error());
$today_row = mysql_fetch_array($today_query);
@@ -110,7 +110,7 @@
* mysql_fetch_array on.
*
*****************************************************/
-function getNightsResource($machine_id, $mysql_link, $start="2000-01-01 01:01:01", $end="2020-12-30 01:01:01", $order="DESC"){
+function getNightsResource($machine_id, $start="2000-01-01 01:01:01", $end="2020-12-30 01:01:01", $order="DESC"){
$query = mysql_query("SELECT * FROM night WHERE machine=$machine_id and added<=\"$end\" and added>=\"$start\" order by added $order") or die (mysql_error());
return $query;
}
@@ -123,7 +123,7 @@
* 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"){
+function getNightsIDs($machine_id, $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;
}
@@ -136,7 +136,7 @@
* mysql_fetch_array on.
*
*****************************************************/
-function getSuccessfulNightsHistory($machine_id, $mysql_link, $night_id, $order="DESC"){
+function getSuccessfulNightsHistory($machine_id, $night_id, $order="DESC"){
$query="SELECT * FROM night WHERE machine=$machine_id and id<=$night_id and buildstatus=\"OK\" order by added $order";
$query = mysql_query($query) or die (mysql_error());
return $query;
@@ -149,7 +149,7 @@
* Returns: A mysql query resource.
*
*****************************************************/
-function getRecentTests($hours="24", $mysql_link){
+function getRecentTests($hours="24"){
$result = mysql_query("select * from night where DATE_SUB(NOW(),INTERVAL $hours HOUR)<=added ORDER BY added DESC") or die (mysql_error());
return $result;
}
@@ -161,7 +161,7 @@
* Returns: A string formatted as "Year-month-day H:M:S"
*
*****************************************************/
-function calculateDate($mysql_link, $time_frame="1 YEAR", $origin_date="CURDATE()"){
+function calculateDate($time_frame="1 YEAR", $origin_date="CURDATE()"){
if(strpos($origin_date, "CURDATE")===false){
$query=mysql_query("SELECT \"$origin_date\" - INTERVAL $time_frame") or die(mysql_error());
}
@@ -182,7 +182,7 @@
* file and the value being the size of the file.
*
*****************************************************/
-function getAllFileSizes($mysql_link, $night_id){
+function getAllFileSizes($night_id){
$select = "select * from file WHERE night=$night_id";
$query = mysql_query($select) or die (mysql_error());
$result=array();
@@ -202,7 +202,7 @@
* night, and build type
*
*****************************************************/
-function get_file_history($mysql_link, $machine_id, $file_name){
+function get_file_history($machine_id, $file_name){
$nights_select = "select id, added from night WHERE machine=$machine_id ".
"order by added desc";
$nights_query = mysql_query($nights_select)
@@ -240,7 +240,7 @@
* not available the array will contain -.
*
*****************************************************/
-function buildFileSizeTable($mysql_link, $machine_id, $night_id){
+function buildFileSizeTable($machine_id, $night_id){
$result=array();
//setting up the night ids
@@ -255,9 +255,9 @@
$old_night=$row['id'];
mysql_free_result($query);
- if($cur_night>0) { $cur_data=getAllFileSizes($mysql_link, $cur_night); }
- if($prev_night>0) { $prev_data=getAllFileSizes($mysql_link, $prev_night); }
- if($old_night>0) { $old_data=getAllFileSizes($mysql_link, $old_night); }
+ if($cur_night>0) { $cur_data=getAllFileSizes($cur_night); }
+ if($prev_night>0) { $prev_data=getAllFileSizes($prev_night); }
+ if($old_night>0) { $old_data=getAllFileSizes($old_night); }
$cur_sum=0;
$prev_sum=0;
@@ -319,20 +319,20 @@
$machine_id = 8;
$file="./test/Regression/Archive/xpg4.a";
-$files = get_file_history($mysql_link, $machine_id, $file);
+$files = get_file_history($machine_id, $file);
foreach (array_keys($files) as $f){
print "$f = > {$files["$f"][0]}<br>\n";
}
-$machine_info = getMachineInfo(21, $mysql_link);
+$machine_info = getMachineInfo(21);
foreach (array_keys($machine_info) as $key){
print "$key => {$machine_info["$key"]}<br>\n";
}
print "<br><br><br>\n";
$night_id=-1;
-$night_resource = getNightsResource($machine_info['id'], $mysql_link);
+$night_resource = getNightsResource($machine_info['id']);
while($row = mysql_fetch_array($night_resource)){
print "added => {$row['added']}<br>\n";
$night_id=$row['id'];
@@ -341,11 +341,11 @@
print "<br><br><br>\n";
-$night_info = getNightInfo($night_id, $mysql_link);
+$night_info = getNightInfo($night_id);
print "buildstatus => {$night_info['buildstatus']}<br>\n";
print "<br><br><br>\n";
-$recent_resource = getRecentTests($machine_info['id'], $mysql_link);
+$recent_resource = getRecentTests($machine_info['id']);
while($row = mysql_fetch_array($recent_resource)){
print "added => {$row['added']}<br>\n";
$night_id=$row['id'];
@@ -353,7 +353,7 @@
mysql_free_result($recent_resource);
print "<br><br><br>\n";
-$my_day = calculateDate($mysql_link,"30 WEEK");
+$my_day = calculateDate("30 WEEK");
print "today's date - 30 weeks = $my_day<br>\n";
print "<br><br><br>\n";
*/
Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.44 nightlytest-serverside/ProgramResults.php:1.45
--- nightlytest-serverside/ProgramResults.php:1.44 Fri Sep 8 17:27:47 2006
+++ nightlytest-serverside/ProgramResults.php Fri Sep 8 17:47:25 2006
@@ -133,7 +133,7 @@
* "extenal."
*
*/
-function GetDayResults($night_id, $array_of_measures, $mysql_link){
+function GetDayResults($night_id, $array_of_measures ){
$result=array();
#print "SELECT * FROM program WHERE night=$night_id ORDER BY program ASC<br>\n";
$program_query = mysql_query("SELECT * FROM program WHERE night=$night_id ORDER BY program ASC") or die (mysql_error());
@@ -337,12 +337,12 @@
* being an array containing (date in seconds since epoch, program[0], program[1], ... ,
* program[n]) for all the data between the two dates
*/
-function buildResultsHistory($machine_id, $programs, $measure, $mysql_link, $start="2000-01-01 01:01:01", $end="2020-01-01 01:01:01"){
+function buildResultsHistory($machine_id, $programs, $measure , $start="2000-01-01 01:01:01", $end="2020-01-01 01:01:01"){
$preg_measure = str_replace("/","\/", $measure);
$results_arr=array();
$night_table_statement = "SELECT id, added FROM night WHERE machine=$machine_id ".
"AND added >= \"$start\" AND added <= \"$end\" ORDER BY added DESC";
- $night_table_query = mysql_query($night_table_statement, $mysql_link) or die(mysql_error());
+ $night_table_query = mysql_query($night_table_statement ) or die(mysql_error());
$night_arr=array();
$night_query="(";
while($row = mysql_fetch_array($night_table_query)){
@@ -687,7 +687,7 @@
* Returns the night id for the machine of the night passed in
* where build status = OK
*/
-function getPreviousWorkingNight($night_id, $mysql_link){
+function getPreviousWorkingNight($night_id ){
$query = "SELECT machine FROM night WHERE id=$night_id";
$program_query = mysql_query($query) or die (mysql_error());
$row = mysql_fetch_array($program_query);
@@ -737,7 +737,7 @@
/*$programs=array("Benchmarks/CoyoteBench/huffbench","Benchmarks/CoyoteBench/lpbench");
-$history = buildResultsHistory(18, $programs,"GCCAS",$mysql_link);
+$history = buildResultsHistory(18, $programs,"GCCAS" );
foreach (array_keys($history) as $date){
print "$date => ";
foreach($history["$date"] as $data){
@@ -747,9 +747,9 @@
}*/
if($DEBUG){
- $today_results = GetDayResults(565, $category_array, $mysql_link);
- $yesterday_results = GetDayResults(564, $category_array, $mysql_link);
- $oldday_results = GetDayResults(563, $category_array, $mysql_link);
+ $today_results = GetDayResults(565, $category_array );
+ $yesterday_results = GetDayResults(564, $category_array );
+ $oldday_results = GetDayResults(563, $category_array );
$percent_difference = CalculateChangeBetweenDays($yesterday_results, $today_results, .2);
$twoday_difference = CalculateChangeBetweenDays($oldday_results, $today_results, .01);
$count = CountSignifigantDifferences($percent_difference, 1, 25);
Index: nightlytest-serverside/drawfilesizegraph.php
diff -u nightlytest-serverside/drawfilesizegraph.php:1.3 nightlytest-serverside/drawfilesizegraph.php:1.4
--- nightlytest-serverside/drawfilesizegraph.php:1.3 Tue Aug 1 18:35:41 2006
+++ nightlytest-serverside/drawfilesizegraph.php Fri Sep 8 17:47:25 2006
@@ -185,10 +185,10 @@
$index=0;
foreach ($files as $file){
- $data = get_file_history($mysql_link, $machine_id, $file);
+ $data = get_file_history($machine_id, $file);
if($DEBUG){
- print "get_file_history($mysql_link, $machine_id, $file) returned...<br>\n";
+ print "get_file_history($machine_id, $file) returned...<br>\n";
foreach (array_keys($data) as $x){
print "$x {$data["$x"][0]} {$data["$x"][1]} {$data["$x"][2]}<br>\n";
}
Index: nightlytest-serverside/fulltest.php
diff -u nightlytest-serverside/fulltest.php:1.19 nightlytest-serverside/fulltest.php:1.20
--- nightlytest-serverside/fulltest.php:1.19 Fri Sep 8 17:27:47 2006
+++ nightlytest-serverside/fulltest.php Fri Sep 8 17:47:25 2006
@@ -18,14 +18,14 @@
$row = mysql_fetch_array($machine_query);
mysql_free_result($machine_query);
-$today_query = getSuccessfulNightsHistory($machine_id, $mysql_link, $night_id);
+$today_query = getSuccessfulNightsHistory($machine_id, $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);
+$previous_succesful_id = getPreviousWorkingNight($night_id);
?>
@@ -507,7 +507,7 @@
print "<input type=hidden name=night value=\"$night_id\">\n";
print "<input type=hidden name=end value=\"$cur_date\">\n";
-$all_data=buildFileSizeTable($mysql_link, $machine_id, $night_id);
+$all_data=buildFileSizeTable($machine_id, $night_id);
$formatted_num=number_format($all_data['Total Sum'][0],0,".",",");
print "<b>Total size</b>: $formatted_num bytes<br>\n";
@@ -591,9 +591,9 @@
******************************************************/
print"<h3><u>Program tests:</u></h3><br>\n";
-$today_results = GetDayResults($today_row['id'], $category_array, $mysql_link);
+$today_results = GetDayResults($today_row['id'], $category_array);
if(isset($yesterday_row['id'])){
- $yesterday_results = GetDayResults($yesterday_row['id'], $category_array, $mysql_link);
+ $yesterday_results = GetDayResults($yesterday_row['id'], $category_array);
$percent_difference = CalculateChangeBetweenDays($yesterday_results, $today_results,.2);
}
/********************** external table **********************/
Index: nightlytest-serverside/index.php
diff -u nightlytest-serverside/index.php:1.8 nightlytest-serverside/index.php:1.9
--- nightlytest-serverside/index.php:1.8 Thu Jul 27 16:02:42 2006
+++ nightlytest-serverside/index.php Fri Sep 8 17:47:25 2006
@@ -38,7 +38,7 @@
print "\t\t<td></td>\n";
print "\t</tr>";
-$result = getRecentTests("24",$mysql_link);
+$result = getRecentTests("24");
$line=1;
if(mysql_num_rows($result)==0){
print "\t<tr bgcolor='white'>";
@@ -55,7 +55,7 @@
while($row = mysql_fetch_array($result)){
$cur_machine_id = $row['machine'];
$cur_night_id = $row['id'];
- $cur_machine_row = getMachineInfo($cur_machine_id,$mysql_link);
+ $cur_machine_row = getMachineInfo($cur_machine_id);
if(strcmp($cur_machine_row['nickname'], "")!=0){$machine_name = $cur_machine_row['nickname'];}
else{$machine_name = $cur_machine_row['name'];}
@@ -95,4 +95,4 @@
</tr>
</table>
</body>
-</html>
\ No newline at end of file
+</html>
Index: nightlytest-serverside/individualfilesizegraph.php
diff -u nightlytest-serverside/individualfilesizegraph.php:1.3 nightlytest-serverside/individualfilesizegraph.php:1.4
--- nightlytest-serverside/individualfilesizegraph.php:1.3 Tue Aug 1 19:30:05 2006
+++ nightlytest-serverside/individualfilesizegraph.php Fri Sep 8 17:47:25 2006
@@ -400,7 +400,7 @@
print "\t\t<td>Date</td>\n";
foreach ($files_arr as $m){
print "\t\t<td>$m</td>\n";
- $file_data=get_file_history($mysql_link, $machine_id, $m);
+ $file_data=get_file_history($machine_id, $m);
array_push($all_data, $file_data);
}
print "\t</tr>\n";
Index: nightlytest-serverside/individualgraph.php
diff -u nightlytest-serverside/individualgraph.php:1.2 nightlytest-serverside/individualgraph.php:1.3
--- nightlytest-serverside/individualgraph.php:1.2 Thu Aug 17 22:50:18 2006
+++ nightlytest-serverside/individualgraph.php Fri Sep 8 17:47:25 2006
@@ -392,13 +392,13 @@
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,$start,$end);
}
else if(strcmp($start,"")!=0){
- $history = buildResultsHistory($machine_id, $program,$measure,$mysql_link,$start);
+ $history = buildResultsHistory($machine_id, $program,$measure,$start);
}
else{
- $history = buildResultsHistory($machine_id, $program,$measure,$mysql_link);
+ $history = buildResultsHistory($machine_id, $program,$measure);
}
print "<table border=1 cellspacing=0 cellpadding=6>\n";
Index: nightlytest-serverside/machine.php
diff -u nightlytest-serverside/machine.php:1.5 nightlytest-serverside/machine.php:1.6
--- nightlytest-serverside/machine.php:1.5 Thu Jul 27 14:29:35 2006
+++ nightlytest-serverside/machine.php Fri Sep 8 17:47:25 2006
@@ -18,7 +18,7 @@
$mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
mysql_select_db("nightlytestresults");
-$row = getMachineInfo($machine,$mysql_link);
+$row = getMachineInfo($machine);
$machine_name = $row['name'];
if(strcmp($row['nickname'],"")!=0){
$machine_name=$row['nickname'];
@@ -87,7 +87,7 @@
print "</table>\n<br>\n";
-$result = getNightsResource($machine,$mysql_link);
+$result = getNightsResource($machine);
$recent=mysql_fetch_array($result);
$recent_id=$recent['id'];
$cur_date = $recent['added'];
@@ -97,8 +97,8 @@
include("ProgramResults.php");
if(is_numeric($recent_id) && is_numeric($old_id)){
- $today_results = GetDayResults($recent_id, $category_array, $mysql_link);
- $yesterday_results = GetDayResults($old_id, $category_array, $mysql_link);
+ $today_results = GetDayResults($recent_id, $category_array);
+ $yesterday_results = GetDayResults($old_id, $category_array);
$percent_difference = CalculateChangeBetweenDays($yesterday_results, $today_results);
/* note: $medium_change, $large_change, and $crazy_change are defined in ProgramResult.php */
@@ -179,7 +179,7 @@
echo "</td>";
echo "</tr>";
-$result = getNightsResource($machine,$mysql_link);
+$result = getNightsResource($machine);
$line=1;
$row = mysql_fetch_array($result);
$x=0;
@@ -453,4 +453,4 @@
</table>
</body>
-</html>
\ No newline at end of file
+</html>
Index: nightlytest-serverside/multiplemachinegraph.php
diff -u nightlytest-serverside/multiplemachinegraph.php:1.1.1.1 nightlytest-serverside/multiplemachinegraph.php:1.2
--- nightlytest-serverside/multiplemachinegraph.php:1.1.1.1 Wed Jul 5 15:56:33 2006
+++ nightlytest-serverside/multiplemachinegraph.php Fri Sep 8 17:47:25 2006
@@ -50,8 +50,8 @@
$mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
mysql_select_db("nightlytestresults");
-$row = getMachineInfo($machine_id,$mysql_link);
-$today_row = getNightInfo($night_id,$mysql_link);
+$row = getMachineInfo($machine_id);
+$today_row = getNightInfo($night_id);
$cur_date=$today_row['added'];
?>
@@ -88,4 +88,4 @@
</td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
Index: nightlytest-serverside/multipleresultsgraph.php
diff -u nightlytest-serverside/multipleresultsgraph.php:1.1.1.1 nightlytest-serverside/multipleresultsgraph.php:1.2
--- nightlytest-serverside/multipleresultsgraph.php:1.1.1.1 Wed Jul 5 15:56:33 2006
+++ nightlytest-serverside/multipleresultsgraph.php Fri Sep 8 17:47:25 2006
@@ -55,8 +55,8 @@
$mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
mysql_select_db("nightlytestresults");
-$row = getMachineInfo($machine_id,$mysql_link);
-$today_row = getNightInfo($night_id,$mysql_link);
+$row = getMachineInfo($machine_id);
+$today_row = getNightInfo($night_id);
$cur_date=$today_row['added'];
?>
@@ -99,4 +99,4 @@
</td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
Index: nightlytest-serverside/sidebar.php
diff -u nightlytest-serverside/sidebar.php:1.9 nightlytest-serverside/sidebar.php:1.10
--- nightlytest-serverside/sidebar.php:1.9 Thu Aug 17 22:50:18 2006
+++ nightlytest-serverside/sidebar.php Fri Sep 8 17:47:25 2006
@@ -6,8 +6,8 @@
*
******************************************************/
if(isset($measure_arr) && isset($program_arr)){
- $machine_row=getMachineInfo($machine,$mysql_link);
- $today_row = getNightInfo($night,$mysql_link);
+ $machine_row=getMachineInfo($machine);
+ $today_row = getNightInfo($night);
$cur_date = $today_row['added'];
print "<a href=\"index.php\">Homepage</a><br><br>\n";
@@ -32,7 +32,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");
+ $next_query = getNightsResource($machine,$cur_date,"2020-12-30 01:01:01");
$x=0;
while($x<7 && $x<mysql_affected_rows()-1 && $next = mysql_fetch_array($next_query)){
array_push($next_stack, $next);
@@ -48,7 +48,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 = getNightsResource($machine,"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)){
@@ -71,8 +71,8 @@
*
******************************************************/
else if($machine!=-1 && $night !=-1){
- $machine_row=getMachineInfo($machine,$mysql_link);
- $today_row = getNightInfo($night,$mysql_link);
+ $machine_row=getMachineInfo($machine);
+ $today_row = getNightInfo($night);
$cur_date = $today_row['added'];
print "<a href=\"index.php\">Homepage</a><br><br>\n";
@@ -88,7 +88,7 @@
/********************** Creating list to future and past tests **********************/
$next_stack = array();
- $next_query = getNightsIDs($machine,$mysql_link,$cur_date,"2020-12-30 01:01:01","ASC");
+ $next_query = getNightsIDs($machine,$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 = getNightsIDs($machine,$mysql_link,"2000-01-01 01:01:01","$cur_date");
+ $previous_query = getNightsIDs($machine,"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)){
@@ -116,7 +116,7 @@
print "</ul>\n";
mysql_free_result($previous_query);
- $next_query = getNightsIDs($machine,$mysql_link);
+ $next_query = getNightsIDs($machine);
print "<form method=GET action=\"test.php\">\n";
print "<input type=hidden name=\"machine\" value=\"$machine\">\n";
print "<select name=night>\n";
@@ -146,7 +146,7 @@
print "<a href=\"index.php\">Homepage</a><br><br>\n";
print "Test dates:<br>\n<ul>\n";
$x=0;
- $machine_nights = getNightsResource($machine, $mysql_link);
+ $machine_nights = getNightsResource($machine);
while($x<20 && $temp_row=mysql_fetch_array($machine_nights)){
$date = preg_replace("/\s\d\d:\d\d:\d\d/","",$temp_row['added']);
print "<li><a href=\"test.php?machine=$machine&night={$temp_row['id']}\">$date</a>\n";
@@ -155,7 +155,7 @@
print "</ul>\n";
mysql_free_result($machine_nights);
- $next_query = getNightsResource($machine,$mysql_link);
+ $next_query = getNightsResource($machine);
print "<form method=GET action=\"test.php\">\n";
print "<input type=hidden name=machine value=\"$machine\">\n";
print "<select name=night>\n";
@@ -181,7 +181,7 @@
else{ /*if($machine ==-1 && night ==-1)*/
print "<a href=\"index.php\">Homepage</a><br><br>\n";
- $list_o_machines = getRecentMachineResource($mysql_link);
+ $list_o_machines = getRecentMachineResource();
print "Test Machines With<br> Recent Submissions:<br>\n<ul>\n";
while($temp_row = mysql_fetch_array($list_o_machines)){
if(strcmp($temp_row['nickname'],"")==0){
@@ -195,7 +195,7 @@
mysql_free_result($list_o_machines);
print "<a href='testers.php'>All Test Machines:</a><br>\n<ul>\n";
- $list_o_machines = getMachineResource($mysql_link);
+ $list_o_machines = getMachineResource();
while($temp_row = mysql_fetch_array($list_o_machines)){
if(strcmp($temp_row['nickname'],"")==0){
print "<li><a href=\"machine.php?machine={$temp_row['id']}\">{$temp_row['name']}</a>\n";
Index: nightlytest-serverside/test.php
diff -u nightlytest-serverside/test.php:1.22 nightlytest-serverside/test.php:1.23
--- nightlytest-serverside/test.php:1.22 Fri Sep 8 17:27:47 2006
+++ nightlytest-serverside/test.php Fri Sep 8 17:47:25 2006
@@ -30,11 +30,11 @@
$mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
mysql_select_db("nightlytestresults");
-$row = getMachineInfo($machine_id,$mysql_link);
-$today_row = getNightInfo($night_id,$mysql_link);
+$row = getMachineInfo($machine_id);
+$today_row = getNightInfo($night_id);
$cur_date=$today_row['added'];
-$today_query = getSuccessfulNightsHistory($machine_id,$mysql_link,$night_id);
+$today_query = getSuccessfulNightsHistory($machine_id,$night_id);
$today_row = mysql_fetch_array($today_query);
$yesterday_row = mysql_fetch_array($today_query);
$oldday_row = mysql_fetch_array($today_query);
@@ -445,7 +445,7 @@
print"<h3><u>CVS information:</u></h3><br>\n";
-$row = getNightInfo($night_id,$mysql_link);
+$row = getNightInfo($night_id);
$com_users = $row['cvs_usersadd'];
$co_users = $row['cvs_usersco'];
$com_users = str_replace("\n","<br>",$com_users);
@@ -514,7 +514,7 @@
* Printing file size information
*
******************************************************/
-$all_data=buildFileSizeTable($mysql_link, $machine_id, $night_id);
+$all_data=buildFileSizeTable($machine_id, $night_id);
$num_sig_changes=0;
foreach (array_keys($all_data) as $d){
@@ -613,13 +613,13 @@
*
******************************************************/
-$today_results = GetDayResults($today_row['id'], $category_array, $mysql_link);
+$today_results = GetDayResults($today_row['id'], $category_array);
if(isset($yesterday_row['id'])){
- $yesterday_results = GetDayResults($yesterday_row['id'], $category_array, $mysql_link);
+ $yesterday_results = GetDayResults($yesterday_row['id'], $category_array);
$percent_difference = CalculateChangeBetweenDays($yesterday_results, $today_results, .2);
}
if(isset($oldday_row['id'])){
- $oldday_results = GetDayResults($oldday_row['id'], $category_array, $mysql_link);
+ $oldday_results = GetDayResults($oldday_row['id'], $category_array);
$twoday_difference = CalculateChangeBetweenDays($oldday_results, $today_results, .01);
}
Index: nightlytest-serverside/testers.php
diff -u nightlytest-serverside/testers.php:1.1.1.1 nightlytest-serverside/testers.php:1.2
--- nightlytest-serverside/testers.php:1.1.1.1 Wed Jul 5 15:56:34 2006
+++ nightlytest-serverside/testers.php Fri Sep 8 17:47:25 2006
@@ -42,10 +42,10 @@
print "\t\t<td>Build status of last test</td>\n";
print "\t</tr>\n";
-$result = getMachineResource($mysql_link);
+$result = getMachineResource();
$line=1;
while($row = mysql_fetch_array($result)){
- $query = getNightsResource($row['id'],$mysql_link);
+ $query = getNightsResource($row['id']);
$latest_test = mysql_fetch_array($query);
mysql_free_result($query);
@@ -74,4 +74,4 @@
</td></tr></table>
</body>
-</html>
\ No newline at end of file
+</html>
More information about the llvm-commits
mailing list