Web Inspector: Get rid of native-memory-snapshot in performance test
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2013 14:03:57 +0000 (14:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2013 14:03:57 +0000 (14:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116013

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-13
Reviewed by Andreas Kling.

Remove native-memory-snapshot.html from PerformanceTests.

* inspector/native-memory-snapshot.html: Removed.
* inspector/performance-test.js:
(initialize_TimeTracker.Timer):
(initialize_TimeTracker.Timer.prototype._dump):
(initialize_TimeTracker.InspectorTest.runPerformanceTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/inspector/native-memory-snapshot.html [deleted file]
PerformanceTests/inspector/performance-test.js

index b5687f2..95053b3 100644 (file)
@@ -1,3 +1,18 @@
+2013-05-13  Seokju Kwon  <seokju.kwon@gmail.com>
+
+        Web Inspector: Get rid of native-memory-snapshot in performance test
+        https://bugs.webkit.org/show_bug.cgi?id=116013
+
+        Reviewed by Andreas Kling.
+
+        Remove native-memory-snapshot.html from PerformanceTests.
+
+        * inspector/native-memory-snapshot.html: Removed.
+        * inspector/performance-test.js:
+        (initialize_TimeTracker.Timer):
+        (initialize_TimeTracker.Timer.prototype._dump):
+        (initialize_TimeTracker.InspectorTest.runPerformanceTest):
+
 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
 
         Mass remove all the empty directories
diff --git a/PerformanceTests/inspector/native-memory-snapshot.html b/PerformanceTests/inspector/native-memory-snapshot.html
deleted file mode 100644 (file)
index 38653a7..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<html>
-<head>
-  <style type="text/css">
-    span {
-      color:red;
-      width: 100px;
-      height: 20px;
-    }
-    div {
-      color:blue;
-      width: 50px;
-      height: 10px;
-    }
-  </style>
-  <script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
-  <script src="performance-test.js"></script>
-<script>
-
-function test()
-{
-    function performanceTest(timer)
-    {
-        var testName = /([^\/]+)\.html$/.exec(WebInspector.inspectedPageURL)[1];
-        var takeTimerCookie = timer.start("take");
-        MemoryAgent.getProcessMemoryDistribution(dump);
-
-        function dump(e, data)
-        {
-            timer.finish(takeTimerCookie);
-            function reportSize(data)
-            {
-                timer.reportSize(data.name, data.size);
-                if (data.children) {
-                    for (var i = 0; i < data.children.length; ++i)
-                        reportSize(data.children[i]);
-                }
-            }
-            reportSize(data);
-            var knownSize = 0;
-            for (var i = 0; i < data.children.length; ++i)
-                knownSize += data.children[i].size;
-            timer.reportSize("Unknown", data.size - knownSize);
-            timer.done(testName);
-        }
-    }
-
-    InspectorTest.runPerformanceTest(performanceTest, 2000);
-}
-
-function createDOMTree(elementsCount)
-{
-    var root = document.getElementById("testTreeRoot");
-
-    for (var i = 0; i < elementsCount; ++i) {
-        var span = document.createElement("span");
-        span.id = "span_" + i;
-        span.style.width = "10px";
-        root.appendChild(span);
-    }
-
-    for (var i = 0; i < elementsCount; ++i)
-        root.appendChild(document.createElement("div"));
-
-    for (var i = 0; i < elementsCount; ++i)
-        root.appendChild(document.createElement("a"));
-}
-
-setTimeout(createDOMTree.bind(null,1000), 0);
-
-</script>
-</head>
-<body onload="runTest()">
-  <div id="testTreeRoot">
-  </div>
-</body>
-</html>
index fec1dd3..fbb5ec2 100644 (file)
@@ -7,7 +7,6 @@ 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();
@@ -27,13 +26,6 @@ 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) {
@@ -83,9 +75,6 @@ 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);