From 7c9eb9ebabee844524f2ebecbb5aacc83cc5e24f Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 19 Oct 2009 09:19:09 +0000 Subject: [PATCH] NNT: Remove "CVS Stats", this isn't particularly useful and can be better done by the server or user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84480 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/NewNightlyTest.pl | 113 +++------------------------------------- 1 file changed, 8 insertions(+), 105 deletions(-) diff --git a/utils/NewNightlyTest.pl b/utils/NewNightlyTest.pl index 37e22d9b6d8..7453caf27f2 100755 --- a/utils/NewNightlyTest.pl +++ b/utils/NewNightlyTest.pl @@ -155,7 +155,6 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { # List command line options here... if (/^-config$/) { $CONFIG_PATH = "$ARGV[0]"; shift; next; } if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; } - if (/^-nocvsstats$/) { $NOCVSSTATS = 1; next; } if (/^-noremove$/) { $NOREMOVE = 1; next; } if (/^-noremoveatend$/) { $NOREMOVEATEND = 1; next; } if (/^-noremoveresults$/){ $NOREMOVERESULTS = 1; next; } @@ -621,93 +620,6 @@ my $CheckoutTime_User = GetRegex "([0-9.]+)", `grep '^user' $COLog`; my $CheckoutTime_Sys = GetRegex "([0-9.]+)", `grep '^sys' $COLog`; my $CheckoutTime_CPU = $CVSCheckoutTime_User + $CVSCheckoutTime_Sys; -my $NumFilesInCVS = 0; -my $NumDirsInCVS = 0; -$NumFilesInCVS = `egrep '^A' $COLog | wc -l` + 0; -$NumDirsInCVS = `sed -e 's#/[^/]*\$##' $COLog | sort | uniq | wc -l` + 0; - -############################################################## -# -# Extract some information from the CVS history... use a hash so no duplicate -# stuff is stored. This gets the history from the previous days worth -# of cvs activity and parses it. -# -############################################################## - -# This just computes a reasonably accurate #of seconds since 2000. It doesn't -# have to be perfect as its only used for comparing date ranges within a couple -# of days. -sub ConvertToSeconds { - my ($sec, $min, $hour, $day, $mon, $yr) = @_; - my $Result = ($yr - 2000) * 12; - $Result += $mon; - $Result *= 31; - $Result += $day; - $Result *= 24; - $Result += $hour; - $Result *= 60; - $Result += $min; - $Result *= 60; - $Result += $sec; - return $Result; -} - -my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated); - -if (!$NOCVSSTATS) { - if ($VERBOSE) { print "CHANGE HISTORY ANALYSIS STAGE\n"; } - - @SVNHistory = split /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/){ - $Year = $1; $Month = $2; $Day = $3; $Hour = $4; $Min = $5; $Sec = $6; - } - my $Then = ConvertToSeconds($Sec, $Min, $Hour, $Day, $Month, $Year); - # Get the current date and compute when "yesterday" is. - my ($NSec, $NMin, $NHour, $NDay, $NMon, $NYear) = gmtime(); - my $Now = ConvertToSeconds( $NSec, $NMin, $NHour, $NDay, $NMon, $NYear); - if (($Now - 24*60*60) > $Then) { - next; - } - if ($Lines[1] =~ / revision="([0-9]*)">/) { - $Revision = $1; - } - if ($Lines[2] =~ /([^<]*)<\/author>/) { - $Author = $1; - } - $UsersCommitted{$Author} = 1; - $Date = $Year . "-" . $Month . "-" . $Day; - $Time = $Hour . ":" . $Min . ":" . $Sec; - print "Rev: $Revision, Author: $Author, Date: $Date, Time: $Time\n"; - for ($i = 6; $i < $#Lines; $i += 2 ) { - if ($Lines[$i] =~ /^ action="(.)">([^<]*) $BuildWallTime, 'buildtime_cpu' => $BuildTime, 'warnings' => $WarningsFile, - 'cvsusercommitlist' => $UserCommitList, - 'cvsuserupdatelist' => $UserUpdateList, - 'cvsaddedfiles' => $CVSAddedFiles, - 'cvsmodifiedfiles' => $CVSModifiedFiles, - 'cvsremovedfiles' => $CVSRemovedFiles, - 'lines_of_code' => $LOC, - 'cvs_file_count' => $NumFilesInCVS, - 'cvs_dir_count' => $NumDirsInCVS, + 'cvsusercommitlist' => "", + 'cvsuserupdatelist' => "", + 'cvsaddedfiles' => "", + 'cvsmodifiedfiles' => "", + 'cvsremovedfiles' => "", + 'lines_of_code' => "", + 'cvs_file_count' => 0, + 'cvs_dir_count' => 0, 'buildstatus' => $BuildStatus, 'singlesource_programstable' => $SingleSourceProgramsTable, 'multisource_programstable' => $MultiSourceProgramsTable,