Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: appengine/findit/templates/flake/result.html

Issue 2563383002: [Findit] Flake Checker: Extract commit position and git hash and display to UI for each analyzed bu… (Closed)
Patch Set: Fixing nit Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <meta charset="UTF-8"> 3 <meta charset="UTF-8">
4 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> 4 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
5 <title> Analysis of Flaky Test</title> 5 <title> Analysis of Flaky Test</title>
6 <style type="text/css"> 6 <style type="text/css">
7 .container { 7 .container {
8 box-sizing: border-box; 8 box-sizing: border-box;
9 width: 600px; 9 width: 600px;
10 height: 300px; 10 height: 300px;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 function DrawFlakeTrend() { 80 function DrawFlakeTrend() {
81 if (findit.passRates.length == 0) { 81 if (findit.passRates.length == 0) {
82 $('#flake-data').html('No data available yet.'); 82 $('#flake-data').html('No data available yet.');
83 return; 83 return;
84 } 84 }
85 85
86 var not_run_data = []; 86 var not_run_data = [];
87 var run_data = []; 87 var run_data = [];
88 $.each(findit.passRates, function(index, value) { 88 $.each(findit.passRates, function(index, value) {
89 // Convert pass rate from [0, 1] to a percentage. 89 // Convert pass rate from [0, 1] to a percentage. Include information ab out each point in the format:
90 var rate = (value[1] * 100).toFixed(0); 90 // [this build commit position, pass rate, swarming task url, build numb er,
91 // -1 means that the test doesn't exist or is disabled at the build. 91 // this build's git hash, previous build's commit position,
92 if (rate < 0) { 92 // previous build's git hash].
93 not_run_data.push([value[0], 100, value[2]]); 93 var pass_rate = (value[1] * 100).toFixed(0);
94
95 if (pass_rate < 0) {
96 // -1 means that the test doesn't exist or is disabled at the build.
97 // We consider that a 100% pass rate.
98 not_run_data.push([value[0], 100, value[2], value[3], value[4], value[ 5], value[6]]);
94 } else { 99 } else {
95 run_data.push([value[0], rate, value[2]]); 100 run_data.push([value[0], pass_rate, value[2], value[3], value[4], valu e[5], value[6]]);
96 } 101 }
97 }); 102 });
98 103
99 var data_series = []; 104 var data_series = [];
100 var run_data_sery_index = 0; 105 var run_data_sery_index = 0;
101 if (not_run_data.length > 0) { 106 if (not_run_data.length > 0) {
102 data_series.push({ 107 data_series.push({
103 data: not_run_data, 108 data: not_run_data,
104 color: "gray", 109 color: "gray",
105 points: { 110 points: {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 position: "absolute", 164 position: "absolute",
160 display: "none", 165 display: "none",
161 border: "1px solid #fdd", 166 border: "1px solid #fdd",
162 padding: "2px", 167 padding: "2px",
163 "background-color": "#fee", 168 "background-color": "#fee",
164 opacity: 0.80 169 opacity: 0.80
165 }).appendTo("body"); 170 }).appendTo("body");
166 171
167 function showTooltipForDataPoint(item) { 172 function showTooltipForDataPoint(item) {
168 var itemData = item.series.data[item.dataIndex]; 173 var itemData = item.series.data[item.dataIndex];
169 var buildNumber = itemData[0]; 174 var thisBuildCommitPosition = itemData[0];
170 var passRate = itemData[1]; 175 var passRate = itemData[1];
171 var swarmingTaskId = itemData[2]; 176 var swarmingTaskId = itemData[2];
177 var buildNumber = itemData[3];
178 var thisBuildGitHash = itemData[4];
179 var previousBuildCommitPosition = itemData[5];
180 var previousBuildGitHash = itemData[6];
172 181
173 var tooltipStr = 'Build #: <a href="https://build.chromium.org/p/' + fin dit.masterName + '/builders/' + findit.builderName + '/builds/' + buildNumber + '" target="_blank">' + buildNumber + '</a><br> Pass rate: ' + passRate + '%'; 182 var tooltipStr = 'Pass rate: ' + passRate + '%';
183
184 if (previousBuildCommitPosition && previousBuildGitHash && thisBuildComm itPosition && thisBuildGitHash) {
185 tooltipStr += '<br>Range: <a href="https://crrev.com/' + previousBuild GitHash + '..' + thisBuildGitHash + '"target="_blank">' + previousBuildCommitPos ition + ':' + thisBuildCommitPosition + '</a>';
186 } else if (thisBuildCommitPosition && thisBuildGitHash) {
187 // Previous information not available, so only show this build.
188 tooltipStr += '<br>Range: <a href="https://crrev.com/' + thisBuildGitH ash + '" "target="_blank">' + thisBuildCommitPosition + '</a>';
189 }
190
191 tooltipStr += '<br>Build #: <a href="https://build.chromium.org/p/' + fi ndit.masterName + '/builders/' + findit.builderName + '/builds/' + buildNumber + '" target="_blank">' + buildNumber + '</a>';
192
174 if (swarmingTaskId) { 193 if (swarmingTaskId) {
175 tooltipStr += '<br>Swarming Task: <a href="https://chromium-swarm.apps pot.com/task?id=' + swarmingTaskId + '" target="_blank">' + swarmingTaskId +'</a >'; 194 tooltipStr += '<br>Swarming Task: <a href="https://chromium-swarm.apps pot.com/task?id=' + swarmingTaskId + '" target="_blank">' + swarmingTaskId +'</a >';
176 } else { 195 } else {
177 tooltipStr += '<br>Swarming Task: N/A'; 196 tooltipStr += '<br>Swarming Task: N/A';
178 } 197 }
179 198
180 $("#tooltip").html(tooltipStr).css({top: item.pageY + 5, left: item.page X + 5}).show(); 199 $("#tooltip").html(tooltipStr).css({top: item.pageY + 5, left: item.page X + 5}).show();
181 } 200 }
182 201
183 var dataPointSelected = false; 202 var dataPointSelected = false;
184 $("#flake-data").bind("plothover", function (event, pos, item) { 203 $("#flake-data").bind("plothover", function(event, pos, item) {
185 if (dataPointSelected) 204 if (dataPointSelected)
186 return; // A data point is selected due to a click. 205 return; // A data point is selected due to a click.
187 206
188 if (item) { 207 if (item) {
189 showTooltipForDataPoint(item); 208 showTooltipForDataPoint(item);
190 } else { 209 } else {
191 $("#tooltip").hide(); 210 $("#tooltip").hide();
192 } 211 }
193 }); 212 });
194 $("#flake-data").bind("plotclick", function (event, pos, item) { 213 $("#flake-data").bind("plotclick", function(event, pos, item) {
195 if (item) { 214 if (item) {
196 dataPointSelected = true; // Set selected data point upon click. 215 dataPointSelected = true; // Set selected data point upon click.
197 showTooltipForDataPoint(item); 216 showTooltipForDataPoint(item);
198 } else { 217 } else {
199 dataPointSelected = false; // Unselect the data point. 218 dataPointSelected = false; // Unselect the data point.
200 $("#tooltip").hide(); 219 $("#tooltip").hide();
201 } 220 }
202 }); 221 });
203 222
204 $.each(run_data, function(index, value) { 223 $.each(run_data, function(index, value) {
205 if (value[0] == findit.regressedBuildNumber) 224 if (value[3] == findit.regressedBuildNumber) {
225 // value[3] contains the build number.
206 plot.highlight(run_data_sery_index, index); 226 plot.highlight(run_data_sery_index, index);
227 }
207 }); 228 });
208 } 229 }
209 230
210 function triageSuspectedFlake(e) { 231 function triageSuspectedFlake(e) {
211 $.getJSON(createTriageUrl(getTriageParameters(e.value)), function(data) { 232 $.getJSON(createTriageUrl(getTriageParameters(e.value)), function(data) {
212 if (! data['success']) { 233 if (! data['success']) {
213 alert('Failed to update datastore. Please refresh and try again.'); 234 alert('Failed to update datastore. Please refresh and try again.');
214 } else { 235 } else {
215 $('#flake_result_triaged').html('Result has been recorded. Thank you.' ) 236 $('#flake_result_triaged').html('Result has been recorded. Thank you.' )
216 } 237 }
(...skipping 15 matching lines...) Expand all
232 Test: {{ test_name }} <br> 253 Test: {{ test_name }} <br>
233 </div> 254 </div>
234 <br> 255 <br>
235 <div> 256 <div>
236 <b>Analysis Result:</b><br> 257 <b>Analysis Result:</b><br>
237 Status: {{ analysis_status }}<br> 258 Status: {{ analysis_status }}<br>
238 {% if error %} 259 {% if error %}
239 Error info: {{ error }}<br> 260 Error info: {{ error }}<br>
240 {% endif %} 261 {% endif %}
241 {% if suspected_flake.build_number %} 262 {% if suspected_flake.build_number %}
242 Flakiness <b>started</b> in Build: <a href="https://build.chromium.org/p/{{ master_name }}/builders/{{ builder_name }}/builds/{{ suspected_flake.build_numbe r }}" target="_blank" style="color:red;font-weight:bold">{{ suspected_flake.buil d_number }}</a> 263 Flakiness <b>started</b> in Build: <a href="https://build.chromium.org/p/{ { master_name }}/builders/{{ builder_name }}/builds/{{ suspected_flake.build_num ber }}" target="_blank" style="color:red;font-weight:bold">{{ suspected_flake.bu ild_number }}</a>
243 {% endif %} 264 {% endif %}
265 {% if suspected_flake.commit_position and suspected_flake.git_hash %}
266 <br>
267 Regression Range: <a href="https://crrev.com/{{ suspected_flake.previous_b uild_git_hash }}..{{ suspected_flake.git_hash }}" target="_blank" style="color:r ed;font-weight:bold">{{ suspected_flake.previous_build_commit_position }}:{{ sus pected_flake.commit_position }}</a>
268 <br>
269 {% endif %}
270
244 </div> 271 </div>
245 <br> 272 <br>
246 <div> 273 <div>
247 <b>Pass Rate by Build:</b><br> 274 <b>Pass Rate by Commit:</b><br>
248 <div class="container"> 275 <div class="container">
249 <div id="flake-data" class="flake-trend"></div> 276 <div id="flake-data" class="flake-trend"></div>
250 </div> 277 </div>
251 </div> 278 </div>
252 <br> 279 <br>
253 <div> 280 <div>
254 <b>Metadata:</b><br> 281 <b>Metadata:</b><br>
255 Test rerun: {{ iterations_to_rerun }} times<br> 282 Test rerun: {{ iterations_to_rerun }} times<br>
256 {% if request_time %} 283 {% if request_time %}
257 Request time: {{ request_time }}<br> 284 Request time: {{ request_time }}<br>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 <td class="triage-cell">{{ triage_record.triage_result }}</td> 341 <td class="triage-cell">{{ triage_record.triage_result }}</td>
315 <td class="triage-cell">{{ triage_record.version_number }}</td> 342 <td class="triage-cell">{{ triage_record.version_number }}</td>
316 </tr> 343 </tr>
317 {% endfor %} 344 {% endfor %}
318 </tbody> 345 </tbody>
319 </table> 346 </table>
320 </div> 347 </div>
321 {% endif %} 348 {% endif %}
322 </body> 349 </body>
323 </html> 350 </html>
OLDNEW
« no previous file with comments | « appengine/findit/model/flake/master_flake_analysis.py ('k') | appengine/findit/waterfall/build_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698