1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tools/performance/layout/Header.pl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,150 @@ 1.4 +########################################################################################## 1.5 +# 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +############################################# 1.11 +# User-defined variables 1.12 +# 1.13 +$machineStats = "WinNT 4.0 (sp5), 450 MHz, 128mg RAM"; 1.14 +# 1.15 +############################################# 1.16 + 1.17 +sub debug_print { 1.18 + foreach $str (@_){ 1.19 +# print( $str ); 1.20 + } 1.21 +} 1.22 + 1.23 +@ARGV; 1.24 +#$buildRoot = $ARGV[0]; 1.25 +#$buildIDFile = '< '.$buildRoot.'\bin\chrome\locales\en-US\navigator\locale\navigator.dtd'; 1.26 +$pullDate = $ARGV[1]; 1.27 +$useClockTime = $ARGV[2]; 1.28 + 1.29 +#open (XUL_FILE, $buildIDFile) or die "Unable to open BuildID file $buildIDFile (header.pl)"; 1.30 +#$BuildNo = ""; 1.31 +#$LineList; 1.32 +#while (<XUL_FILE>) 1.33 +#{ 1.34 +# $ThisLine = $_; 1.35 +# chop ($ThisLine); 1.36 +# if (/Build ID/){ 1.37 +# @LineList = split (/\"/, $ThisLine); 1.38 +# $BuildNo = $LineList[1]; 1.39 +# } 1.40 +#} 1.41 +#$BuildNo =~ s/"//g; 1.42 +#$BuildNo =~ s/[>]//g; 1.43 +#close (XUL_FILE); 1.44 +#debug_print ($BuildNo); 1.45 + 1.46 +############################################# 1.47 + 1.48 +($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)=localtime; 1.49 +%weekday= ( 1.50 + "1", "$day", 1.51 + '2', 'Tuesday', 1.52 + '3', 'Wednesday', 1.53 + '4', 'Thursday', 1.54 + '5', 'Friday', 1.55 + '6', 'Saturday', 1.56 + '7', 'Sunday', 1.57 +); 1.58 +$mon += 1; 1.59 +$year += 1900; 1.60 + 1.61 +open (TABLE_FILE, ">table.html"); 1.62 + 1.63 +print (TABLE_FILE "<center><b><font size=+2>Top 40 Sites - File Load Performance Metrics</font></b></center>"); 1.64 +print (TABLE_FILE "<center><b><font size=+2>Seamonkey Win32</font></B></Center>"); 1.65 +print (TABLE_FILE "<BR>"); 1.66 +print (TABLE_FILE "<center><font size=+2 color=maroon>$pullDate</font></center>"); 1.67 +print (TABLE_FILE "<BR><center><b><font size=+1>"); 1.68 +print (TABLE_FILE "$weekday{$wday} "); 1.69 +print (TABLE_FILE "$mon/$mday/$year "); 1.70 +printf (TABLE_FILE "%02d:%02d:%02d", $hour, $min, $sec); 1.71 +print (TABLE_FILE "</font></b></center>"); 1.72 +print (TABLE_FILE "<BR>"); 1.73 +print (TABLE_FILE "<B><CENTER><font size=-1>\n"); 1.74 +print (TABLE_FILE "$machineStats\n"); 1.75 +print (TABLE_FILE "<BR>"); 1.76 +if($useClockTime){ 1.77 + print (TABLE_FILE "Time is reported in Seconds of Clock time"); 1.78 +} else { 1.79 + print (TABLE_FILE "Time is reported in Seconds of CPU time"); 1.80 +} 1.81 +print (TABLE_FILE "</font></CENTER></B>\n"); 1.82 +print (TABLE_FILE "<BR>\n\n"); 1.83 + 1.84 +print (TABLE_FILE "<table BORDER COLS=15 WIDTH='90%' BGCOLOR='#CCFFFF'>"); 1.85 +print (TABLE_FILE "<tr>"); 1.86 +print (TABLE_FILE "<td WIDTH='25%'></td>"); 1.87 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.88 +print (TABLE_FILE "<center><b>Parsing</b></center>"); 1.89 +print (TABLE_FILE "</td>"); 1.90 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.91 +print (TABLE_FILE "<center><b>Content Creation</b></center>"); 1.92 +print (TABLE_FILE "</td>"); 1.93 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.94 +print (TABLE_FILE "<center><b>Frame Creation</b></center>"); 1.95 +print (TABLE_FILE "</td>"); 1.96 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.97 +print (TABLE_FILE "<center><b>Style Resolution</b></center>"); 1.98 +print (TABLE_FILE "</td>"); 1.99 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.100 +print (TABLE_FILE "<center><b>Reflow</b></center>"); 1.101 +print (TABLE_FILE "</td>"); 1.102 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.103 +print (TABLE_FILE "<center><b>Total Layout Time</b></center>"); 1.104 +print (TABLE_FILE "</td>"); 1.105 +print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>"); 1.106 +print (TABLE_FILE "<center><b>Total Page Load Time</b></center>"); 1.107 +print (TABLE_FILE "</td>"); 1.108 +print (TABLE_FILE "</tr>"); 1.109 +print (TABLE_FILE "<tr>"); 1.110 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.111 +print (TABLE_FILE "<center><b>Sites</b></center>"); 1.112 +print (TABLE_FILE "</td>"); 1.113 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.114 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.115 +print (TABLE_FILE "</td>"); 1.116 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.117 +print (TABLE_FILE "<center><b>%</b></center>"); 1.118 +print (TABLE_FILE "</td>"); 1.119 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.120 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.121 +print (TABLE_FILE "</td>"); 1.122 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.123 +print (TABLE_FILE "<center><b>%</b></center>"); 1.124 +print (TABLE_FILE "</td>"); 1.125 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.126 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.127 +print (TABLE_FILE "</td>"); 1.128 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.129 +print (TABLE_FILE "<center><b>%</b></center>"); 1.130 +print (TABLE_FILE "</td>"); 1.131 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.132 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.133 +print (TABLE_FILE "</td>"); 1.134 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.135 +print (TABLE_FILE "<center><b>%</b></center>"); 1.136 +print (TABLE_FILE "</td>"); 1.137 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.138 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.139 +print (TABLE_FILE "</td>"); 1.140 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.141 +print (TABLE_FILE "<center><b>%</b></center>"); 1.142 +print (TABLE_FILE "</td>"); 1.143 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.144 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.145 +print (TABLE_FILE "</td>"); 1.146 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.147 +print (TABLE_FILE "<center><b>%</b></center>"); 1.148 +print (TABLE_FILE "</td>"); 1.149 +print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>"); 1.150 +print (TABLE_FILE "<center><b>Time</b></center>"); 1.151 +print (TABLE_FILE "</td>"); 1.152 +print (TABLE_FILE "</tr>\n\n"); 1.153 +close (TABLE_FILE);