tools/performance/layout/history.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/performance/layout/history.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,430 @@
     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 +sub debug_print {
    1.12 +  foreach $str (@_){
    1.13 +#    print( $str );
    1.14 +  }
    1.15 +}
    1.16 +
    1.17 +
    1.18 +#------------------------------------------------------------------------------
    1.19 +# Variables
    1.20 +#------------------------------------------------------------------------------
    1.21 +$Parse_Time_Max=0;
    1.22 +$Content_Time_Max=0;
    1.23 +$Frame_Time_Max=0;
    1.24 +$Style_Time_Max=0;
    1.25 +$Reflow_Time_Max=0;
    1.26 +$Layout_Time_Max=0;
    1.27 +$Total_Time_Max=0;
    1.28 +
    1.29 +@RecordList;
    1.30 +@LineList;
    1.31 +
    1.32 +#------------------------------------------------------------------------------
    1.33 +# Open the history file and begin by collecting the records into the data-arrays
    1.34 +# and set all of the max-values too
    1.35 +#------------------------------------------------------------------------------
    1.36 +$count=0;
    1.37 +open( HISTORY, "History.txt" ) or die "History file could not be opened\n";
    1.38 +while(<HISTORY>)
    1.39 +{
    1.40 +  my $PullID;
    1.41 +  my $BuildID;
    1.42 +  # - Time variables
    1.43 +  my $Parse_Time=0;
    1.44 +  my $Content_Time=0;
    1.45 +  my $Frame_Time=0;
    1.46 +  my $Style_Time=0;
    1.47 +  my $Reflow_Time=0;
    1.48 +  my $Layout_Time=0;
    1.49 +  my $Total_Time=0;
    1.50 +  # - percentage variables
    1.51 +  my $Parse_Per=0;
    1.52 +  my $Content_Per=0;
    1.53 +  my $Frame_Per=0;
    1.54 +  my $Style_Per=0;
    1.55 +  my $Reflow_Per=0;
    1.56 +  my $Layout_Per=0;
    1.57 +
    1.58 +  $i=0;
    1.59 +  $ThisLine = $_;
    1.60 +  chop( $Thisline );
    1.61 +  @LineList = split( /,/, $ThisLine );
    1.62 +
    1.63 +  # get each value into a variable
    1.64 +  $PullID = $LineList[$i++];
    1.65 +  $RecordList[$count++] = $PullID;
    1.66 +  debug_print( "PullID : $PullID \n" );
    1.67 +  $BuildID = $LineList[$i++];
    1.68 +  $RecordList[$count++] = $BuildID;
    1.69 +  debug_print( "BuildID : $BuildID \n" );
    1.70 +
    1.71 +  $Parse_Time = $LineList[$i++];
    1.72 +  $RecordList[$count++] = $Parse_Time;
    1.73 +  debug_print( "Parse_Time : $Parse_Time \n" );
    1.74 +  $Parse_Per =  $LineList[$i++];
    1.75 +  $RecordList[$count++] = $Parse_Per;
    1.76 +  debug_print( "Parse_Per : $Parse_Per \n" );
    1.77 +  $Content_Time = $LineList[$i++];
    1.78 +  $RecordList[$count++] = $Content_Time;
    1.79 +  debug_print( "Content_Time : $Content_Time \n" );
    1.80 +  $Content_Per = $LineList[$i++];
    1.81 +  $RecordList[$count++] = $Content_Per;
    1.82 +  debug_print( "Content_Per : $Content_Per \n" );
    1.83 +  $Frame_Time = $LineList[$i++];
    1.84 +  $RecordList[$count++] = $Frame_Time;
    1.85 +  debug_print( "Frame_Time : $Frame_Time \n" );
    1.86 +  $Frame_Per = $LineList[$i++];
    1.87 +  $RecordList[$count++] = $Frame_Per;
    1.88 +  debug_print( "Frame_Per : $Frame_Per \n" );
    1.89 +  $Style_Time = $LineList[$i++];
    1.90 +  $RecordList[$count++] = $Style_Time;
    1.91 +  debug_print( "Style_Time : $Style_Time \n" );
    1.92 +  $Style_Per = $LineList[$i++];
    1.93 +  $RecordList[$count++] = $Style_Per;
    1.94 +  debug_print( "Style_Per : $Style_Per \n" );
    1.95 +  $Reflow_Time = $LineList[$i++];
    1.96 +  $RecordList[$count++] = $Reflow_Time;
    1.97 +  debug_print( "Reflow_Time : $Reflow_Time \n" );
    1.98 +  $Reflow_Per = $LineList[$i++];
    1.99 +  $RecordList[$count++] = $Reflow_Per;
   1.100 +  debug_print( "Reflow_Per : $Reflow_Per \n" );
   1.101 +  $Layout_Time = $LineList[$i++];
   1.102 +  $RecordList[$count++] = $Layout_Time;
   1.103 +  debug_print( "Layout_Time : $Layout_Time \n" );
   1.104 +  $Layout_Per = $LineList[$i++];
   1.105 +  $RecordList[$count++] = $Layout_Per;
   1.106 +  debug_print( "Layout_Per : $Layout_Per \n" );
   1.107 +  $Total_Time = $LineList[$i++];
   1.108 +  $RecordList[$count++] = $Total_Time;
   1.109 +  debug_print( "Total_Time : $Total_Time \n" );
   1.110 +
   1.111 +  # Now check for max values
   1.112 +  if( $Parse_Time > $Parse_Time_Max ){
   1.113 +    $Parse_Time_Max = $Parse_Time;
   1.114 +    debug_print( "ParseTimeMax: .$Parse_Time_Max\n");
   1.115 +  }
   1.116 +  if( $Content_Time > $Content_Time_Max ){
   1.117 +    $Content_Time_Max = $Content_Time;
   1.118 +    debug_print( "Content_Time_Max: $Content_Time_Max\n");
   1.119 +  }
   1.120 +  if( $Frame_Time > $Frame_Time_Max ){
   1.121 +    $Frame_Time_Max = $Frame_Time;
   1.122 +    debug_print( "Frame_Time_Max: $Frame_Time_Max\n");
   1.123 +  }
   1.124 +  if( $Style_Time > $Style_Time_Max ){
   1.125 +    $Style_Time_Max = $Style_Time;
   1.126 +    debug_print( "Style_Time_Max: $Style_Time_Max\n");
   1.127 +  }
   1.128 +  if( $Reflow_Time > $Reflow_Time_Max ){
   1.129 +    $Reflow_Time_Max = $Reflow_Time;
   1.130 +    debug_print( "Reflow_Time_Max: $Reflow_Time_Max\n");
   1.131 +  }
   1.132 +  if( $Layout_Time > $Layout_Time_Max ){
   1.133 +    $Layout_Time_Max = $Layout_Time;
   1.134 +    debug_print( "Layout_Time_Max: $Layout_Time_Max\n");
   1.135 +  }
   1.136 +
   1.137 +  if( $Total_Time > $Total_Time_Max ){
   1.138 +    $Total_Time_Max = $Total_Time;
   1.139 +    debug_print( "Total_Time_Max: $Total_Time_Max\n");
   1.140 +  }
   1.141 +}
   1.142 +close(HISTORY);
   1.143 +
   1.144 +for $foo (@RecordList){
   1.145 +#  print( "FOO: $foo \n" );
   1.146 +}
   1.147 +ProcessHeader();
   1.148 +for($index=0; $index<($count/15); $index++)
   1.149 +{
   1.150 +  my $start = 15*$index;
   1.151 +  my $end = $start+15;
   1.152 +  print( "Start: $start  -> End: $end\n");
   1.153 +  my @entry = @RecordList[$start..$end];
   1.154 +  print( "Processing entry $index\n");
   1.155 +  ProcessEntry( @entry );
   1.156 +}
   1.157 +ProcessFooter();
   1.158 +
   1.159 +#------------------------------------------------------------------------------
   1.160 +#
   1.161 +sub ProcessHeader {
   1.162 +  debug_print("ProcessHeader\n");
   1.163 + 
   1.164 +  ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)=localtime;
   1.165 +  %weekday= (
   1.166 +    "1", "$day",
   1.167 +    '2', 'Tuesday',
   1.168 +    '3', 'Wednesday',
   1.169 +    '4', 'Thursday',
   1.170 +    '5', 'Friday',
   1.171 +    '6', 'Saturday',
   1.172 +    '7', 'Sunday',
   1.173 +  );
   1.174 +  $mon += 1;
   1.175 +  $year += 1900;
   1.176 +
   1.177 +  open(TRENDTABLE, "> TrendTable.html") or die "Cannot open trend-table file (TrendTable.html) in ProcessHeader\n";
   1.178 +  print(TRENDTABLE "<!-- Generated by history.pl part of the Gecko PerfTools -->\n");
   1.179 +  print(TRENDTABLE "<BODY>\n" );
   1.180 +  print(TRENDTABLE "<H2 align=center><font color='maroon'>Performance History and Trending Table</font></H2><BR>\n" );
   1.181 +  print (TRENDTABLE "<center><font size=-1>");
   1.182 +  print (TRENDTABLE "$weekday{$wday} ");
   1.183 +  print (TRENDTABLE "$mon/$mday/$year ");
   1.184 +  printf (TRENDTABLE "%02d:%02d:%02d", $hour, $min, $sec);
   1.185 +  print (TRENDTABLE "</font></center>");
   1.186 +  print (TRENDTABLE "<BR>");
   1.187 +  print(TRENDTABLE "<!-- First the headings (static) -->\n" );
   1.188 +  print(TRENDTABLE "<TABLE BORDER=1 width=99% BGCOLOR='white'>\n" );
   1.189 +  print(TRENDTABLE "<TR >\n" );
   1.190 +  print(TRENDTABLE "<TD ROWSPAN=2 width=5% align=center valign=top BGCOLOR='#E0E0E0'>\n" );
   1.191 +  print(TRENDTABLE "<B>Pull-ID</B>\n" );
   1.192 +  print(TRENDTABLE "</TD>\n" );
   1.193 +  print(TRENDTABLE "<TD ROWSPAN=2 align=center width=5% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.194 +  print(TRENDTABLE "<B>Build-ID</B>\n" );
   1.195 +  print(TRENDTABLE "</TD>\n" );
   1.196 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.197 +  print(TRENDTABLE "<B>Parsing</B>\n" );
   1.198 +  print(TRENDTABLE "</TD>\n" );
   1.199 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.200 +  print(TRENDTABLE "<B>Content Creation</B>\n" );
   1.201 +  print(TRENDTABLE "</TD>\n" );
   1.202 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.203 +  print(TRENDTABLE "<B>Frame Creation</B>\n" );
   1.204 +  print(TRENDTABLE "</TD>\n" );
   1.205 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.206 +  print(TRENDTABLE "<B>Style Resolution</B>\n" );
   1.207 +  print(TRENDTABLE "</TD>\n" );
   1.208 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.209 +  print(TRENDTABLE "<B>Reflow</B>\n" );
   1.210 +  print(TRENDTABLE "</TD>\n" );
   1.211 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.212 +  print(TRENDTABLE "<B>Total Layout</B>\n" );
   1.213 +  print(TRENDTABLE "<TD ROWSPAN=1 align=center width=10% valign=top BGCOLOR='#E0E0E0'>\n" );
   1.214 +  print(TRENDTABLE "<B>Total Time</B>\n" );
   1.215 +  print(TRENDTABLE "</TD>\n" );
   1.216 +  print(TRENDTABLE "</TR>\n" );
   1.217 +  print(TRENDTABLE "<TD>\n" );
   1.218 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.219 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=50%>Sec</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>%</TD></TR></TABLE>\n" );
   1.220 +  print(TRENDTABLE "</TD>\n" );
   1.221 +  print(TRENDTABLE "<TD>\n" );
   1.222 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.223 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=50%>Sec</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>%</TD></TR></TABLE>\n" );
   1.224 +  print(TRENDTABLE "</TD>\n" );
   1.225 +  print(TRENDTABLE "<TD>\n" );
   1.226 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.227 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=50%>Sec</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>%</TD></TR></TABLE>\n" );
   1.228 +  print(TRENDTABLE "</TD>\n" );
   1.229 +  print(TRENDTABLE "<TD>\n" );
   1.230 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.231 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=50%>Sec</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>%</TD></TR></TABLE>\n" );
   1.232 +  print(TRENDTABLE "</TD>\n" );
   1.233 +  print(TRENDTABLE "<TD>\n" );
   1.234 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.235 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=50%>Sec</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>%</TD></TR></TABLE>\n" );
   1.236 +  print(TRENDTABLE "</TD>\n" );
   1.237 +  print(TRENDTABLE "<TD>\n" );
   1.238 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.239 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=50%>Sec</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>%</TD></TR></TABLE>\n" );
   1.240 +  print(TRENDTABLE "</TD>\n" );
   1.241 +  print(TRENDTABLE "<TD>\n" );
   1.242 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center BGCOLOR='#E0E0E0'>\n" );
   1.243 +  print(TRENDTABLE "<TR><TD BGCOLOR='#FFFFC6' align=left width=100%>Sec</TD></TR></TABLE>\n" );
   1.244 +  print(TRENDTABLE "</TD>\n" );
   1.245 +  close(TRENDTABLE);
   1.246 +}
   1.247 +
   1.248 +#------------------------------------------------------------------------------
   1.249 +#
   1.250 +sub ProcessEntry {
   1.251 +
   1.252 +  my $PullID;
   1.253 +  my $BuildID;
   1.254 +  # - Time variables
   1.255 +  my $Parse_Time=0;
   1.256 +  my $Content_Time=0;
   1.257 +  my $Frame_Time=0;
   1.258 +  my $Style_Time=0;
   1.259 +  my $Reflow_Time=0;
   1.260 +  my $Layout_Time=0;
   1.261 +  my $Total_Time=0;
   1.262 +  # - percentage variables
   1.263 +  my $Parse_Per=0;
   1.264 +  my $Content_Per=0;
   1.265 +  my $Frame_Per=0;
   1.266 +  my $Style_Per=0;
   1.267 +  my $Reflow_Per=0;
   1.268 +  my $Layout_Per=0;
   1.269 +  # - weight variables
   1.270 +  my $Parse_Weight=0;
   1.271 +  my $Content_Weight=0;
   1.272 +  my $Frame_Weight=0;
   1.273 +  my $Style_Weight=0;
   1.274 +  my $Reflow_Weight=0;
   1.275 +  my $Layout_Weight=0;
   1.276 +  my $Total_Weight=0;
   1.277 +
   1.278 +  debug_print( "Process Entry\n" );
   1.279 +  my @EntryLine =@_;
   1.280 +
   1.281 +  open(TRENDTABLE, ">> TrendTable.html") or die "Cannot open trend-table file (TrendTable.html) in ProcessHeader\n";
   1.282 +  $i=0;
   1.283 +  $PullID = $EntryLine[$i++];
   1.284 +  debug_print( "PullID: $PullID \n" );
   1.285 +  $BuildID = $EntryLine[$i++];
   1.286 +  debug_print( "BuildID: $BuildID \n" );
   1.287 +  $Parse_Time = $EntryLine[$i++];
   1.288 +  debug_print( "Parse_Time : $Parse_Time \n" );
   1.289 +  $Parse_Per =  $EntryLine[$i++];
   1.290 +  debug_print( "Parse_Per : $Parse_Per \n" );
   1.291 +  $Content_Time = $EntryLine[$i++];
   1.292 +  debug_print( "Content_Time : $Content_Time \n" );
   1.293 +  $Content_Per = $EntryLine[$i++];
   1.294 +  debug_print( "Content_Per : $Content_Per \n" );
   1.295 +  $Frame_Time = $EntryLine[$i++];
   1.296 +  debug_print( "Frame_Time : $Frame_Time \n" );
   1.297 +  $Frame_Per = $EntryLine[$i++];
   1.298 +  debug_print( "Frame_Per : $Frame_Per \n" );
   1.299 +  $Style_Time = $EntryLine[$i++];
   1.300 +  debug_print( "Style_Time : $Style_Time \n" );
   1.301 +  $Style_Per = $EntryLine[$i++];
   1.302 +  debug_print( "Style_Per : $Style_Per \n" );
   1.303 +  $Reflow_Time = $EntryLine[$i++];
   1.304 +  debug_print( "Reflow_Time : $Reflow_Time \n" );
   1.305 +  $Reflow_Per = $EntryLine[$i++];
   1.306 +  debug_print( "Reflow_Per : $Reflow_Per \n" );
   1.307 +  $Layout_Time = $EntryLine[$i++];
   1.308 +  debug_print( "Layout_Time : $Layout_Time \n" );
   1.309 +  $Layout_Per = $EntryLine[$i++];
   1.310 +  debug_print( "Layout_Per : $Layout_Per \n" );
   1.311 +  $Total_Time = $EntryLine[$i++];
   1.312 +  debug_print( "Total_Time : $Total_Time \n" );
   1.313 +
   1.314 +  if( $Parse_Time_Max > 0 ){
   1.315 +    $ParseWeight = $Parse_Time / $Parse_Time_Max * 100;
   1.316 +    debug_print( "ParseWeight = $ParseWeight \n" );
   1.317 +  }
   1.318 +  if( $Content_Time_Max > 0 ){
   1.319 +    $ContentWeight = $Content_Time / $Content_Time_Max * 100;
   1.320 +    debug_print( "ContentWeight = $ContentWeight \n" );
   1.321 +  }
   1.322 +  if( $Frame_Time_Max > 0 ){
   1.323 +    $FrameWeight = $Frame_Time / $Frame_Time_Max * 100;
   1.324 +    debug_print( "FrameWeight = $FrameWeight \n" );
   1.325 +  }
   1.326 +  if( $Style_Time_Max > 0 ){
   1.327 +    $StyleWeight = $Style_Time / $Style_Time_Max * 100;
   1.328 +    debug_print( "StyleWeight = $StyleWeight \n" );
   1.329 +  }
   1.330 +  if( $Reflow_Time_Max > 0 ){
   1.331 +    $ReflowWeight = $Reflow_Time / $Reflow_Time_Max * 100;
   1.332 +    debug_print( "ReflowWeight = $ReflowWeight \n" );
   1.333 +  }
   1.334 +  if( $Layout_Time_Max > 0 ){
   1.335 +    $LayoutWeight = $Layout_Time / $Layout_Time_Max * 100;
   1.336 +    debug_print( "LayoutWeight = $LayoutWeight \n" );
   1.337 +  }
   1.338 +  if( $Total_Time_Max > 0 ){
   1.339 +    $TotalWeight = $Total_Time / $Total_Time_Max * 100;
   1.340 +    debug_print( "TotalWeight = $TotalWeight \n" );
   1.341 +  }
   1.342 +
   1.343 +  $bldID;
   1.344 +  @bldIDParts = split( /:/, $BuildID );
   1.345 +  $bldID = $bldIDParts[1];
   1.346 +  print(TRENDTABLE "<!-- Next entry... -->\n");
   1.347 +  print(TRENDTABLE "<TR> \n");
   1.348 +  print(TRENDTABLE "<TD ROWSPAN=1>$PullID</TD>\n");
   1.349 +  print(TRENDTABLE "<TD ROWSPAN=1>$bldID</TD>\n");
   1.350 +  print(TRENDTABLE "<!-- Parse Time -->\n");
   1.351 +  print(TRENDTABLE "<TD>\n");
   1.352 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=50%>");
   1.353 +  printf(TRENDTABLE "%4.3f", $Parse_Time);
   1.354 +  print(TRENDTABLE "</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>");
   1.355 +  printf(TRENDTABLE "%4.3f",$Parse_Per);
   1.356 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$ParseWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.357 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.358 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $ParseWeight);
   1.359 +  print(TRENDTABLE "</TD>\n");
   1.360 +  print(TRENDTABLE "<!-- Content Time -->\n");
   1.361 +  print(TRENDTABLE "<TD>\n");
   1.362 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=50%>");
   1.363 +  printf(TRENDTABLE "%4.3f",$Content_Time);
   1.364 +  print(TRENDTABLE "</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>");
   1.365 +  printf(TRENDTABLE "%4.3f",$Content_Per);
   1.366 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$ContentWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.367 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.368 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $ContentWeight);
   1.369 +  print(TRENDTABLE "</TD>\n");
   1.370 +  print(TRENDTABLE "<!-- Frames Time -->\n");
   1.371 +  print(TRENDTABLE "<TD>\n");
   1.372 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=50%>");
   1.373 +  printf(TRENDTABLE "%4.3f",$Frame_Time);
   1.374 +  print(TRENDTABLE "</TD><TD BGCOLOR='#CFEEF7' align=right width=50%> ");
   1.375 +  printf(TRENDTABLE "%4.3f",$Frame_Per);
   1.376 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$FrameWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.377 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.378 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $FrameWeight);
   1.379 +  print(TRENDTABLE "</TD>\n");
   1.380 +  print(TRENDTABLE "<!-- Style Time -->\n");
   1.381 +  print(TRENDTABLE "<TD>\n");
   1.382 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=50%>");
   1.383 +  printf(TRENDTABLE "%4.3f",$Style_Time);
   1.384 +  print(TRENDTABLE "</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>");
   1.385 +  printf(TRENDTABLE "%4.3f",$Style_Per);
   1.386 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$StyleWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.387 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.388 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $StyleWeight);
   1.389 +  print(TRENDTABLE "</TD>\n");
   1.390 +  print(TRENDTABLE "<!-- Reflow Time -->\n");
   1.391 +  print(TRENDTABLE "<TD>\n");
   1.392 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=50%>");
   1.393 +  printf(TRENDTABLE "%4.3f",$Reflow_Time);
   1.394 +  print(TRENDTABLE "</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>");
   1.395 +  printf(TRENDTABLE "%4.3f",$Reflow_Per);
   1.396 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$ReflowWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.397 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.398 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $ReflowWeight);
   1.399 +  print(TRENDTABLE "</TD>\n");
   1.400 +  print(TRENDTABLE "<!-- Layout Time -->\n");
   1.401 +  print(TRENDTABLE "<TD>\n");
   1.402 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=50%>");
   1.403 +  printf(TRENDTABLE "%4.3f",$Layout_Time);
   1.404 +  print(TRENDTABLE "</TD><TD BGCOLOR='#CFEEF7' align=right width=50%>");
   1.405 +  printf(TRENDTABLE "%4.3f",$Layout_Per);
   1.406 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$LayoutWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.407 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.408 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $LayoutWeight);
   1.409 +  print(TRENDTABLE "</TD>\n");
   1.410 +  print(TRENDTABLE "<!-- Parse Time -->\n");
   1.411 +  print(TRENDTABLE "<TD>\n");
   1.412 +  print(TRENDTABLE "<TABLE BORDER=0 width=100% align=center COLS=2><TR><TD BGCOLOR='#FFFFC6' align=left width=100%>");
   1.413 +  printf(TRENDTABLE "%4.3f",$Total_Time);
   1.414 +  print(TRENDTABLE "</TD></TR><TR><TD colspan=2><table WIDTH=$TotalWeight% bgcolor=blue><tr><td><font align=center size=-2>&nbsp;");
   1.415 +  print(TRENDTABLE "</td></font></tr></table></TD></TR></TABLE>");
   1.416 +  printf(TRENDTABLE "<font size=-1>%4.2f % </font>", $TotalWeight);
   1.417 +  print(TRENDTABLE "</TD>\n");
   1.418 +  print(TRENDTABLE "</TR>\n");
   1.419 +
   1.420 +  close(TRENDTABLE);
   1.421 +}
   1.422 +
   1.423 +#------------------------------------------------------------------------------
   1.424 +#
   1.425 +sub ProcessFooter {
   1.426 +  debug_print("ProcessHeader\n");
   1.427 +  open(TRENDTABLE, ">> TrendTable.html") or die "Cannot open trend-table file (TrendTable.html) in ProcessFooter\n";
   1.428 +
   1.429 +  print(TRENDTABLE "</TABLE>\n");
   1.430 +  print(TRENDTABLE "</BODY>\n");
   1.431 +
   1.432 +  close(TRENDTABLE);
   1.433 +} 

mercurial