From: loislo@chromium.org Date: Mon, 18 Jun 2012 19:53:38 +0000 (+0000) Subject: Web Inspector: native memory snapshot performance and coverage test implementation. X-Git-Tag: 070512121124~1226 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91b10edceeaabc1ea1b4ef309450350bdf2baca7;p=profile%2Fivi%2Fwebkit-efl.git Web Inspector: native memory snapshot performance and coverage test implementation. https://bugs.webkit.org/show_bug.cgi?id=89363 We have to track the performance of MemoryAgent.getProcessMemoryDistribution. Also this test will work as a burn down chart for Unknown memory metric. Reviewed by Pavel Feldman. * inspector/native-memory-snapshot.html: Added. * inspector/performance-test.js: (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer): (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype.reportSize): (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype._dump): (initialize_TimeTracker.InspectorTest.runPerformanceTest): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120618 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog index e3a8298..efb587b 100644 --- a/PerformanceTests/ChangeLog +++ b/PerformanceTests/ChangeLog @@ -1,3 +1,20 @@ +2012-06-18 Ilya Tikhonovsky + + Web Inspector: native memory snapshot performance and coverage test implementation. + https://bugs.webkit.org/show_bug.cgi?id=89363 + + We have to track the performance of MemoryAgent.getProcessMemoryDistribution. + Also this test will work as a burn down chart for Unknown memory metric. + + Reviewed by Pavel Feldman. + + * inspector/native-memory-snapshot.html: Added. + * inspector/performance-test.js: + (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer): + (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype.reportSize): + (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype._dump): + (initialize_TimeTracker.InspectorTest.runPerformanceTest): + 2012-06-05 Alexei Filippov Web Inspector: serialize edge counts instead of indexes in heap snapshot diff --git a/PerformanceTests/inspector/native-memory-snapshot.html b/PerformanceTests/inspector/native-memory-snapshot.html new file mode 100644 index 0000000..2ae05ba --- /dev/null +++ b/PerformanceTests/inspector/native-memory-snapshot.html @@ -0,0 +1,60 @@ + + + + + + + +
+
+ + diff --git a/PerformanceTests/inspector/performance-test.js b/PerformanceTests/inspector/performance-test.js index fbb5ec2..fec1dd3 100644 --- a/PerformanceTests/inspector/performance-test.js +++ b/PerformanceTests/inspector/performance-test.js @@ -7,6 +7,7 @@ InspectorTest.runPerformanceTest = function(perfTest, executeTime, callback) this._callback = callback; this._test = test; this._times = {}; + this._sizes = {}; this._testStartTime = new Date(); this._heapSizeDeltas = []; this._jsHeapSize = this._getJSHeapSize(); @@ -26,6 +27,13 @@ InspectorTest.runPerformanceTest = function(perfTest, executeTime, callback) this._times[cookie.name].push(endTime - cookie.startTime); }, + reportSize: function(name, size) + { + if (!this._sizes[name]) + this._sizes[name] = []; + this._sizes[name].push(size); + }, + _getJSHeapSize: function() { if (window.gc) { @@ -75,6 +83,9 @@ InspectorTest.runPerformanceTest = function(perfTest, executeTime, callback) for (var testName in this._times) InspectorTest.dumpTestStats(groupName, testName, this._times[testName], "ms"); + for (var testName in this._sizes) + InspectorTest.dumpTestStats(groupName, testName, this._sizes[testName], "kB", 1024); + var url = WebInspector.inspectedPageURL; var regExp = /([^\/]+)\.html/; var matches = regExp.exec(url);