Updated scripts to deal with the changes to the Viewer output and changes to the BuildID file location and format

This commit is contained in:
attinasi%netscape.com 2000-05-11 21:15:43 +00:00
parent a990de1d01
commit b02552b731
6 changed files with 67 additions and 51 deletions

View File

@ -34,11 +34,11 @@ sub debug_print {
$UrlName = $ARGV[0];
$logFile = $ARGV[1];
$NumOfSites = $ARGV[2];
$buildIDFile = $ARGV[3];
$buildRoot = $ARGV[3];
$LinkURL = $ARGV[4];
$useClockTime = $ARGV[5];
$buildIDFile = '< '.$buildIDFile.'\bin\chrome\navigator\locale\en-US\navigator.dtd';
debug_print( "Arguments:[ $UrlName | $logFile | $NumOfSites | $buildIDFile | $LinkURL | $useClockTime]\n");
$buildIDFile = '< '.$buildRoot.'\bin\chrome\navigator\locale\navigator.dtd';
debug_print( "Arguments:[ $UrlName | $logFile | $NumOfSites | $buildRoot | $LinkURL | $useClockTime]\n");
#------------------------------------------------------------------------------
# Open the ID file and get the build ID
@ -51,8 +51,8 @@ while (<XUL_FILE>)
$ThisLine = $_;
chop ($ThisLine);
if (/Build ID/){
@LineList = split (/ /, $ThisLine);
$BuildNo = $LineList[5];
@LineList = split (/\"/, $ThisLine);
$BuildNo = $LineList[1];
}
}
$BuildNo =~ s/"//g;
@ -121,7 +121,7 @@ $Avg_Parse_Time_Percentage = 0;
$Avg_TotalLayout_Time_Percentage = 0;
$Num_Entries = 0;
$valid = 0;
$WebShell;
# $WebShell;
$temp;
$url;
$Content_Flag = 0;
@ -237,11 +237,11 @@ while (<LOG_FILE>)
if (/Timing layout/)
{
@List = split (/webshell: /, $ThisLine);
$WebShell = $List[1];
$WebShell = "(webshell=".$WebShell;
$WebShell = $WebShell."):";
debug_print( "$WebShell\n" );
# @List = split (/webshell: /, $ThisLine);
# $WebShell = $List[1];
# $WebShell = "(webBrowserChrome=".$WebShell;
# $WebShell = $WebShell."):";
# debug_print( "$WebShell\n" );
@List = split (/'/, $ThisLine);
$url = $List[1];
@ -259,9 +259,9 @@ while (<LOG_FILE>)
@List = split (/ /, $ThisLine);
if($useClockTime){
@clockTimeList = split(/:/, $List[6]);
$Content_Time = $clockTimeList[2];
$Content_Time += $clockTimeList[2];
} else {
$Content_Time = $List[9];
$Content_Time += $List[9];
}
$Content_Flag = 1;
debug_print( "Content Time: $Content_Time\n" );
@ -272,9 +272,9 @@ while (<LOG_FILE>)
@List = split (/ /, $ThisLine);
if($useClockTime){
@clockTimeList = split(/:/, $List[5]);
$Reflow_Time = $clockTimeList[2];
$Reflow_Time += $clockTimeList[2];
} else {
$Reflow_Time = $List[8];
$Reflow_Time += $List[8];
}
$Reflow_Flag = 1;
debug_print( "Reflow Time: $Reflow_Time\n" );
@ -285,9 +285,9 @@ while (<LOG_FILE>)
@List = split (/ /, $ThisLine);
if($useClockTime){
@clockTimeList = split(/:/, $List[9]);
$FrameAndStyle_Time = $clockTimeList[2];
$FrameAndStyle_Time += $clockTimeList[2];
} else {
$FrameAndStyle_Time = $List[12];
$FrameAndStyle_Time += $List[12];
}
debug_print( "Frame and Style Time: $FrameAndStyle_Time\n" );
}
@ -297,9 +297,9 @@ while (<LOG_FILE>)
@List = split (/ /, $ThisLine);
if($useClockTime){
@clockTimeList = split(/:/, $List[6]);
$Style_Time = $clockTimeList[2];
$Style_Time += $clockTimeList[2];
} else {
$Style_Time = $List[9];
$Style_Time += $List[9];
}
$Style_Flag = 1;
debug_print( "Style Time: $Style_Time\n" );
@ -310,9 +310,9 @@ while (<LOG_FILE>)
@List = split (/ /, $ThisLine);
if($useClockTime){
@clockTimeList = split(/:/, $List[5]);
$Parse_Time = $clockTimeList[2];
$Parse_Time += $clockTimeList[2];
} else {
$Parse_Time = $List[8];
$Parse_Time += $List[8];
}
$Parse_Flag = 1;
debug_print( "Parse Time: $Parse_Time\n" );
@ -322,7 +322,8 @@ while (<LOG_FILE>)
if ($IsValidURL == 1){
@List = split (/ /, $ThisLine);
$temp = $List[6];
if (($temp == $WebShell) &&
if (
# ($temp == $WebShell) &&
($Parse_Flag == 1) &&
($Content_Flag == 1) &&
($Reflow_Flag == 1) &&

View File

@ -31,8 +31,8 @@ sub debug_print {
#------------------------------------------------------------------------------
@ARGV;
$buildIDFile = $ARGV[0];
$buildIDFile = '< '.$buildIDFile.'\bin\chrome\navigator\locale\en-US\navigator.dtd';
$buildRoot = $ARGV[0];
$buildIDFile = '< '.$buildRoot.'\bin\chrome\navigator\locale\navigator.dtd';
$PullID = $ARGV[1];
#------------------------------------------------------------------------------
@ -58,7 +58,7 @@ $count = 0;
#------------------------------------------------------------------------------
# Get the BuildID
open (XUL_FILE, $buildIDFile) or die "Unable to open BuildID file $buildIDFile (header.pl)";
open (XUL_FILE, $buildIDFile) or die "Unable to open BuildID file $buildIDFile (footer.pl)";
$BuildNo = "";
$LineList;
while (<XUL_FILE>)
@ -66,10 +66,8 @@ while (<XUL_FILE>)
$ThisLine = $_;
chop ($ThisLine);
if (/Build ID/){
@LineList = split (/ /, $ThisLine);
$BuildNo = $LineList[3];
$BuildNo .= " ".$LineList[4];
$BuildNo .= " ".$LineList[5];
@LineList = split (/\"/, $ThisLine);
$BuildNo = $LineList[1];
}
}
$BuildNo =~ s/"//g;

View File

@ -35,8 +35,8 @@ sub debug_print {
}
@ARGV;
$buildIDFile = $ARGV[0];
$buildIDFile = '< '.$buildIDFile.'\bin\chrome\navigator\locale\en-US\navigator.dtd';
$buildRoot = $ARGV[0];
$buildIDFile = '< '.$buildRoot.'\bin\chrome\navigator\locale\navigator.dtd';
$pullDate = $ARGV[1];
$useClockTime = $ARGV[2];
@ -48,10 +48,8 @@ while (<XUL_FILE>)
$ThisLine = $_;
chop ($ThisLine);
if (/Build ID/){
@LineList = split (/ /, $ThisLine);
$BuildNo = $LineList[3];
$BuildNo .= " ".$LineList[4];
$BuildNo .= " ".$LineList[5];
@LineList = split (/\"/, $ThisLine);
$BuildNo = $LineList[1];
}
}
$BuildNo =~ s/"//g;

View File

@ -49,7 +49,13 @@ while( <Logs\\*.txt> ){
@nameParts = split( /-/, $line );
@nameNoDir = split( /\\/, $nameParts[0] );
print( "Name: $nameNoDir[1]\n" );
system( ("perl", "Averagetable2.pl", "$nameNoDir[1]", "$line", "$cnt", "$bldRoot", "$nameNoDir[1]", "$ARGV[2]" ) );
if ($nameNoDir[1] eq "") {
print ("Skipping $line\n");
} else {
system( ("perl", "Averagetable2.pl", "$nameNoDir[1]", "$line", "$cnt", "$bldRoot", "$nameNoDir[1]", "$ARGV[2]" ) );
}
} else {
print ("Skipping file $line\n");
}
}

View File

@ -39,8 +39,8 @@ $clockTimeArg = $ARGV[2];
$profID = $ARGV[3];
$arg=0;
$cmdLineArg[$arg++] = "-f ";
$cmdLineArg[$arg++] = "S:\\mozilla\\tools\\performance\\layout\\40-url-dup.txt ";
#$cmdLineArg[$arg++] = "S:\\mozilla\\tools\\performance\\layout\\40-url.txt ";
##$cmdLineArg[$arg++] = "S:\\mozilla\\tools\\performance\\layout\\40-url-dup.txt ";
$cmdLineArg[$arg++] = "S:\\mozilla\\tools\\performance\\layout\\40-url.txt ";
if($UseViewer==0){
$cmdLineArg[$arg++] = "-ftimeout ";
$cmdLineArg[$arg++] = "10 ";
@ -109,6 +109,6 @@ system( ("copy", "TrendTable.html", "Tables\\$ID-TrendTable.html") ) == 0 or die
# save off the files
system( ("mkdir", "Logs\\$ID") );
system( ("copy", "Logs\\*.*", "Logs\\$ID\\*.*") ) == 0 or die "Cannot copy logfiles to Logs\\$ID\\*.*\n";
system( ("copy", "history.txt", "Logs\\$ID_history.txt") ) == 0 or die "Cannot copy $ID_history.txt to Logs\n";
system( ("copy", "history.txt", "Logs\\$ID-history.txt") ) == 0 or die "Cannot copy $ID_history.txt to Logs\n";
print("perf.pl DONE!\n");

View File

@ -42,6 +42,16 @@
# (most likely the index into the tokens will change. Search for SENSITIVE in teh script)
#
##########################################################################################
#------------------------------------------------------------------------------
sub debug_print {
foreach $str (@_){
# print( $str );
}
}
#------------------------------------------------------------------------------
@ARGV;
$dir="Logs\\";
$i=0;
@ -50,6 +60,7 @@ $fileURL=0;
$httpURL=0;
$shellID;
$infileName = $ARGV[0];
$supportHTTP = 0; # set to 1 if HTTP URLs are to be supported
open(COMBINEFILE, "< $infileName") or die "Unable to open $infileName\n";
while(<COMBINEFILE>){
@ -59,24 +70,26 @@ while(<COMBINEFILE>){
if($TimingBlockBegun == 0) {
# look for the start of a new block
if($_ =~ /Timing layout processes on url/){
#print( "Timing begin candidate: $_ \n" );
debug_print( "Timing begin candidate: $_ \n" );
# see if it is a file or http url.
# If so, we are starting, otherwise it is probably a chrome url so ignore it
if( $_ =~ /url: \'file:/ ){
#printf( " - file URL\n" );
debug_print( " - file URL\n" );
$url = $tokens[6];
$TimingBlockBegun=1;
$httpURL=0;
$fileURL=1;
}
if( $_ =~ /url: \'http:/ ){
#printf( "http URL\n" );
$url = $tokens[6]; ### SENSITIVE to installation path
$TimingBlockBegun=1;
$fileURL=0;
$httpURL=1;
}
if($supportHTTP > 0) {
if( $_ =~ /url: \'http:/ ){
debug_print( "http URL\n" );
$url = $tokens[6]; ### SENSITIVE to installation path
$TimingBlockBegun=1;
$fileURL=0;
$httpURL=1;
}
}
# if we got a valid block then extract the WebShellID
# for matching the end-of-block later
@ -84,7 +97,7 @@ while(<COMBINEFILE>){
chop($url);
$shellID = $tokens[8];
chop( $shellID );
#print( " - WebShellID: $shellID\n");
debug_print( " - WebShellID: $shellID\n");
@urlParts = split(/\//, $url);
if($fileURL > 0){
$urlName = $urlParts[9]; ### SENSITIVE to installation path
@ -106,9 +119,9 @@ while(<COMBINEFILE>){
if( $_ =~ /Layout \+ Page Load/ ){
# Match the WebShell ID - if it is a match then our block ended,
# otherwise it is the end of another block within our block
$webshellID = "\(webshell=".$shellID."\)";
$webshellID = "\(webBrowserChrome=".$shellID."\)";
if( $tokens[6] =~ /$webshellID/ ){
#print( "- WebShellID MATCH: $webshellID $tokens[6]\n" );
debug_print( "- WebShellID MATCH: $webshellID $tokens[6]\n" );
$done=1;
} else {
$keepLine=0;