tools/performance/layout/Averagetable2.pl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 ##########################################################################################
michael@0 2 #
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 #------------------------------------------------------------------------------
michael@0 8 sub debug_print {
michael@0 9 foreach $str (@_){
michael@0 10 # print( $str );
michael@0 11 }
michael@0 12 }
michael@0 13 #------------------------------------------------------------------------------
michael@0 14 # get the arguments:
michael@0 15 #------------------------------------------------------------------------------
michael@0 16 @ARGV;
michael@0 17 $UrlName = $ARGV[0];
michael@0 18 $logFile = $ARGV[1];
michael@0 19 $NumOfSites = $ARGV[2];
michael@0 20 $buildRoot = $ARGV[3];
michael@0 21 $LinkURL = $ARGV[4];
michael@0 22 $useClockTime = $ARGV[5];
michael@0 23 #$buildIDFile = '< '.$buildRoot.'\bin\chrome\locales\en-US\navigator\locale\navigator.dtd';
michael@0 24 #$buildIDFile = "";
michael@0 25 debug_print( "Arguments:[ $UrlName | $logFile | $NumOfSites | $buildRoot | $LinkURL | $useClockTime]\n");
michael@0 26
michael@0 27 #------------------------------------------------------------------------------
michael@0 28 # Open the ID file and get the build ID
michael@0 29 #------------------------------------------------------------------------------
michael@0 30
michael@0 31 #open (XUL_FILE, $buildIDFile) or die "Cannot open BuildID file $buildIDFile (AverageTable2.pl)\n";
michael@0 32 #$BuildNo = "";
michael@0 33 #$LineList;
michael@0 34 #while (<XUL_FILE>)
michael@0 35 #{
michael@0 36 # $ThisLine = $_;
michael@0 37 # chop ($ThisLine);
michael@0 38 # if (/Build ID/){
michael@0 39 # @LineList = split (/\"/, $ThisLine);
michael@0 40 # $BuildNo = $LineList[1];
michael@0 41 # }
michael@0 42 #}
michael@0 43 #@LineList = split (/ /, $BuildNo);
michael@0 44 #$BuildNo = $LineList[2];
michael@0 45 #$BuildNo =~ s/"//g;
michael@0 46 #$BuildNo =~ s/[>]//g;
michael@0 47 #debug_print ("Build Number: $BuildNo\n");
michael@0 48 #close( XUL_FILE );
michael@0 49
michael@0 50 #------------------------------------------------------------------------------
michael@0 51 # Open the logfile (input)
michael@0 52 # and the deviation file (output,append)
michael@0 53 #------------------------------------------------------------------------------
michael@0 54 open (LOG_FILE, "< $logFile") or die "Logfile $logFile could not be opened";
michael@0 55
michael@0 56 #------------------------------------------------------------------------------
michael@0 57 # Deviation file:
michael@0 58 # Flat file used to calculate and display deviation between latest and
michael@0 59 # week old builds data.
michael@0 60 #
michael@0 61 # Format of flat file is attributes separated by commas with no spaces as follows:
michael@0 62 # BuildNo,date,url,parsingtime,parsingper,contenttime,contentper,frametime,
michael@0 63 # frameper,styletime,styleper,reflowtime,reflowper,totallayouttime,totallayoutper,
michael@0 64 # totalpageloadtime
michael@0 65 ($Second, $Minute, $Hour, $DayOfMonth, $Month, $Year, $WeekDay, $DayOfYear, $IsDST) = localtime (time);
michael@0 66 $RealMonth = $Month + 1;
michael@0 67 $Year += 1900;
michael@0 68 $BuildNo = $RealMonth.$DayOfMonth.$Year;
michael@0 69 $file = $BuildNo.".dat";
michael@0 70 open (DEVIATION, ">> $file") or die "Deviation file could not be opened";
michael@0 71
michael@0 72 # add entry to the deviation file
michael@0 73 ($Second, $Minute, $Hour, $DayOfMonth, $Month, $Year, $WeekDay, $DayOfYear, $IsDST) = localtime (time);
michael@0 74 $RealMonth = $Month + 1;
michael@0 75 $Year += 1900;
michael@0 76 $date2 = $RealMonth.$DayOfMonth.$Year;
michael@0 77 print (DEVIATION "$BuildNo,$date2,$UrlName,");
michael@0 78
michael@0 79 #------------------------------------------------------------------------------
michael@0 80 # local variables
michael@0 81 #------------------------------------------------------------------------------
michael@0 82 @List;
michael@0 83 $Content_Time = 0;
michael@0 84 $Reflow_Time = 0;
michael@0 85 $FrameAndStyle_Time = 0;
michael@0 86 $Frame_Time = 0;
michael@0 87 $Style_Time = 0;
michael@0 88 $Parse_Time = 0;
michael@0 89 $TotalPageLoad_Time = 0;
michael@0 90 $TotalLayout_Time = 0;
michael@0 91 $Avg_Content_Time = 0;
michael@0 92 $Avg_Reflow_Time = 0;
michael@0 93 $Avg_FrameAndStyle_Time = 0;
michael@0 94 $Avg_Frame_Time = 0;
michael@0 95 $Avg_Style_Time = 0;
michael@0 96 $Avg_Parse_Time = 0;
michael@0 97 $Avg_TotalPageLoad_Time = 0;
michael@0 98 $Avg_TotalLayout_Time = 0;
michael@0 99 $Content_Time_Percentage = 0;
michael@0 100 $Reflow_Time_Percentage = 0;
michael@0 101 $FrameAndStyle_Time_Percentage = 0;
michael@0 102 $Frame_Time_Percentage = 0;
michael@0 103 $Style_Time_Percentage = 0;
michael@0 104 $Parse_Time_Percentage = 0;
michael@0 105 $TotalLayout_Time_Percentage = 0;
michael@0 106 $Avg_Content_Time_Percentage = 0;
michael@0 107 $Avg_Reflow_Time_Percentage = 0;
michael@0 108 $Avg_FrameAndStyle_Time_Percentage = 0;
michael@0 109 $Avg_Frame_Time_Percentage = 0;
michael@0 110 $Avg_Style_Time_Percentage = 0;
michael@0 111 $Avg_Parse_Time_Percentage = 0;
michael@0 112 $Avg_TotalLayout_Time_Percentage = 0;
michael@0 113 $Num_Entries = 0;
michael@0 114 $valid = 0;
michael@0 115 # $WebShell;
michael@0 116 $temp;
michael@0 117 $url;
michael@0 118 $Content_Flag = 0;
michael@0 119 $Reflow_Flag = 0;
michael@0 120 $Style_Flag = 0;
michael@0 121 $Parse_Flag = 0;
michael@0 122
michael@0 123 #------------------------------------------------------------------------------
michael@0 124 # Management of averages via average.txt file
michael@0 125 # NOTE: the averag.txt file is used to accumulate all performance times
michael@0 126 # and keep track of the number of entries. When completed, the footer.pl
michael@0 127 # script does the averaging by dividing the accumulated times by the
michael@0 128 # number of entries
michael@0 129 #------------------------------------------------------------------------------
michael@0 130
michael@0 131 # if first site, delete any old Average file (in case the caller did not)
michael@0 132 #
michael@0 133 if ( $NumOfSites == 1 ){
michael@0 134 unlink( "Average.txt" );
michael@0 135 debug_print( "Deleting file Average.txt\n" );
michael@0 136 }
michael@0 137 # load the averages data so we can accumulate it
michael@0 138 #
michael@0 139 if ( -r "Average.txt" ) {
michael@0 140 open (AVERAGE, "< Average.txt");
michael@0 141 while( <AVERAGE> ){
michael@0 142 $ThisLine = $_;
michael@0 143 chop ($ThisLine);
michael@0 144
michael@0 145 if( /Num Entries:/ ){
michael@0 146 @list = split( / /, $ThisLine );
michael@0 147 $Num_Entries = $list[2];
michael@0 148 debug_print( "Num Entries: $Num_Entries\n" );
michael@0 149 }
michael@0 150 if( /Avg Parse:/ ){
michael@0 151 @list = split( / /, $ThisLine );
michael@0 152 $Avg_Parse_Time = $list[2];
michael@0 153 debug_print( "Avg Parse: $Avg_Parse_Time\n" );
michael@0 154 }
michael@0 155 if( /Per Parse:/ ){
michael@0 156 @list = split( / /, $ThisLine );
michael@0 157 $Avg_Parse_Time_Percentage = $list[2];
michael@0 158 debug_print( "Per Parse: $Avg_Parse_Time_Percentage\n" );
michael@0 159 }
michael@0 160 if( /Avg Content:/ ){
michael@0 161 @list = split( / /, $ThisLine );
michael@0 162 $Avg_Content_Time = $list[2];
michael@0 163 debug_print( "Avg Content: $Avg_Content_Time\n" );
michael@0 164 }
michael@0 165 if( /Per Content:/ ){
michael@0 166 @list = split( / /, $ThisLine );
michael@0 167 $Avg_Content_Time_Percentage = $list[2];
michael@0 168 debug_print( "Per Content: $Avg_Content_Time_Percentage\n" );
michael@0 169 }
michael@0 170 if( /Avg Frame:/ ){
michael@0 171 @list = split( / /, $ThisLine );
michael@0 172 $Avg_Frame_Time = $list[2];
michael@0 173 debug_print( "Avg Frame: $Avg_Frame_Time\n" );
michael@0 174 }
michael@0 175 if( /Per Frame:/ ){
michael@0 176 @list = split( / /, $ThisLine );
michael@0 177 $Avg_Frame_Time_Percentage = $list[2];
michael@0 178 debug_print( "Per Frame: $Avg_Frame_Time_Percentage\n" );
michael@0 179 }
michael@0 180 if( /Avg Style:/ ){
michael@0 181 @list = split( / /, $ThisLine );
michael@0 182 $Avg_Style_Time = $list[2];
michael@0 183 debug_print( "Avg Style: $Avg_Style_Time\n" );
michael@0 184 }
michael@0 185 if( /Per Style:/ ){
michael@0 186 @list = split( / /, $ThisLine );
michael@0 187 $Avg_Style_Time_Percentage = $list[2];
michael@0 188 debug_print( "Per Style: $Avg_Style_Time_Percentage\n" );
michael@0 189 }
michael@0 190 if( /Avg Reflow:/ ){
michael@0 191 @list = split( / /, $ThisLine );
michael@0 192 $Avg_Reflow_Time = $list[2];
michael@0 193 debug_print( "Avg Reflow: $Avg_Reflow_Time\n" );
michael@0 194 }
michael@0 195 if( /Per Reflow:/ ){
michael@0 196 @list = split( / /, $ThisLine );
michael@0 197 $Avg_Reflow_Time_Percentage = $list[2];
michael@0 198 debug_print( "Per Reflow: $Avg_Reflow_Time_Percentage\n" );
michael@0 199 }
michael@0 200 if( /Avg TotalLayout:/ ){
michael@0 201 @list = split( / /, $ThisLine );
michael@0 202 $Avg_TotalLayout_Time = $list[2];
michael@0 203 debug_print( "Avg TotalLayout: $Avg_TotalLayout_Time\n" );
michael@0 204 }
michael@0 205 if( /Per Layout:/ ){
michael@0 206 @list = split( / /, $ThisLine );
michael@0 207 $Avg_TotalLayout_Time_Percentage = $list[2];
michael@0 208 debug_print( "Per Layout: $Avg_TotalLayout_Time_Percentage\n" );
michael@0 209 }
michael@0 210 if( /Avg PageLoad:/ ){
michael@0 211 @list = split( / /, $ThisLine );
michael@0 212 $Avg_TotalPageLoad_Time = $list[2];
michael@0 213 debug_print( "Avg PageLoad: $Avg_TotalPageLoad_Time\n" );
michael@0 214 }
michael@0 215 }
michael@0 216 print (AVERAGE "Avg PageLoad: $Avg_TotalPageLoad_Time\n");
michael@0 217 close (AVERAGE);
michael@0 218 }
michael@0 219
michael@0 220 #------------------------------------------------------------------------------
michael@0 221 # now run through the log file and process the performance data
michael@0 222 #------------------------------------------------------------------------------
michael@0 223 $IsValidURL = 0;
michael@0 224 while (<LOG_FILE>)
michael@0 225 {
michael@0 226 $ThisLine = $_;
michael@0 227 chop ($ThisLine);
michael@0 228
michael@0 229 if (/Timing layout/)
michael@0 230 {
michael@0 231 # @List = split (/webshell: /, $ThisLine);
michael@0 232 # $WebShell = $List[1];
michael@0 233 # $WebShell = "(webBrowserChrome=".$WebShell;
michael@0 234 # $WebShell = $WebShell."):";
michael@0 235 # debug_print( "$WebShell\n" );
michael@0 236
michael@0 237 @List = split (/'/, $ThisLine);
michael@0 238 $url = $List[1];
michael@0 239 debug_print( "(URI: $url) " );
michael@0 240 if( $url =~ /$LinkURL/ ){
michael@0 241 debug_print( "$url is the one!\n" );
michael@0 242 $IsValidURL = 1;
michael@0 243 } else {
michael@0 244 debug_print( "Skipping URL $url\n" );
michael@0 245 $IsValidURL = 0;
michael@0 246 }
michael@0 247 }
michael@0 248 if (/Content/){
michael@0 249 if ($IsValidURL == 1){
michael@0 250 @List = split (/ /, $ThisLine);
michael@0 251 if($useClockTime){
michael@0 252 @clockTimeList = split(/:/, $List[6]);
michael@0 253 $Content_Time += $clockTimeList[2];
michael@0 254 } else {
michael@0 255 $Content_Time += $List[9];
michael@0 256 }
michael@0 257 $Content_Flag = 1;
michael@0 258 debug_print( "Content Time: $Content_Time\n" );
michael@0 259 }
michael@0 260 }
michael@0 261 if (/Reflow/){
michael@0 262 if ($IsValidURL == 1){
michael@0 263 @List = split (/ /, $ThisLine);
michael@0 264 if($useClockTime){
michael@0 265 @clockTimeList = split(/:/, $List[5]);
michael@0 266 $Reflow_Time += $clockTimeList[2];
michael@0 267 } else {
michael@0 268 $Reflow_Time += $List[8];
michael@0 269 }
michael@0 270 $Reflow_Flag = 1;
michael@0 271 debug_print( "Reflow Time: $Reflow_Time\n" );
michael@0 272 }
michael@0 273 }
michael@0 274 if (/Frame construction plus/){
michael@0 275 if ($IsValidURL == 1){
michael@0 276 @List = split (/ /, $ThisLine);
michael@0 277 if($useClockTime){
michael@0 278 @clockTimeList = split(/:/, $List[9]);
michael@0 279 $FrameAndStyle_Time += $clockTimeList[2];
michael@0 280 } else {
michael@0 281 $FrameAndStyle_Time += $List[12];
michael@0 282 }
michael@0 283 debug_print( "Frame and Style Time: $FrameAndStyle_Time\n" );
michael@0 284 }
michael@0 285 }
michael@0 286 if (/Style/){
michael@0 287 if ($IsValidURL == 1){
michael@0 288 @List = split (/ /, $ThisLine);
michael@0 289 if($useClockTime){
michael@0 290 @clockTimeList = split(/:/, $List[6]);
michael@0 291 $Style_Time += $clockTimeList[2];
michael@0 292 } else {
michael@0 293 $Style_Time += $List[9];
michael@0 294 }
michael@0 295 $Style_Flag = 1;
michael@0 296 debug_print( "Style Time: $Style_Time\n" );
michael@0 297 }
michael@0 298 }
michael@0 299 if (/Parse/){
michael@0 300 if ($IsValidURL == 1){
michael@0 301 @List = split (/ /, $ThisLine);
michael@0 302 if($useClockTime){
michael@0 303 @clockTimeList = split(/:/, $List[5]);
michael@0 304 $Parse_Time += $clockTimeList[2];
michael@0 305 } else {
michael@0 306 $Parse_Time += $List[8];
michael@0 307 }
michael@0 308 $Parse_Flag = 1;
michael@0 309 debug_print( "Parse Time: $Parse_Time\n" );
michael@0 310 }
michael@0 311 }
michael@0 312 if (/Total/){
michael@0 313 if ($IsValidURL == 1){
michael@0 314 @List = split (/ /, $ThisLine);
michael@0 315 $temp = $List[6];
michael@0 316 if (
michael@0 317 # ($temp == $WebShell) &&
michael@0 318 ($Parse_Flag == 1) &&
michael@0 319 ($Content_Flag == 1) &&
michael@0 320 ($Reflow_Flag == 1) &&
michael@0 321 ($Style_Flag == 1)){
michael@0 322 $TotalPageLoad_Time = $List[12];
michael@0 323 debug_print( "Total Page Load_Time Time: $TotalPageLoad_Time\n" );
michael@0 324 $Content_Flag = 0;
michael@0 325 $Reflow_Flag = 0;
michael@0 326 $Style_Flag = 0;
michael@0 327 $Parse_Flag = 0;
michael@0 328 }
michael@0 329 }
michael@0 330 }
michael@0 331 }
michael@0 332
michael@0 333 #------------------------------------------------------------------------------
michael@0 334 # Calculate the significant time values
michael@0 335 #------------------------------------------------------------------------------
michael@0 336 $Frame_Time = $FrameAndStyle_Time - $Style_Time;
michael@0 337 if($Frame_Time < 0.0){
michael@0 338 print( "\n***** ERROR: negative FrameTime *****\n");
michael@0 339 $Frame_Time = 0;
michael@0 340 }
michael@0 341 $TotalLayout_Time = $Content_Time + $Reflow_Time + $Frame_Time + $Style_Time + $Parse_Time;
michael@0 342 $Avg_Time = $Avg_Time + $TotalLayoutTime + $TotalPageLoad_Time;
michael@0 343
michael@0 344 if( $TotalLayout_Time > 0 ){
michael@0 345 if ($Content_Time != 0)
michael@0 346 {
michael@0 347 $Content_Time_Percentage = ($Content_Time / $TotalLayout_Time) * 100;
michael@0 348 }
michael@0 349 if ($Reflow_Time != 0)
michael@0 350 {
michael@0 351 $Reflow_Time_Percentage = ($Reflow_Time / $TotalLayout_Time) * 100;
michael@0 352 }
michael@0 353 if ($Frame_Time != 0)
michael@0 354 {
michael@0 355 $Frame_Time_Percentage = ($Frame_Time / $TotalLayout_Time) * 100;
michael@0 356 }
michael@0 357 if ($Style_Time != 0)
michael@0 358 {
michael@0 359 $Style_Time_Percentage = ($Style_Time / $TotalLayout_Time) * 100;
michael@0 360 }
michael@0 361 if ($Parse_Time != 0)
michael@0 362 {
michael@0 363 $Parse_Time_Percentage = ($Parse_Time / $TotalLayout_Time) * 100;
michael@0 364 }
michael@0 365 if( $TotalPageLoad_Time > 0 ){
michael@0 366 $TotalLayout_Time_Percentage = ($TotalLayout_Time / $TotalPageLoad_Time) * 100;
michael@0 367 } else {
michael@0 368 $TotalLayout_Time_Percentage = 100;
michael@0 369 }
michael@0 370 }
michael@0 371
michael@0 372 #------------------------------------------------------------------------------
michael@0 373 # Add current values to those in the averages-fields
michael@0 374 #------------------------------------------------------------------------------
michael@0 375 $Avg_Content_Time += $Content_Time;
michael@0 376 $Avg_Reflow_Time += $Reflow_Time;
michael@0 377 $Avg_Frame_Time += $Frame_Time;
michael@0 378 $Avg_Style_Time += $Style_Time;
michael@0 379 $Avg_Parse_Time += $Parse_Time;
michael@0 380 $Avg_TotalPageLoad_Time += $TotalPageLoad_Time;
michael@0 381 $Avg_TotalLayout_Time += $TotalLayout_Time;
michael@0 382
michael@0 383 $Avg_Content_Time_Percentage += $Content_Time_Percentage;
michael@0 384 $Avg_Reflow_Time_Percentage += $Reflow_Time_Percentage;
michael@0 385 $Avg_Frame_Time_Percentage += $Frame_Time_Percentage;
michael@0 386 $Avg_Style_Time_Percentage += $Style_Time_Percentage;
michael@0 387 $Avg_Parse_Time_Percentage += $Parse_Time_Percentage;
michael@0 388 $Avg_TotalLayout_Time_Percentage += $TotalLayout_Time_Percentage;
michael@0 389
michael@0 390 $Num_Entries += 1;
michael@0 391
michael@0 392 #------------------------------------------------------------------------------
michael@0 393 # Now write this site's data to the table
michael@0 394 #------------------------------------------------------------------------------
michael@0 395 open (TABLE_FILE, ">>table.html");
michael@0 396
michael@0 397 print (TABLE_FILE "<tr>");
michael@0 398
michael@0 399 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 400 print (TABLE_FILE "<center><a href='$LinkURL'>$UrlName</a></center>");
michael@0 401 print (TABLE_FILE "</td>");
michael@0 402
michael@0 403 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 404 printf (TABLE_FILE "<center>%4.2f</center>",$Parse_Time);
michael@0 405 print (DEVIATION "$Parse_Time,");
michael@0 406 print (TABLE_FILE "</td>");
michael@0 407
michael@0 408 print (TABLE_FILE "<td BGCOLOR='#FFFF00'>");
michael@0 409 printf (TABLE_FILE "<center>%4.2f</center>",$Parse_Time_Percentage);
michael@0 410 print (DEVIATION "$Parse_Time_Percentage,");
michael@0 411 print (TABLE_FILE "</td>");
michael@0 412
michael@0 413 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 414 printf (TABLE_FILE "<center>%4.2f</center>",$Content_Time);
michael@0 415 print (DEVIATION "$Content_Time,");
michael@0 416 print (TABLE_FILE "</td>");
michael@0 417
michael@0 418 print (TABLE_FILE "<td BGCOLOR='#FFFF00'>");
michael@0 419 printf (TABLE_FILE "<center>%4.2f</center>",$Content_Time_Percentage);
michael@0 420 print (DEVIATION "$Content_Time_Percentage,");
michael@0 421 print (TABLE_FILE "</td>");
michael@0 422
michael@0 423 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 424 printf (TABLE_FILE "<center>%4.2f</center>",$Frame_Time);
michael@0 425 print (DEVIATION "$Frame_Time,");
michael@0 426 print (TABLE_FILE "</td>");
michael@0 427
michael@0 428 print (TABLE_FILE "<td BGCOLOR='#FFFF00'>");
michael@0 429 printf (TABLE_FILE "<center>%4.2f</center>",$Frame_Time_Percentage);
michael@0 430 print (DEVIATION "$Frame_Time_Percentage,");
michael@0 431 print (TABLE_FILE "</td>");
michael@0 432
michael@0 433 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 434 printf (TABLE_FILE "<center>%4.2f</center>",$Style_Time);
michael@0 435 print (DEVIATION "$Style_Time,");
michael@0 436 print (TABLE_FILE "</td>");
michael@0 437
michael@0 438 print (TABLE_FILE "<td BGCOLOR='#FFFF00'>");
michael@0 439 printf (TABLE_FILE "<center>%4.2f</center>",$Style_Time_Percentage);
michael@0 440 print (DEVIATION "$Style_Time_Percentage,");
michael@0 441 print (TABLE_FILE "</td>");
michael@0 442
michael@0 443 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 444 printf (TABLE_FILE "<center>%4.2f</center>",$Reflow_Time);
michael@0 445 print (DEVIATION "$Reflow_Time,");
michael@0 446 print (TABLE_FILE "</td>");
michael@0 447
michael@0 448 print (TABLE_FILE "<td BGCOLOR='#FFFF00'>");
michael@0 449 printf (TABLE_FILE "<center>%4.2f</center>",$Reflow_Time_Percentage);
michael@0 450 print (DEVIATION "$Reflow_Time_Percentage,");
michael@0 451 print (TABLE_FILE "</td>");
michael@0 452
michael@0 453 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 454 printf (TABLE_FILE "<center>%4.2f</center>",$TotalLayout_Time);
michael@0 455 print (DEVIATION "$TotalLayout_Time,");
michael@0 456 print (TABLE_FILE "</td>");
michael@0 457
michael@0 458 print (TABLE_FILE "<td BGCOLOR='#FFFF00'>");
michael@0 459 printf (TABLE_FILE "<center>%4.2f</center>",$TotalLayout_Time_Percentage);
michael@0 460 print (DEVIATION "$TotalLayout_Time_Percentage,");
michael@0 461 print (TABLE_FILE "</td>");
michael@0 462
michael@0 463 print (TABLE_FILE "<td BGCOLOR='#FFFFFF'>");
michael@0 464 printf (TABLE_FILE "<center>%4.2f</center>",$TotalPageLoad_Time);
michael@0 465 print (DEVIATION "$TotalPageLoad_Time\n");
michael@0 466 print (TABLE_FILE "</td>");
michael@0 467
michael@0 468 print (TABLE_FILE "</tr>\n");
michael@0 469
michael@0 470 close (LOG_FILE);
michael@0 471
michael@0 472 open (AVERAGE, "> Average.txt");
michael@0 473 print (AVERAGE "Num Entries: $Num_Entries\n");
michael@0 474 print (AVERAGE "Avg Parse: $Avg_Parse_Time\n");
michael@0 475 print (AVERAGE "Per Parse: $Avg_Parse_Time_Percentage\n");
michael@0 476 print (AVERAGE "Avg Content: $Avg_Content_Time\n");
michael@0 477 print (AVERAGE "Per Content: $Avg_Content_Time_Percentage\n");
michael@0 478 print (AVERAGE "Avg Frame: $Avg_Frame_Time\n");
michael@0 479 print (AVERAGE "Per Frame: $Avg_Frame_Time_Percentage\n");
michael@0 480 print (AVERAGE "Avg Style: $Avg_Style_Time\n");
michael@0 481 print (AVERAGE "Per Style: $Avg_Style_Time_Percentage\n");
michael@0 482 print (AVERAGE "Avg Reflow: $Avg_Reflow_Time\n");
michael@0 483 print (AVERAGE "Per Reflow: $Avg_Reflow_Time_Percentage\n");
michael@0 484 print (AVERAGE "Avg TotalLayout: $Avg_TotalLayout_Time\n");
michael@0 485 print (AVERAGE "Per Layout: $Avg_TotalLayout_Time_Percentage\n");
michael@0 486 print (AVERAGE "Avg PageLoad: $Avg_TotalPageLoad_Time\n");
michael@0 487 close (AVERAGE);

mercurial