| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 |
| 3 <!-- |
| 4 Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 5 Use of this source code is governed by a BSD-style license that can be |
| 6 found in the LICENSE file. |
| 7 --> |
| 8 |
| 2 <head> | 9 <head> |
| 3 <style> | 10 <style> |
| 4 body { | 11 table { |
| 5 font-family: monospace; | 12 font-family: monospace; |
| 6 } | |
| 7 table { | |
| 8 border-collapse: collapse; | 13 border-collapse: collapse; |
| 9 } | 14 } |
| 10 thead { | 15 thead { |
| 11 border-top: solid 1px gray; | 16 border-top: solid 1px gray; |
| 12 border-left: solid 1px gray; | 17 border-left: solid 1px gray; |
| 13 } | 18 } |
| 14 tbody { | 19 tbody { |
| 15 border-top: solid 1px gray; | 20 border-top: solid 1px gray; |
| 16 border-bottom: solid 1px gray; | 21 border-bottom: solid 1px gray; |
| 17 border-left: solid 1px gray; | 22 border-left: solid 1px gray; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 41 var result = 0; | 46 var result = 0; |
| 42 for (var i = 1; i < ary.length; ++i) { | 47 for (var i = 1; i < ary.length; ++i) { |
| 43 if (ary[i] > max) { | 48 if (ary[i] > max) { |
| 44 max = ary[i]; | 49 max = ary[i]; |
| 45 result = i; | 50 result = i; |
| 46 } | 51 } |
| 47 } | 52 } |
| 48 return result; | 53 return result; |
| 49 } | 54 } |
| 50 | 55 |
| 56 function append_column(tr, value, sums, index) { |
| 57 td = document.createElement("TD"); |
| 58 td.appendChild(document.createTextNode(value)); |
| 59 tr.appendChild(td); |
| 60 |
| 61 if (index >= 0) { |
| 62 if (!sums[index]) |
| 63 sums[index] = 0; |
| 64 sums[index] += parseFloat(value); |
| 65 } |
| 66 } |
| 67 |
| 51 function received_data(data) { | 68 function received_data(data) { |
| 52 var tbody = document.getElementById("tbody"); | 69 var tbody = document.getElementById("tbody"); |
| 53 data.replace('\r', ''); | 70 data.replace('\r', ''); |
| 54 | 71 |
| 55 var col_sums = []; | 72 var col_sums = []; |
| 73 var rows = data.split('\n'); |
| 56 | 74 |
| 57 var rows = data.split('\n'); | |
| 58 for (var i = 0; i < rows.length; ++i) { | 75 for (var i = 0; i < rows.length; ++i) { |
| 59 var tr = document.createElement("TR"); | 76 var tr = document.createElement("TR"); |
| 60 | 77 |
| 61 var cols = rows[i].split(' '); | 78 var cols = rows[i].split(' '); |
| 62 | 79 |
| 63 // cols[0] = page name | 80 // cols[0] = page name |
| 64 // cols[1] = mean (minus worst run) | 81 // cols[1] = (mean+/-standard deviation): |
| 65 // cols[2] = standard deviation (minus worst run) | 82 // cols[2...] = individual runs |
| 66 // cols[3...] = individual runs | |
| 67 | 83 |
| 68 for (var j = 0; j < cols.length; ++j) { | 84 // Require at least the page name and statistics. |
| 69 var td = document.createElement("TD"); | 85 if (cols.length < 2) |
| 70 td.appendChild(document.createTextNode(cols[j])); | 86 continue; |
| 71 tr.appendChild(td); | 87 |
| 72 if (j >= 1) { | 88 var page = cols[0]; |
| 73 if (!col_sums[j - 1]) | 89 var values = cols[1].split('+/-'); |
| 74 col_sums[j - 1] = 0; | 90 append_column(tr, page, col_sums, -1); |
| 75 col_sums[j - 1] = col_sums[j - 1] + (cols[j] - 0); | 91 append_column(tr, values[0].slice(1), col_sums, 0); |
| 76 } | 92 append_column(tr, values[1].slice(0,-2), col_sums, 1); |
| 77 } | 93 |
| 94 for (var j = 2; j < cols.length; ++j) |
| 95 append_column(tr, cols[j], col_sums, j); |
| 78 | 96 |
| 79 tbody.appendChild(tr); | 97 tbody.appendChild(tr); |
| 80 } | 98 } |
| 81 | 99 |
| 82 // print out the column totals (highlight the max value) | 100 // print out the column totals (highlight the max value) |
| 83 | 101 |
| 84 var index_of_max = get_index_of_max(col_sums); | 102 var index_of_max = get_index_of_max(col_sums); |
| 85 | 103 |
| 86 var tr = document.createElement("TR"); | 104 var tr = document.createElement("TR"); |
| 87 tr.setAttribute("class", "sep-top"); | 105 tr.setAttribute("class", "sep-top"); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 99 var precision = j == 0 ? 2 : 0; | 117 var precision = j == 0 ? 2 : 0; |
| 100 td.appendChild(document.createTextNode(col_sums[j].toFixed(precision))); | 118 td.appendChild(document.createTextNode(col_sums[j].toFixed(precision))); |
| 101 } | 119 } |
| 102 tr.appendChild(td); | 120 tr.appendChild(td); |
| 103 } | 121 } |
| 104 | 122 |
| 105 tbody.appendChild(tr); | 123 tbody.appendChild(tr); |
| 106 } | 124 } |
| 107 | 125 |
| 108 function init() { | 126 function init() { |
| 109 var cl = location.search.substring(4); | 127 var params = ParseParams(); |
| 110 Fetch(cl + ".dat", received_data); | 128 var cl = params.cl; |
| 129 var trace = params.trace; |
| 130 document.getElementById("description").innerText = trace + " in r" + cl; |
| 131 Fetch(cl + "_" + trace +".dat", received_data); |
| 111 } | 132 } |
| 112 | 133 |
| 113 window.addEventListener("load", init, false); | 134 window.addEventListener("load", init, false); |
| 114 </script> | 135 </script> |
| 115 </head> | 136 </head> |
| 116 <body> | 137 <body> |
| 138 <div id="description"></div> |
| 117 <table> | 139 <table> |
| 118 <thead> | 140 <thead> |
| 119 <tr><th>Page</th><th>Mean</th><th>StdDev</th><th colspan="10">Runs...</th></
tr> | 141 <tr><th>Page</th><th>Mean</th><th>StdDev</th><th colspan="10">Runs...</th></
tr> |
| 120 </thead> | 142 </thead> |
| 121 <tbody id="tbody"> | 143 <tbody id="tbody"> |
| 122 </tbody> | 144 </tbody> |
| 123 </table> | 145 </table> |
| 124 </body> | 146 </body> |
| 125 </html> | 147 </html> |
| OLD | NEW |