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

Side by Side Diff: Tools/GardeningServer/model/ct-failure-group.html

Issue 557173002: Some perf improvements to sheriff-o-matics updates. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months 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 | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved. 2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 -->
6 6
7 <link rel="import" href="ct-commit-list.html"> 7 <link rel="import" href="ct-commit-list.html">
8 8
9 <script> 9 <script>
10 function CTFailureGroup(key, data) { 10 function CTFailureGroup(key, data) {
(...skipping 29 matching lines...) Expand all
40 40
41 CTFailureGroup.prototype.clearBug = function(bug) { 41 CTFailureGroup.prototype.clearBug = function(bug) {
42 return this._annotate({ 42 return this._annotate({
43 bug: undefined, 43 bug: undefined,
44 }); 44 });
45 }; 45 };
46 46
47 CTFailureGroup.prototype._failedOnce = function() { 47 CTFailureGroup.prototype._failedOnce = function() {
48 var totalFailures = 0; 48 var totalFailures = 0;
49 for (var i = 0; i < this.data.dataToExamine().length; i++) { 49 for (var i = 0; i < this.data.dataToExamine().length; i++) {
50 var resultNodes = this.data.dataToExamine()[i].resultNodesByBuilder; 50 var resultNodes = this.data.dataToExamine()[i].resultNodesByBuilder;
esprehn 2014/09/10 02:40:23 What does dataToExamine() do? Calling it repeatedl
ojan 2014/09/10 03:41:18 Yeah, this isn't right. Particularly, this concept
51 Object.keys(resultNodes, function(r) { 51 for (var r in resultNodes) {
52 totalFailures += resultNodes[r].failingBuildCount; 52 totalFailures += resultNodes[r].failingBuildCount;
53 if (totalFailures > 1) 53 if (totalFailures > 1)
54 return false; 54 return false;
55 }.bind(this)); 55 }
56 } 56 }
57 return totalFailures == 1; 57 return totalFailures == 1;
esprehn 2014/09/10 02:40:23 This can just return true right? If you got here y
ojan 2014/09/10 03:41:18 Technically it's possible to have no failures in t
58 } 58 }
59 59
60 CTFailureGroup.prototype._computeProperties = function() { 60 CTFailureGroup.prototype._computeProperties = function() {
61 this.isSnoozed = Date.now() < this._annotation.snoozeTime; 61 this.isSnoozed = Date.now() < this._annotation.snoozeTime;
62 if (this.isSnoozed) { 62 if (this.isSnoozed) {
63 this.category = 'snoozed'; 63 this.category = 'snoozed';
64 } else { 64 } else {
65 if (this._failedOnce()) { 65 if (this._failedOnce()) {
66 this.category = 'failedOnce'; 66 this.category = 'failedOnce';
67 } else { 67 } else {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }.bind(this)); 126 }.bind(this));
127 }; 127 };
128 128
129 CTFailureGroup.fetchAnnotations = function() { 129 CTFailureGroup.fetchAnnotations = function() {
130 // FIXME: Fetch annotations from frontend. 130 // FIXME: Fetch annotations from frontend.
131 var stored = localStorage.CTFailureGroupAnnotations; 131 var stored = localStorage.CTFailureGroupAnnotations;
132 var annotations = stored ? JSON.parse(stored) : {}; 132 var annotations = stored ? JSON.parse(stored) : {};
133 return Promise.resolve(annotations); 133 return Promise.resolve(annotations);
134 }; 134 };
135 </script> 135 </script>
OLDNEW
« Tools/GardeningServer/model/ct-failure.html ('K') | « Tools/GardeningServer/model/ct-failure.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698