Changeset 96209 in webkit
- Timestamp:
- Sep 28, 2011 2:30:27 AM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r96208 r96209 1 2011-09-28 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: UI performance test for Inspector start-up time is required. 4 https://bugs.webkit.org/show_bug.cgi?id=68986 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/performance/resources/inspector-startup-time.html: Added. 9 * inspector/performance/resources/performance-test.js: 10 (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype._dump): 11 (initialize_TimeTracker.InspectorTest.runPerformanceTest): 12 1 13 2011-09-28 Kentaro Hara <haraken@chromium.org> 2 14 -
trunk/LayoutTests/inspector/performance/resources/performance-test.js
r96114 r96209 68 68 { 69 69 for (var testName in this._times) 70 this._dumpTestStats(testName, this._times[testName]);70 InspectorTest.dumpTestStats(testName, this._times[testName]); 71 71 72 72 var url = WebInspector.mainResource._documentURL; 73 73 var regExp = /([^\/]+)\.html/; 74 74 var matches = regExp.exec(url); 75 this._dumpTestStats("heap-delta-kb-" + matches[1], this._heapSizeDeltas, 1024);75 InspectorTest.dumpTestStats("heap-delta-kb-" + matches[1], this._heapSizeDeltas, 1024); 76 76 }, 77 77 78 _dumpTestStats: function(testName, samples, divider)79 {80 divider = divider || 1;81 var stripNResults = Math.floor(samples.length / 10);82 samples.sort(function(a, b) { return a - b; });83 var sum = 0;84 for (var i = stripNResults; i < samples.length - stripNResults; ++i)85 sum += samples[i];86 InspectorTest.addResult("* " + testName + ": " + Math.floor(sum / (samples.length - stripNResults * 2) / divider));87 InspectorTest.addResult(testName + " min/max/count: " + Math.floor(samples[0] / divider) + "/" + Math.floor(samples[samples.length-1] / divider) + "/" + samples.length);88 }89 78 } 90 79 91 80 var timer = new Timer(perfTest, callback); 92 81 timer._runTest(); 82 } 83 84 InspectorTest.dumpTestStats = function(testName, samples, divider) 85 { 86 divider = divider || 1; 87 var stripNResults = Math.floor(samples.length / 10); 88 samples.sort(function(a, b) { return a - b; }); 89 var sum = 0; 90 for (var i = stripNResults; i < samples.length - stripNResults; ++i) 91 sum += samples[i]; 92 InspectorTest.addResult("* " + testName + ": " + Math.floor(sum / (samples.length - stripNResults * 2) / divider)); 93 InspectorTest.addResult(testName + " min/max/count: " + Math.floor(samples[0] / divider) + "/" + Math.floor(samples[samples.length-1] / divider) + "/" + samples.length); 93 94 } 94 95
Note: See TracChangeset
for help on using the changeset viewer.