Changeset 90165 in webkit
- Timestamp:
- Jun 30, 2011, 2:49:42 PM (15 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js
r90120 r90165 58 58 }, 59 59 60 getBuildNames: function(callback) { 61 this._getBuildNamesFromResultsDirectory(this.buildbot.baseURL + 'results/' + this.name, callback); 62 }, 63 60 64 getMostRecentCompletedBuildNumber: function(callback) { 61 65 var cacheKey = 'getMostRecentCompletedBuildNumber'; … … 147 151 }, 148 152 153 getOldBuildNames: function(callback) { 154 this._getBuildNamesFromResultsDirectory(this.buildbot.baseURL + 'old-results/' + this.name, callback); 155 }, 156 149 157 resultsDirectoryURL: function(buildName) { 150 158 return this.buildbot.resultsDirectoryURL(this.name, buildName); … … 170 178 }, 171 179 172 getBuildNames: function(callback) {173 var cacheKey = '_getBuildNames ';180 _getBuildNamesFromResultsDirectory: function(directoryURL, callback) { 181 var cacheKey = '_getBuildNamesFromResultsDirectory.' + directoryURL; 174 182 if (cacheKey in this._cache) { 175 183 callback(this._cache[cacheKey]); … … 193 201 } 194 202 195 getResource(self.buildbot.baseURL + 'results/' + self.name, function(xhr) { 196 // FIXME: It would be better for performance if we could avoid loading old-results until needed. 197 getResource(self.buildbot.baseURL + 'old-results/' + self.name, function(oldXHR) { 198 var buildNames = buildNamesFromDirectoryXHR(xhr).concat(buildNamesFromDirectoryXHR(oldXHR)); 199 self._cache[cacheKey] = buildNames; 200 callback(buildNames); 201 }); 203 getResource(directoryURL, function(xhr) { 204 var buildNames = buildNamesFromDirectoryXHR(xhr); 205 self._cache[cacheKey] = buildNames; 206 callback(buildNames); 202 207 }); 203 208 }, -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js
r90114 r90165 70 70 var self = this; 71 71 self._builder.getBuildNames(function(buildNames) { 72 function inner(buildIndex) { 73 self._incorporateBuildHistory(buildNames, buildIndex, function(callAgain) { 74 var nextIndex = buildIndex + 1; 75 if (nextIndex >= buildNames.length) 76 callAgain = false; 77 var data = { 78 history: self._history, 79 possiblyFlaky: {}, 80 }; 81 self._flakinessDetector.possiblyFlakyTests.forEach(function(testName) { 82 data.possiblyFlaky[testName] = self._flakinessDetector.flakinessExamples(testName); 83 }); 84 var callbackRequestedStop = !callback(data, callAgain); 85 if (callbackRequestedStop || !callAgain) 86 return; 87 setTimeout(function() { inner(nextIndex) }, 0); 72 self._analyzeBuilds(buildNames, callback, function() { 73 self._builder.getOldBuildNames(function(oldBuildNames) { 74 self._analyzeBuilds(oldBuildNames, callback); 88 75 }); 89 } 90 inner(0); 76 }); 91 77 }); 78 }, 79 80 _analyzeBuilds: function(buildNames, callback, analyzedAllBuildsCallback) { 81 var self = this; 82 function inner(buildIndex) { 83 self._incorporateBuildHistory(buildNames, buildIndex, function(callAgain) { 84 var data = { 85 history: self._history, 86 possiblyFlaky: {}, 87 }; 88 self._flakinessDetector.possiblyFlakyTests.forEach(function(testName) { 89 data.possiblyFlaky[testName] = self._flakinessDetector.flakinessExamples(testName); 90 }); 91 92 var nextIndex = buildIndex + 1; 93 var analyzedAllBuilds = nextIndex >= buildNames.length; 94 var haveMoreDataToFetch = !analyzedAllBuilds || analyzedAllBuildsCallback; 95 96 var callbackRequestedStop = !callback(data, haveMoreDataToFetch); 97 if (callbackRequestedStop) 98 return; 99 100 if (analyzedAllBuilds) { 101 if (analyzedAllBuildsCallback) 102 analyzedAllBuildsCallback(); 103 return; 104 } 105 106 setTimeout(function() { inner(nextIndex) }, 0); 107 }); 108 } 109 inner(0); 92 110 }, 93 111 -
trunk/Tools/ChangeLog
r90163 r90165 1 2011-06-30 Adam Roben <aroben@apple.com> 2 3 Make TestFaiulres only load old-results directories as needed 4 5 Fixes <http://webkit.org/b/63752> Tester pages on TestFailures page load very slowly 6 7 Reviewed by Anders Carlsson. 8 9 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js: 10 (Builder.prototype.getBuildNames): Moved up into the API section of the class. Now just 11 calls through to _getBuildNamesFromResultsDirectory. 12 (Builder.prototype.getOldBuildNames): Added. Just calls through to 13 _getBuildNamesFromResultsDirectory. 14 (Builder.prototype._getBuildNamesFromResultsDirectory): Renamed from getBuildNames. Now 15 takes the directory URL as an argument and only fetches that single URL. 16 17 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js: 18 (LayoutTestHistoryAnalyzer.prototype.start): Moved most logic to _analyzeBuilds. First 19 analyzes builds from Builder.getBuildNames, then from Builder.getOldBuildNames if needed. 20 (LayoutTestHistoryAnalyzer.prototype._analyzeBuilds): Moved logic here from start. (Most 21 changes are just indentation.) Now takes a callback to call when we've finished analyzing 22 all builds in buildNames so that we can try to fetch more build names if needed. 23 1 24 2011-06-30 Mark Rowe <mrowe@apple.com> 2 25
Note:
See TracChangeset
for help on using the changeset viewer.