Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 ##########################################################################################
2 #
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 #############################################
8 # User-defined variables
9 #
10 $machineStats = "WinNT 4.0 (sp5), 450 MHz, 128mg RAM";
11 #
12 #############################################
14 sub debug_print {
15 foreach $str (@_){
16 # print( $str );
17 }
18 }
20 @ARGV;
21 #$buildRoot = $ARGV[0];
22 #$buildIDFile = '< '.$buildRoot.'\bin\chrome\locales\en-US\navigator\locale\navigator.dtd';
23 $pullDate = $ARGV[1];
24 $useClockTime = $ARGV[2];
26 #open (XUL_FILE, $buildIDFile) or die "Unable to open BuildID file $buildIDFile (header.pl)";
27 #$BuildNo = "";
28 #$LineList;
29 #while (<XUL_FILE>)
30 #{
31 # $ThisLine = $_;
32 # chop ($ThisLine);
33 # if (/Build ID/){
34 # @LineList = split (/\"/, $ThisLine);
35 # $BuildNo = $LineList[1];
36 # }
37 #}
38 #$BuildNo =~ s/"//g;
39 #$BuildNo =~ s/[>]//g;
40 #close (XUL_FILE);
41 #debug_print ($BuildNo);
43 #############################################
45 ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)=localtime;
46 %weekday= (
47 "1", "$day",
48 '2', 'Tuesday',
49 '3', 'Wednesday',
50 '4', 'Thursday',
51 '5', 'Friday',
52 '6', 'Saturday',
53 '7', 'Sunday',
54 );
55 $mon += 1;
56 $year += 1900;
58 open (TABLE_FILE, ">table.html");
60 print (TABLE_FILE "<center><b><font size=+2>Top 40 Sites - File Load Performance Metrics</font></b></center>");
61 print (TABLE_FILE "<center><b><font size=+2>Seamonkey Win32</font></B></Center>");
62 print (TABLE_FILE "<BR>");
63 print (TABLE_FILE "<center><font size=+2 color=maroon>$pullDate</font></center>");
64 print (TABLE_FILE "<BR><center><b><font size=+1>");
65 print (TABLE_FILE "$weekday{$wday} ");
66 print (TABLE_FILE "$mon/$mday/$year ");
67 printf (TABLE_FILE "%02d:%02d:%02d", $hour, $min, $sec);
68 print (TABLE_FILE "</font></b></center>");
69 print (TABLE_FILE "<BR>");
70 print (TABLE_FILE "<B><CENTER><font size=-1>\n");
71 print (TABLE_FILE "$machineStats\n");
72 print (TABLE_FILE "<BR>");
73 if($useClockTime){
74 print (TABLE_FILE "Time is reported in Seconds of Clock time");
75 } else {
76 print (TABLE_FILE "Time is reported in Seconds of CPU time");
77 }
78 print (TABLE_FILE "</font></CENTER></B>\n");
79 print (TABLE_FILE "<BR>\n\n");
81 print (TABLE_FILE "<table BORDER COLS=15 WIDTH='90%' BGCOLOR='#CCFFFF'>");
82 print (TABLE_FILE "<tr>");
83 print (TABLE_FILE "<td WIDTH='25%'></td>");
84 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
85 print (TABLE_FILE "<center><b>Parsing</b></center>");
86 print (TABLE_FILE "</td>");
87 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
88 print (TABLE_FILE "<center><b>Content Creation</b></center>");
89 print (TABLE_FILE "</td>");
90 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
91 print (TABLE_FILE "<center><b>Frame Creation</b></center>");
92 print (TABLE_FILE "</td>");
93 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
94 print (TABLE_FILE "<center><b>Style Resolution</b></center>");
95 print (TABLE_FILE "</td>");
96 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
97 print (TABLE_FILE "<center><b>Reflow</b></center>");
98 print (TABLE_FILE "</td>");
99 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
100 print (TABLE_FILE "<center><b>Total Layout Time</b></center>");
101 print (TABLE_FILE "</td>");
102 print (TABLE_FILE "<td COLSPAN='2' BGCOLOR='#CCFFFF'>");
103 print (TABLE_FILE "<center><b>Total Page Load Time</b></center>");
104 print (TABLE_FILE "</td>");
105 print (TABLE_FILE "</tr>");
106 print (TABLE_FILE "<tr>");
107 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
108 print (TABLE_FILE "<center><b>Sites</b></center>");
109 print (TABLE_FILE "</td>");
110 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
111 print (TABLE_FILE "<center><b>Time</b></center>");
112 print (TABLE_FILE "</td>");
113 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
114 print (TABLE_FILE "<center><b>%</b></center>");
115 print (TABLE_FILE "</td>");
116 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
117 print (TABLE_FILE "<center><b>Time</b></center>");
118 print (TABLE_FILE "</td>");
119 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
120 print (TABLE_FILE "<center><b>%</b></center>");
121 print (TABLE_FILE "</td>");
122 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
123 print (TABLE_FILE "<center><b>Time</b></center>");
124 print (TABLE_FILE "</td>");
125 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
126 print (TABLE_FILE "<center><b>%</b></center>");
127 print (TABLE_FILE "</td>");
128 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
129 print (TABLE_FILE "<center><b>Time</b></center>");
130 print (TABLE_FILE "</td>");
131 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
132 print (TABLE_FILE "<center><b>%</b></center>");
133 print (TABLE_FILE "</td>");
134 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
135 print (TABLE_FILE "<center><b>Time</b></center>");
136 print (TABLE_FILE "</td>");
137 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
138 print (TABLE_FILE "<center><b>%</b></center>");
139 print (TABLE_FILE "</td>");
140 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
141 print (TABLE_FILE "<center><b>Time</b></center>");
142 print (TABLE_FILE "</td>");
143 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
144 print (TABLE_FILE "<center><b>%</b></center>");
145 print (TABLE_FILE "</td>");
146 print (TABLE_FILE "<td COLSPAN='1' WIDTH='25%' BGCOLOR='#CCFFFF'>");
147 print (TABLE_FILE "<center><b>Time</b></center>");
148 print (TABLE_FILE "</td>");
149 print (TABLE_FILE "</tr>\n\n");
150 close (TABLE_FILE);