зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
dc75e17568
Коммит
ab0841ffba
|
@ -34,11 +34,11 @@ sub debug_print {
|
||||||
$UrlName = $ARGV[0];
|
$UrlName = $ARGV[0];
|
||||||
$logFile = $ARGV[1];
|
$logFile = $ARGV[1];
|
||||||
$NumOfSites = $ARGV[2];
|
$NumOfSites = $ARGV[2];
|
||||||
$buildIDFile = $ARGV[3];
|
$buildRoot = $ARGV[3];
|
||||||
$LinkURL = $ARGV[4];
|
$LinkURL = $ARGV[4];
|
||||||
$useClockTime = $ARGV[5];
|
$useClockTime = $ARGV[5];
|
||||||
$buildIDFile = '< '.$buildIDFile.'\bin\chrome\navigator\locale\en-US\navigator.dtd';
|
$buildIDFile = '< '.$buildRoot.'\bin\chrome\navigator\locale\navigator.dtd';
|
||||||
debug_print( "Arguments:[ $UrlName | $logFile | $NumOfSites | $buildIDFile | $LinkURL | $useClockTime]\n");
|
debug_print( "Arguments:[ $UrlName | $logFile | $NumOfSites | $buildRoot | $LinkURL | $useClockTime]\n");
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Open the ID file and get the build ID
|
# Open the ID file and get the build ID
|
||||||
|
@ -51,8 +51,8 @@ while (<XUL_FILE>)
|
||||||
$ThisLine = $_;
|
$ThisLine = $_;
|
||||||
chop ($ThisLine);
|
chop ($ThisLine);
|
||||||
if (/Build ID/){
|
if (/Build ID/){
|
||||||
@LineList = split (/ /, $ThisLine);
|
@LineList = split (/\"/, $ThisLine);
|
||||||
$BuildNo = $LineList[5];
|
$BuildNo = $LineList[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$BuildNo =~ s/"//g;
|
$BuildNo =~ s/"//g;
|
||||||
|
@ -121,7 +121,7 @@ $Avg_Parse_Time_Percentage = 0;
|
||||||
$Avg_TotalLayout_Time_Percentage = 0;
|
$Avg_TotalLayout_Time_Percentage = 0;
|
||||||
$Num_Entries = 0;
|
$Num_Entries = 0;
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
$WebShell;
|
# $WebShell;
|
||||||
$temp;
|
$temp;
|
||||||
$url;
|
$url;
|
||||||
$Content_Flag = 0;
|
$Content_Flag = 0;
|
||||||
|
@ -237,11 +237,11 @@ while (<LOG_FILE>)
|
||||||
|
|
||||||
if (/Timing layout/)
|
if (/Timing layout/)
|
||||||
{
|
{
|
||||||
@List = split (/webshell: /, $ThisLine);
|
# @List = split (/webshell: /, $ThisLine);
|
||||||
$WebShell = $List[1];
|
# $WebShell = $List[1];
|
||||||
$WebShell = "(webshell=".$WebShell;
|
# $WebShell = "(webBrowserChrome=".$WebShell;
|
||||||
$WebShell = $WebShell."):";
|
# $WebShell = $WebShell."):";
|
||||||
debug_print( "$WebShell\n" );
|
# debug_print( "$WebShell\n" );
|
||||||
|
|
||||||
@List = split (/'/, $ThisLine);
|
@List = split (/'/, $ThisLine);
|
||||||
$url = $List[1];
|
$url = $List[1];
|
||||||
|
@ -259,9 +259,9 @@ while (<LOG_FILE>)
|
||||||
@List = split (/ /, $ThisLine);
|
@List = split (/ /, $ThisLine);
|
||||||
if($useClockTime){
|
if($useClockTime){
|
||||||
@clockTimeList = split(/:/, $List[6]);
|
@clockTimeList = split(/:/, $List[6]);
|
||||||
$Content_Time = $clockTimeList[2];
|
$Content_Time += $clockTimeList[2];
|
||||||
} else {
|
} else {
|
||||||
$Content_Time = $List[9];
|
$Content_Time += $List[9];
|
||||||
}
|
}
|
||||||
$Content_Flag = 1;
|
$Content_Flag = 1;
|
||||||
debug_print( "Content Time: $Content_Time\n" );
|
debug_print( "Content Time: $Content_Time\n" );
|
||||||
|
@ -272,9 +272,9 @@ while (<LOG_FILE>)
|
||||||
@List = split (/ /, $ThisLine);
|
@List = split (/ /, $ThisLine);
|
||||||
if($useClockTime){
|
if($useClockTime){
|
||||||
@clockTimeList = split(/:/, $List[5]);
|
@clockTimeList = split(/:/, $List[5]);
|
||||||
$Reflow_Time = $clockTimeList[2];
|
$Reflow_Time += $clockTimeList[2];
|
||||||
} else {
|
} else {
|
||||||
$Reflow_Time = $List[8];
|
$Reflow_Time += $List[8];
|
||||||
}
|
}
|
||||||
$Reflow_Flag = 1;
|
$Reflow_Flag = 1;
|
||||||
debug_print( "Reflow Time: $Reflow_Time\n" );
|
debug_print( "Reflow Time: $Reflow_Time\n" );
|
||||||
|
@ -285,9 +285,9 @@ while (<LOG_FILE>)
|
||||||
@List = split (/ /, $ThisLine);
|
@List = split (/ /, $ThisLine);
|
||||||
if($useClockTime){
|
if($useClockTime){
|
||||||
@clockTimeList = split(/:/, $List[9]);
|
@clockTimeList = split(/:/, $List[9]);
|
||||||
$FrameAndStyle_Time = $clockTimeList[2];
|
$FrameAndStyle_Time += $clockTimeList[2];
|
||||||
} else {
|
} else {
|
||||||
$FrameAndStyle_Time = $List[12];
|
$FrameAndStyle_Time += $List[12];
|
||||||
}
|
}
|
||||||
debug_print( "Frame and Style Time: $FrameAndStyle_Time\n" );
|
debug_print( "Frame and Style Time: $FrameAndStyle_Time\n" );
|
||||||
}
|
}
|
||||||
|
@ -297,9 +297,9 @@ while (<LOG_FILE>)
|
||||||
@List = split (/ /, $ThisLine);
|
@List = split (/ /, $ThisLine);
|
||||||
if($useClockTime){
|
if($useClockTime){
|
||||||
@clockTimeList = split(/:/, $List[6]);
|
@clockTimeList = split(/:/, $List[6]);
|
||||||
$Style_Time = $clockTimeList[2];
|
$Style_Time += $clockTimeList[2];
|
||||||
} else {
|
} else {
|
||||||
$Style_Time = $List[9];
|
$Style_Time += $List[9];
|
||||||
}
|
}
|
||||||
$Style_Flag = 1;
|
$Style_Flag = 1;
|
||||||
debug_print( "Style Time: $Style_Time\n" );
|
debug_print( "Style Time: $Style_Time\n" );
|
||||||
|
@ -310,9 +310,9 @@ while (<LOG_FILE>)
|
||||||
@List = split (/ /, $ThisLine);
|
@List = split (/ /, $ThisLine);
|
||||||
if($useClockTime){
|
if($useClockTime){
|
||||||
@clockTimeList = split(/:/, $List[5]);
|
@clockTimeList = split(/:/, $List[5]);
|
||||||
$Parse_Time = $clockTimeList[2];
|
$Parse_Time += $clockTimeList[2];
|
||||||
} else {
|
} else {
|
||||||
$Parse_Time = $List[8];
|
$Parse_Time += $List[8];
|
||||||
}
|
}
|
||||||
$Parse_Flag = 1;
|
$Parse_Flag = 1;
|
||||||
debug_print( "Parse Time: $Parse_Time\n" );
|
debug_print( "Parse Time: $Parse_Time\n" );
|
||||||
|
@ -322,7 +322,8 @@ while (<LOG_FILE>)
|
||||||
if ($IsValidURL == 1){
|
if ($IsValidURL == 1){
|
||||||
@List = split (/ /, $ThisLine);
|
@List = split (/ /, $ThisLine);
|
||||||
$temp = $List[6];
|
$temp = $List[6];
|
||||||
if (($temp == $WebShell) &&
|
if (
|
||||||
|
# ($temp == $WebShell) &&
|
||||||
($Parse_Flag == 1) &&
|
($Parse_Flag == 1) &&
|
||||||
($Content_Flag == 1) &&
|
($Content_Flag == 1) &&
|
||||||
($Reflow_Flag == 1) &&
|
($Reflow_Flag == 1) &&
|
||||||
|
|
|
@ -31,8 +31,8 @@ sub debug_print {
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ARGV;
|
@ARGV;
|
||||||
$buildIDFile = $ARGV[0];
|
$buildRoot = $ARGV[0];
|
||||||
$buildIDFile = '< '.$buildIDFile.'\bin\chrome\navigator\locale\en-US\navigator.dtd';
|
$buildIDFile = '< '.$buildRoot.'\bin\chrome\navigator\locale\navigator.dtd';
|
||||||
$PullID = $ARGV[1];
|
$PullID = $ARGV[1];
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
@ -58,7 +58,7 @@ $count = 0;
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get the BuildID
|
# 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 = "";
|
$BuildNo = "";
|
||||||
$LineList;
|
$LineList;
|
||||||
while (<XUL_FILE>)
|
while (<XUL_FILE>)
|
||||||
|
@ -66,10 +66,8 @@ while (<XUL_FILE>)
|
||||||
$ThisLine = $_;
|
$ThisLine = $_;
|
||||||
chop ($ThisLine);
|
chop ($ThisLine);
|
||||||
if (/Build ID/){
|
if (/Build ID/){
|
||||||
@LineList = split (/ /, $ThisLine);
|
@LineList = split (/\"/, $ThisLine);
|
||||||
$BuildNo = $LineList[3];
|
$BuildNo = $LineList[1];
|
||||||
$BuildNo .= " ".$LineList[4];
|
|
||||||
$BuildNo .= " ".$LineList[5];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$BuildNo =~ s/"//g;
|
$BuildNo =~ s/"//g;
|
||||||
|
|
|
@ -35,8 +35,8 @@ sub debug_print {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ARGV;
|
@ARGV;
|
||||||
$buildIDFile = $ARGV[0];
|
$buildRoot = $ARGV[0];
|
||||||
$buildIDFile = '< '.$buildIDFile.'\bin\chrome\navigator\locale\en-US\navigator.dtd';
|
$buildIDFile = '< '.$buildRoot.'\bin\chrome\navigator\locale\navigator.dtd';
|
||||||
$pullDate = $ARGV[1];
|
$pullDate = $ARGV[1];
|
||||||
$useClockTime = $ARGV[2];
|
$useClockTime = $ARGV[2];
|
||||||
|
|
||||||
|
@ -48,10 +48,8 @@ while (<XUL_FILE>)
|
||||||
$ThisLine = $_;
|
$ThisLine = $_;
|
||||||
chop ($ThisLine);
|
chop ($ThisLine);
|
||||||
if (/Build ID/){
|
if (/Build ID/){
|
||||||
@LineList = split (/ /, $ThisLine);
|
@LineList = split (/\"/, $ThisLine);
|
||||||
$BuildNo = $LineList[3];
|
$BuildNo = $LineList[1];
|
||||||
$BuildNo .= " ".$LineList[4];
|
|
||||||
$BuildNo .= " ".$LineList[5];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$BuildNo =~ s/"//g;
|
$BuildNo =~ s/"//g;
|
||||||
|
|
|
@ -49,7 +49,13 @@ while( <Logs\\*.txt> ){
|
||||||
@nameParts = split( /-/, $line );
|
@nameParts = split( /-/, $line );
|
||||||
@nameNoDir = split( /\\/, $nameParts[0] );
|
@nameNoDir = split( /\\/, $nameParts[0] );
|
||||||
print( "Name: $nameNoDir[1]\n" );
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ $clockTimeArg = $ARGV[2];
|
||||||
$profID = $ARGV[3];
|
$profID = $ARGV[3];
|
||||||
$arg=0;
|
$arg=0;
|
||||||
$cmdLineArg[$arg++] = "-f ";
|
$cmdLineArg[$arg++] = "-f ";
|
||||||
$cmdLineArg[$arg++] = "S:\\mozilla\\tools\\performance\\layout\\40-url-dup.txt ";
|
##$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.txt ";
|
||||||
if($UseViewer==0){
|
if($UseViewer==0){
|
||||||
$cmdLineArg[$arg++] = "-ftimeout ";
|
$cmdLineArg[$arg++] = "-ftimeout ";
|
||||||
$cmdLineArg[$arg++] = "10 ";
|
$cmdLineArg[$arg++] = "10 ";
|
||||||
|
@ -109,6 +109,6 @@ system( ("copy", "TrendTable.html", "Tables\\$ID-TrendTable.html") ) == 0 or die
|
||||||
# save off the files
|
# save off the files
|
||||||
system( ("mkdir", "Logs\\$ID") );
|
system( ("mkdir", "Logs\\$ID") );
|
||||||
system( ("copy", "Logs\\*.*", "Logs\\$ID\\*.*") ) == 0 or die "Cannot copy logfiles to Logs\\$ID\\*.*\n";
|
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");
|
print("perf.pl DONE!\n");
|
||||||
|
|
|
@ -42,6 +42,16 @@
|
||||||
# (most likely the index into the tokens will change. Search for SENSITIVE in teh script)
|
# (most likely the index into the tokens will change. Search for SENSITIVE in teh script)
|
||||||
#
|
#
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
sub debug_print {
|
||||||
|
foreach $str (@_){
|
||||||
|
# print( $str );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@ARGV;
|
@ARGV;
|
||||||
$dir="Logs\\";
|
$dir="Logs\\";
|
||||||
$i=0;
|
$i=0;
|
||||||
|
@ -50,6 +60,7 @@ $fileURL=0;
|
||||||
$httpURL=0;
|
$httpURL=0;
|
||||||
$shellID;
|
$shellID;
|
||||||
$infileName = $ARGV[0];
|
$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";
|
open(COMBINEFILE, "< $infileName") or die "Unable to open $infileName\n";
|
||||||
while(<COMBINEFILE>){
|
while(<COMBINEFILE>){
|
||||||
|
@ -59,24 +70,26 @@ while(<COMBINEFILE>){
|
||||||
if($TimingBlockBegun == 0) {
|
if($TimingBlockBegun == 0) {
|
||||||
# look for the start of a new block
|
# look for the start of a new block
|
||||||
if($_ =~ /Timing layout processes on url/){
|
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.
|
# 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 so, we are starting, otherwise it is probably a chrome url so ignore it
|
||||||
if( $_ =~ /url: \'file:/ ){
|
if( $_ =~ /url: \'file:/ ){
|
||||||
#printf( " - file URL\n" );
|
debug_print( " - file URL\n" );
|
||||||
$url = $tokens[6];
|
$url = $tokens[6];
|
||||||
$TimingBlockBegun=1;
|
$TimingBlockBegun=1;
|
||||||
$httpURL=0;
|
$httpURL=0;
|
||||||
$fileURL=1;
|
$fileURL=1;
|
||||||
}
|
}
|
||||||
if( $_ =~ /url: \'http:/ ){
|
if($supportHTTP > 0) {
|
||||||
#printf( "http URL\n" );
|
if( $_ =~ /url: \'http:/ ){
|
||||||
$url = $tokens[6]; ### SENSITIVE to installation path
|
debug_print( "http URL\n" );
|
||||||
$TimingBlockBegun=1;
|
$url = $tokens[6]; ### SENSITIVE to installation path
|
||||||
$fileURL=0;
|
$TimingBlockBegun=1;
|
||||||
$httpURL=1;
|
$fileURL=0;
|
||||||
}
|
$httpURL=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# if we got a valid block then extract the WebShellID
|
# if we got a valid block then extract the WebShellID
|
||||||
# for matching the end-of-block later
|
# for matching the end-of-block later
|
||||||
|
@ -84,7 +97,7 @@ while(<COMBINEFILE>){
|
||||||
chop($url);
|
chop($url);
|
||||||
$shellID = $tokens[8];
|
$shellID = $tokens[8];
|
||||||
chop( $shellID );
|
chop( $shellID );
|
||||||
#print( " - WebShellID: $shellID\n");
|
debug_print( " - WebShellID: $shellID\n");
|
||||||
@urlParts = split(/\//, $url);
|
@urlParts = split(/\//, $url);
|
||||||
if($fileURL > 0){
|
if($fileURL > 0){
|
||||||
$urlName = $urlParts[9]; ### SENSITIVE to installation path
|
$urlName = $urlParts[9]; ### SENSITIVE to installation path
|
||||||
|
@ -106,9 +119,9 @@ while(<COMBINEFILE>){
|
||||||
if( $_ =~ /Layout \+ Page Load/ ){
|
if( $_ =~ /Layout \+ Page Load/ ){
|
||||||
# Match the WebShell ID - if it is a match then our block ended,
|
# Match the WebShell ID - if it is a match then our block ended,
|
||||||
# otherwise it is the end of another block within our block
|
# otherwise it is the end of another block within our block
|
||||||
$webshellID = "\(webshell=".$shellID."\)";
|
$webshellID = "\(webBrowserChrome=".$shellID."\)";
|
||||||
if( $tokens[6] =~ /$webshellID/ ){
|
if( $tokens[6] =~ /$webshellID/ ){
|
||||||
#print( "- WebShellID MATCH: $webshellID $tokens[6]\n" );
|
debug_print( "- WebShellID MATCH: $webshellID $tokens[6]\n" );
|
||||||
$done=1;
|
$done=1;
|
||||||
} else {
|
} else {
|
||||||
$keepLine=0;
|
$keepLine=0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче