[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi
Patrick Jenkins
pjenkins at apple.com
Thu Aug 10 11:26:27 PDT 2006
Changes in directory nightlytest-serverside:
NightlyTestAccept.cgi updated: 1.41 -> 1.42
---
Log message:
The nightly test results emails sent to the testresults email list should now contain a list of tests with significant changes.
---
Diffs of the changes: (+85 -1)
NightlyTestAccept.cgi | 86 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 85 insertions(+), 1 deletion(-)
Index: nightlytest-serverside/NightlyTestAccept.cgi
diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.41 nightlytest-serverside/NightlyTestAccept.cgi:1.42
--- nightlytest-serverside/NightlyTestAccept.cgi:1.41 Fri Aug 4 12:33:24 2006
+++ nightlytest-serverside/NightlyTestAccept.cgi Thu Aug 10 13:26:13 2006
@@ -664,7 +664,7 @@
################################################################################
#
-# Adding lines of code
+# Adding lines of code to the database
#
################################################################################
UpdateCodeInfo $db_date, $loc, $filesincvs, $dirsincvs;
@@ -678,6 +678,82 @@
################################################################################
#
+# building hash of arrays of signifigant changes to place into the nightly
+# test results email. This is ugly code and is somewhat of a hack. However, it
+# adds very useful information to the nightly test email.
+#
+################################################################################
+$query = "select id from night where id<$night_id and machine=$machine_id order by id desc";
+my $g = $dbh->prepare($query);
+$g->execute;
+$row = $g->fetchrow_hashref;
+$prev_night=$row->{'id'};
+
+$query = "select * from program where night=$night_id";
+my $e = $dbh->prepare($query);
+$e->execute;
+%prog_hash_new=();
+while ($row=$e->fetchrow_hashref){
+ $prog_hash_new{"$row->{'program'}"}=$row->{'result'};
+}
+
+$query = "select * from program where night=$prev_night";
+my $f = $dbh->prepare($query);
+$f->execute;
+%prog_hash_old=();
+while ($row=$f->fetchrow_hashref){
+ $prog_hash_old{"$row->{'program'}"}=$row->{'result'};
+}
+
+%output_big_changes=();
+foreach my $prog(keys(%prog_hash_new)){
+ #get data from server
+ my @vals_new = split(",", $prog_hash_new{"$prog"});
+ my @vals_old = split(",", $prog_hash_old{'$prog'});
+
+ #get list of values measured from newest test
+ my @measures={};
+ foreach my $x(@vals_new){
+ $x =~ s/\,//g;
+ $x =~ s/\.//g;
+ $x =~ s/\://g;
+ $x =~ s/\d//g;
+ $x =~ s/\-//g;
+ $x =~ s/ //g;
+ if($x !~ m/\//){
+ push @measures, $x;
+ }
+ }
+
+ #put measures into hash of arrays
+ foreach my $x(@measures){
+ $prog_hash_new{"$prog"} =~ m/$x:.*?(\d*\.*\d+)/;
+ my $value_new = $1;
+ $value_old=0;
+ if(exists $prog_hash_old{"$prog"}){
+ $prog_hash_old{"$prog"} =~ m/$x:.*?(\d*\.*\d+)/;
+ $value_old = $1;
+ }
+ my $diff = ($value_old - $value_new);
+ my $perc=0;
+ if( $value_old!=0 && ($diff > .2 || $diff < -.2) ){
+ $perc=($diff/$value_old) * 100;
+ }
+ if($perc > 5 || $perc < -5){
+ if( ! exists $output_big_changes{"$x"} ){
+ my $rounded_perc = sprintf("%1.2f", $perc);
+ $output_big_changes{"$x"}[0]="$prog ($x) changed \%$rounded_perc ($value_old => $value_new)\n";
+ }
+ else{
+ my $rounded_perc = sprintf("%1.2f", $perc);
+ push(@{ $output_big_changes{"$x"} },"$prog ($x) changed \%$rounded_perc ($value_old => $value_new)\n");
+ } #end else
+ }# end if $perc is acceptable
+ }# end foreach measure taken
+} #end for each program we have measurements for
+
+################################################################################
+#
# Sending email to nightly test email archive
#
################################################################################
@@ -712,6 +788,14 @@
$removed_tests = "None";
}
$email .= "\nRemoved Tests: $removed_tests\n";
+
+ print "\nSignificant changes in test results:\n";
+ foreach my $meas(keys(%output_big_changes)){
+ print "$meas:\n";
+ foreach my $x(@{ $output_big_changes{$meas} } ){
+ print "--- $x";
+ }
+ }
}
else{
$temp_date = $db_date;
More information about the llvm-commits
mailing list