| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <style> | |
| 4 body { | |
| 5 font-family: sans-serif; | |
| 6 } | |
| 7 div#output { | |
| 8 cursor: pointer; | |
| 9 } | |
| 10 div#switcher { | |
| 11 cursor: pointer; | |
| 12 } | |
| 13 div#switcher a { | |
| 14 border-top: 1px solid black; | |
| 15 border-left: 1px solid black; | |
| 16 padding-left: 0.5em; | |
| 17 padding-right: 0.5em; | |
| 18 } | |
| 19 canvas.plot { | |
| 20 border: 1px solid black; | |
| 21 } | |
| 22 div.plot-coordinates { | |
| 23 font-family: monospace; | |
| 24 } | |
| 25 iframe { | |
| 26 display: none; | |
| 27 width: 100%; | |
| 28 height: 100%; | |
| 29 border: none; | |
| 30 } | |
| 31 div.selector { | |
| 32 border: solid 1px black; | |
| 33 cursor: pointer; | |
| 34 padding-left: 0.3em; | |
| 35 background-color: white; | |
| 36 } | |
| 37 div.selector:hover { | |
| 38 background-color: rgb(200,200,250); | |
| 39 } | |
| 40 div.selected { | |
| 41 border-left: none; | |
| 42 } | |
| 43 div#selectors { | |
| 44 width: 80px; | |
| 45 display: none; | |
| 46 } | |
| 47 </style> | |
| 48 <script src="js/common.js"></script> | |
| 49 <script src="js/plotter.js"></script> | |
| 50 <script src="js/coordinates.js"></script> | |
| 51 <script src="config.js"></script> | |
| 52 <script> | |
| 53 document.title = Config.title; | |
| 54 | |
| 55 var params = ParseParams(); | |
| 56 if (!('history' in params)) { | |
| 57 params.history = 150; | |
| 58 // make this option somewhat user discoverable :-/ | |
| 59 window.location.href = MakeURL(params); | |
| 60 } | |
| 61 | |
| 62 var did_position_details = false; | |
| 63 | |
| 64 function units_for_trace() { | |
| 65 if ('trace' in params && params.trace.indexOf('vm-') == 0) { | |
| 66 return 'bytes' | |
| 67 } else if ('trace' in params && params.trace.indexOf('io-op') == 0) { | |
| 68 return 'times' | |
| 69 } else if ('trace' in params && params.trace.indexOf('io-byte') == 0) { | |
| 70 return 'KB' | |
| 71 } else { | |
| 72 return 'msec' | |
| 73 } | |
| 74 } | |
| 75 | |
| 76 function go_to(trace) { | |
| 77 params.trace = trace; | |
| 78 if (params.trace == '') | |
| 79 delete params.trace; | |
| 80 window.location.href = MakeURL(params); | |
| 81 } | |
| 82 | |
| 83 function on_clicked_plot(cl, value, fuzz, e) { | |
| 84 document.getElementById('view-change'). | |
| 85 setAttribute('src', Config.changeLinkPrefix + cl); | |
| 86 | |
| 87 document.getElementById('view-pages'). | |
| 88 setAttribute('src', 'details.html?cl=' + cl); | |
| 89 | |
| 90 if (!did_position_details) { | |
| 91 position_details(); | |
| 92 did_position_details = true; | |
| 93 } | |
| 94 } | |
| 95 | |
| 96 function received_summary(data) { | |
| 97 var dataGrid = [[],[]]; | |
| 98 var clNumbers = []; | |
| 99 var rows = data.split('\n'); | |
| 100 var max_rows = rows.length; | |
| 101 if (max_rows > params.history) | |
| 102 max_rows = params.history | |
| 103 var index = 0; | |
| 104 for (var i = 0; i < max_rows; ++i) { | |
| 105 // ignore ill-formatted data | |
| 106 if (rows[i].match(/[\d\.]+ [\d\.]+ [\d\.]+/) == null) | |
| 107 continue; | |
| 108 var cols = rows[i].split(' '); | |
| 109 | |
| 110 clNumbers.push(cols[0]) | |
| 111 if (cols.length == 3) { | |
| 112 dataGrid[0].push( [parseFloat(cols[1]), 0] ); | |
| 113 dataGrid[1].push( [parseFloat(cols[2]), 0] ); | |
| 114 } else { | |
| 115 dataGrid[0].push( [parseFloat(cols[1]), parseFloat(cols[2])] ); | |
| 116 dataGrid[1].push( [parseFloat(cols[3]), 0] ); | |
| 117 } | |
| 118 | |
| 119 index++; | |
| 120 } | |
| 121 | |
| 122 | |
| 123 dataGrid[0].reverse(); | |
| 124 dataGrid[1].reverse(); | |
| 125 clNumbers.reverse(); | |
| 126 | |
| 127 var output = document.getElementById("output"); | |
| 128 var plotter = new Plotter(clNumbers, dataGrid, [], units_for_trace(), | |
| 129 document.getElementById("output")); | |
| 130 plotter.onclick = on_clicked_plot; | |
| 131 plotter.plot(); | |
| 132 } | |
| 133 | |
| 134 function fetch_summary() { | |
| 135 if ('trace' in params) | |
| 136 file = "summary-" + escape(params.trace) + ".dat" | |
| 137 else | |
| 138 file = "summary.dat" | |
| 139 Fetch(file, received_summary); | |
| 140 } | |
| 141 | |
| 142 function position_details() { | |
| 143 var output = document.getElementById("output"); | |
| 144 | |
| 145 var win_height = window.innerHeight; | |
| 146 | |
| 147 var details = document.getElementById("views"); | |
| 148 | |
| 149 var views = document.getElementById("views"); | |
| 150 var selectors = document.getElementById("selectors"); | |
| 151 selectors.style.display = "block"; | |
| 152 | |
| 153 var views_width = output.offsetWidth - selectors.offsetWidth; | |
| 154 | |
| 155 views.style.border = "1px solid black"; | |
| 156 views.style.width = views_width + "px"; | |
| 157 views.style.height = (win_height - output.offsetHeight - output.offsetTop - 30
) + "px"; | |
| 158 | |
| 159 selectors.style.position = "absolute"; | |
| 160 selectors.style.left = (views.offsetLeft + views_width + 1) + "px"; | |
| 161 selectors.style.top = views.offsetTop + "px"; | |
| 162 | |
| 163 change_view("view-change"); | |
| 164 } | |
| 165 | |
| 166 function change_view(target) { | |
| 167 if (target == "view-change") { | |
| 168 document.getElementById("view-pages").style.display = "none"; | |
| 169 document.getElementById("view-change").style.display = "block"; | |
| 170 } else { | |
| 171 document.getElementById("view-change").style.display = "none"; | |
| 172 document.getElementById("view-pages").style.display = "block"; | |
| 173 } | |
| 174 } | |
| 175 | |
| 176 function init() { | |
| 177 fetch_summary(); | |
| 178 } | |
| 179 | |
| 180 window.addEventListener("load", init, false); | |
| 181 </script> | |
| 182 </head> | |
| 183 <body> | |
| 184 <p> | |
| 185 <div id="header_lookout" align="center"> | |
| 186 <font style='color: #0066FF; font-family: Arial, serif;font-size: 20pt; font-w
eight: bold;'> | |
| 187 <script>document.write(Config.title);</script> | |
| 188 </font> | |
| 189 </div> | |
| 190 <div id="header_text"> | |
| 191 Builds generated by the <a href="http://build.chromium.org/">BUILD TYPE</a> buil
d | |
| 192 slave are run through the | |
| 193 <script> | |
| 194 document.write('<a href="' + Config.sourceLink + '">' + Config.title + '</a>'); | |
| 195 </script> | |
| 196 and the results of that test are charted here. | |
| 197 </div> | |
| 198 </p> | |
| 199 <p style="font-size: 0.75em; font-style: italic; color: rgb(100,100,100)"> | |
| 200 <div id="explain"> | |
| 201 <script> | |
| 202 if ('trace' in params && params.trace == 'vm-peak-renderer') { | |
| 203 document.write( | |
| 204 "The vertical axis is the peak vm usage for the renderer process, and the " + | |
| 205 "horizontal axis is the change-list for the build being tested. The pink " + | |
| 206 "trace shows the results for the reference build.") | |
| 207 } else if ('trace' in params && params.trace == 'vm-peak-browser') { | |
| 208 document.write( | |
| 209 "The vertical axis is the peak vm usage for the browser process, and the " + | |
| 210 "horizontal axis is the change-list for the build being tested. The pink " + | |
| 211 "trace shows the results for the reference build.") | |
| 212 } else if ('trace' in params && params.trace == 'io-op-browser') { | |
| 213 document.write( | |
| 214 "This is an experimental page to track IO performance.") | |
| 215 } else if ('trace' in params && params.trace == 'io-byte-browser') { | |
| 216 document.write( | |
| 217 "This is an experimental page to track IO performance.") | |
| 218 } else { | |
| 219 document.write( | |
| 220 "The vertical axis is the time in milliseconds for the build to complete the
" + | |
| 221 "test, and the horizontal axis is the change-list for the build being " + | |
| 222 "tested. Vertical error bars correspond to standard deviation. The pink " + | |
| 223 "trace shows the results for the reference build.") | |
| 224 } | |
| 225 </script> | |
| 226 </div> | |
| 227 </p> | |
| 228 <div id="switcher"> | |
| 229 <a onclick="go_to('')">page-load-time</a> | |
| 230 <a onclick="go_to('vm-peak-browser')">vm-peak-browser</a> | |
| 231 <a onclick="go_to('vm-peak-renderer')">vm-peak-renderer</a> | |
| 232 <a onclick="go_to('io-op-browser')">io-op-browser</a> | |
| 233 <a onclick="go_to('io-byte-browser')">io-byte-browser</a> | |
| 234 </div> | |
| 235 <div id="output"></div> | |
| 236 <div id="details"> | |
| 237 <div id="views"> | |
| 238 <iframe id="view-change"></iframe> | |
| 239 <iframe id="view-pages"></iframe> | |
| 240 </div> | |
| 241 <div id="selectors"> | |
| 242 <div class="selector" onclick="change_view('view-change')">CL</div> | |
| 243 <div style="border-top: none" class="selector" onclick="change_view('view-pa
ges')">Pages</div> | |
| 244 </div> | |
| 245 </div> | |
| 246 <pre id="log"></pre> | |
| 247 | |
| 248 <script> | |
| 249 if ('lookout' in params) { | |
| 250 switcher.style.display = "none"; | |
| 251 details.style.display = "none"; | |
| 252 header_text.style.display = "none"; | |
| 253 explain.style.display = "none"; | |
| 254 selection.style.display = "none"; | |
| 255 } else { | |
| 256 document.getElementById("header_lookout").style.display = "none"; | |
| 257 } | |
| 258 </script> | |
| 259 </body> | |
| 260 </html> | |
| OLD | NEW |