rem: }; 
add: } 
context: qx.Proto.start = function(vRounds, vLoops){  var vFuncs = this._functions;  var vLength = vFuncs.length;  var vStart;  var vLocalTimes;  var vAllTimes = [];  var vHtmlMeasured = [];  var vHtmlResults = [];  var vCellWidth = Math.round(100 / (vLength+1)) + "%";  vHtmlMeasured.push("<h3>Measured Values</h3>");  vHtmlMeasured.push("<style type='text/css'>.output{border: 1px solid black; width:100%; margin-bottom: 20px } .output thead{ font-weight: bold; } .output td, .output th{ text-align:left; width: " + vCellWidth + "; } .output td{padding:4px}</style>");  vHtmlMeasured.push("<table class='output'>");  vHtmlMeasured.push("<thead>");  vHtmlMeasured.push("<tr><td>&#160;</td>");  for (var j=0; j<vLength; j++) {    vHtmlMeasured.push("<td>Method " + (j+1) + "</td>");  };  vHtmlMeasured.push("</thead><tbody>");  for (var i=0; i<vRounds; i++)  {    vLocalTimes = [];    for (var j=0; j<vLength; j++)    {      vStart = (new Date).valueOf();      vFuncs[j](vLoops);      vLocalTimes.push((new Date).valueOf()-vStart);    };    vHtmlMeasured.push("<tr><th>Round " + i + "</th>");    for (var j=0; j<vLocalTimes.length; j++) {      vHtmlMeasured.push("<td>" + vLocalTimes[j] + "</td>");    };    vHtmlMeasured.push("</tr>");    vAllTimes.push(vLocalTimes);  };  vHtmlMeasured.push("</tbody></table>");  var vSum, vMeanValue, vMeanAll=[], vMeanMin=1e7, vMeanMax=0;  for (var j=0; j<vLength; j++)  {    vSum = 0;    for (var i=0; i<vRounds; i++)    {      vSum += vAllTimes[i][j];    };    vMeanValue = Math.round(vSum / vRounds);    vMeanAll.push(vMeanValue);    vMeanMin = Math.min(vMeanMin, vMeanValue);    vMeanMax = Math.max(vMeanMax, vMeanValue);  };  var vMedian, vMedianValue, vMedianAll=[], vMedianMin=1e7, vMedianMax=0;  for (var j=0; j<vLength; j++)  {    vMedian = [];    for (var i=0; i<vRounds; i++)    {      vMedian.push(vAllTimes[i][j]);    };    vMedian.sort(qx.dev.TimeTracker.compare);    vMedianValue = vMedian[Math.floor(vRounds / 2)].toString();    vMedianAll.push(vMedianValue);    vMedianMin = Math.min(vMedianValue, vMedianMin);    vMedianMax = Math.max(vMedianValue, vMedianMax);  };  vHtmlResults.push("<h3>Results Summary</h3>");  vHtmlResults.push("<table class='output'>");  vHtmlResults.push("<thead>");  vHtmlResults.push("<tr><td>&#160;</td>");  for (var j=0; j<vLength; j++) {    vHtmlResults.push("<td>Method " + (j+1) + "</td>");  };  vHtmlResults.push("</thead><tbody>");  vHtmlResults.push("<tr>");  vHtmlResults.push("<th>Median</th>");  for (var j=0; j<vLength; j++) {    vHtmlResults.push("<td>" + vMedianAll[j] + "</td>");  };  vHtmlResults.push("</tr>");  vHtmlResults.push("<tr>");  vHtmlResults.push("<th>Median Factor</th>");  for (var j=0; j<vLength; j++)  {    vHtmlResults.push("<td>");    vHtmlResults.push(vMedianMin > 0 ? Math.round(vMedianAll[j] / vMedianMin) : "1");    vHtmlResults.push("x</td>");  };  vHtmlResults.push("</tr>");  vHtmlResults.push("<tr>");  vHtmlResults.push("<th>Mean</th>");  for (var j=0; j<vLength; j++) {    vHtmlResults.push("<td>" + vMeanAll[j] + "</td>");  };  vHtmlResults.push("</tr>");  vHtmlResults.push("<tr>");  vHtmlResults.push("<th>Mean Factor</th>");  for (var j=0; j<vLength; j++)  {    vHtmlResults.push("<td>");    vHtmlResults.push(vMeanMin > 0 ? Math.round(vMeanAll[j] / vMeanMin) : 1);    vHtmlResults.push("x</td>");  };  vHtmlResults.push("</tr>");  vHtmlResults.push("<tr>");  vHtmlResults.push("<th>Winner</th>");  for (var j=0; j<vLength; j++)  {    vHtmlResults.push("<td>");    if (vMedianMin == vMedianAll[j] && vMeanMin == vMeanAll[j])    {      vHtmlResults.push("BOTH");    }    else if (vMedianMin == vMedianAll[j])    {      vHtmlResults.push("MEDIAN");    }    else if (vMeanMin == vMeanAll[j])    {      vHtmlResults.push("MEAN");    };    vHtmlResults.push("</td>");  };  vHtmlResults.push("</tr>");  vHtmlResults.push("</tbody></table>");  this._output.setHtml(vHtmlResults.join("") + vHtmlMeasured.join(""));};
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/5b1a09c4ca80efdfbd41063412dd526cf7e711df/TimeTracker.js/clean/qooxdoo/source/script/qx/dev/TimeTracker.js