Changeset 89839 in webkit
- Timestamp:
- Jun 27, 2011 11:28:05 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js
r89838 r89839 26 26 function LayoutTestHistoryAnalyzer(builder) { 27 27 this._builder = builder; 28 this._ cache= {};28 this._history = {}; 29 29 this._loader = new LayoutTestResultsLoader(builder); 30 30 } … … 56 56 */ 57 57 start: function(callback) { 58 var cacheKey = '_startFetchingBuildHistory';59 if (!(cacheKey in this._cache))60 this._cache[cacheKey] = {};61 62 var history = this._cache[cacheKey];63 64 58 var self = this; 65 59 self._builder.getBuildNames(function(buildNames) { 66 60 function inner(buildIndex) { 67 self._incorporateBuildHistory(buildNames, buildIndex, history,function(callAgain) {61 self._incorporateBuildHistory(buildNames, buildIndex, function(callAgain) { 68 62 var nextIndex = buildIndex + 1; 69 63 if (nextIndex >= buildNames.length) 70 64 callAgain = false; 71 callback( history, callAgain);65 callback(self._history, callAgain); 72 66 if (!callAgain) 73 67 return; … … 79 73 }, 80 74 81 _incorporateBuildHistory: function(buildNames, buildIndex, history,callback) {82 var previousBuildName = Object.keys( history).last();75 _incorporateBuildHistory: function(buildNames, buildIndex, callback) { 76 var previousBuildName = Object.keys(this._history).last(); 83 77 var nextBuildName = buildNames[buildIndex]; 84 78 85 this._loader.start(nextBuildName, function(tests, tooManyFailures) { 86 history[nextBuildName] = { 79 var self = this; 80 self._loader.start(nextBuildName, function(tests, tooManyFailures) { 81 self._history[nextBuildName] = { 87 82 tooManyFailures: tooManyFailures, 88 83 tests: {}, … … 91 86 for (var testName in tests) { 92 87 if (previousBuildName) { 93 if (!(testName in history[previousBuildName].tests))88 if (!(testName in self._history[previousBuildName].tests)) 94 89 continue; 95 delete history[previousBuildName].tests[testName];90 delete self._history[previousBuildName].tests[testName]; 96 91 } 97 history[nextBuildName].tests[testName] = tests[testName];92 self._history[nextBuildName].tests[testName] = tests[testName]; 98 93 } 99 94 100 callback(Object.keys( history[nextBuildName].tests).length);95 callback(Object.keys(self._history[nextBuildName].tests).length); 101 96 }, 102 97 function(tests) { -
trunk/Tools/ChangeLog
r89838 r89839 1 2011-06-26 Adam Roben <aroben@apple.com> 2 3 Store analyzed history directly in LayoutTestHistoryAnalyzer instead of in a generic cache 4 5 It seems silly to have a whole generic cache just to store a single object. 6 7 Fixes <http://webkit.org/b/63407> LayoutTestHistoryAnalyzer has a generic cache but doesn't 8 need one 9 10 Reviewed by Anders Carlsson. 11 12 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestHistoryAnalyzer.js: 13 (LayoutTestHistoryAnalyzer): Replaced this._cache with this._history. 14 (LayoutTestHistoryAnalyzer.prototype.start): Ditto. 15 (LayoutTestHistoryAnalyzer.prototype._incorporateBuildHistory): Ditto, and removed the 16 no-longer-needed history argument. 17 1 18 2011-06-26 Adam Roben <aroben@apple.com> 2 19
Note: See TracChangeset
for help on using the changeset viewer.