Commit ce185596 authored by rniwa@webkit.org's avatar rniwa@webkit.org

Web Inspector: tests in PerformanceTests/inspector/ are timing out

https://bugs.webkit.org/show_bug.cgi?id=77024

Reviewed by Andreas Kling.

PerformanceTests:

These tests have been disabled for ages and don't conform to the standard format.

* Skipped:
* inspector: Removed.
* inspector/console-300-lines.html: Removed.
* inspector/first-open-elements.html: Removed.
* inspector/first-open-resources.html: Removed.
* inspector/first-open-scripts.html.broken: Removed.
* inspector/heap-snapshot-advanced.html: Removed.
* inspector/heap-snapshot-performance-test.js: Removed.
* inspector/heap-snapshot.html: Removed.
* inspector/inspector-startup-time.html: Removed.
* inspector/network-append-30-requests.html.broken: Removed.
* inspector/performance-test.js: Removed.
* inspector/show-panel.html.broken: Removed.

Tools:

Remove inspector performance tests since they have been disabled for ages,
and they don't use the standard parser-style performance output.

It's adding a lot of code complexity to our infrastructure.

* Scripts/webkitpy/performance_tests/perftest.py:
(SingleProcessPerfTest.__init__):
(PerfTestFactory):
* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(TestPerfTestFactory.test_regular_test):
* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(TestDriver.run_test):
(MainTest.run_test):
(MainTest._tests_for_runner):
(MainTest.test_run_test_set_kills_drt_per_run):
(MainTest._test_run_with_json_output):
(MainTest):
(MainTest.test_run_with_upload_json_should_generate_perf_webkit_json):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 003c8f96
2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
Web Inspector: tests in PerformanceTests/inspector/ are timing out
https://bugs.webkit.org/show_bug.cgi?id=77024
Reviewed by Andreas Kling.
These tests have been disabled for ages and don't conform to the standard format.
* Skipped:
* inspector: Removed.
* inspector/console-300-lines.html: Removed.
* inspector/first-open-elements.html: Removed.
* inspector/first-open-resources.html: Removed.
* inspector/first-open-scripts.html.broken: Removed.
* inspector/heap-snapshot-advanced.html: Removed.
* inspector/heap-snapshot-performance-test.js: Removed.
* inspector/heap-snapshot.html: Removed.
* inspector/inspector-startup-time.html: Removed.
* inspector/network-append-30-requests.html.broken: Removed.
* inspector/performance-test.js: Removed.
* inspector/show-panel.html.broken: Removed.
2013-05-27 Benjamin Poulain <benjamin@webkit.org>
Add a balanced benchmark for QuerySelector
......
......@@ -62,9 +62,6 @@ Dromaeo/v8-earley-boyer.html
Dromaeo/v8-raytrace.html
Dromaeo/v8-richards.html
# Bug 77024 - Web Inspector: tests in PerformanceTests/inspector/ are timing out
inspector
# Bug 100262 - REGRESSION(r131982): this test is crashing
SVG/SvgNestedUse.html
......
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="performance-test.js"></script>
<script>
function makeConsoleEvents(count)
{
for (var i = 0; i < count; ++i)
console.log("Console log: " + i);
}
function test()
{
var message = {
"method":"Console.messageAdded",
"params":{
"message":{
"source":"console-api",
"level":"log",
"text":"Console log message",
"type":"log",
"line":10,
"url":"file://./console-300-lines.html",
"repeatCount":1,
"parameters":[{
"type":"string",
"value":"Console log: 42"
}],
"stackTrace":[
{
"functionName":"makeConsoleEvents",
"url":"file://./console-300-lines.html",
"lineNumber":10,
"columnNumber":17
},
{
"functionName":"",
"url":"file://./console-300-lines.html",
"lineNumber":37,
"columnNumber":9
}
]
}
}
};
WebInspector.showPanel("console");
function test(timer)
{
WebInspector.console.clearMessages();
InspectorTest.addSniffer(WebInspector.consoleView.promptElement, "scrollIntoView", finish);
var cookie = timer.start("console-300-lines");
for (var i = 0; i < 300; ++i)
InspectorBackend.dispatch(message);
function finish()
{
timer.finish(cookie);
timer.done("panel-update");
}
}
InspectorTest.runPerformanceTest(test, 10000);
}
if (!window.testRunner) {
setTimeout(function() {
makeConsoleEvents(300);
}, 3000);
}
</script>
</head>
<body onload="runTest()">
</body>
</html>
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="performance-test.js"></script>
<script>
function test()
{
WebInspector.showPanel("audits");
function test(timer)
{
WebInspector.showPanel("audits");
WebInspector.domAgent._setDocument(null);
var showPanelTimerCookie = timer.start("first-open-elements");
InspectorTest.addBackendResponseSniffer(DOMAgent, "requestChildNodes", function() {
timer.finish(showPanelTimerCookie);
timer.done("first-open");
});
WebInspector.showPanel("elements");
}
InspectorTest.runPerformanceTest(test, 5000);
}
</script>
</head>
<body onload="runTest()">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</body>
</body>
</html>
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="performance-test.js"></script>
<script>
function test()
{
WebInspector.showPanel("resources");
WebInspector.settings.resourcesLastSelectedItem.set(WebInspector.inspectedPageURL);
function test(timer)
{
WebInspector.showPanel("audits");
var resources = WebInspector.panels.resources;
resources.reset();
var treeModel = WebInspector.resourceTreeModel;
treeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameAdded, resources._frameAdded, resources);
treeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, resources._frameNavigated, resources);
treeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, resources._frameDetached, resources);
treeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, resources._resourceAdded, resources);
resources._initialized = false;
InspectorTest.addBackendResponseSniffer(ApplicationCacheAgent, "getFramesWithManifests", finish);
var showPanelTimerCookie = timer.start("first-open-resources");
treeModel._fetchResourceTree();
WebInspector.showPanel("resources");
function finish()
{
timer.finish(showPanelTimerCookie);
timer.done("first-open");
}
}
InspectorTest.runPerformanceTest(test, 5000);
}
</script>
</head>
<body onload="runTest()">
</body>
</body>
</html>
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="performance-test.js"></script>
<script>
function test()
{
WebInspector.showPanel("scripts");
var files = WebInspector.panels.scripts._fileSelector._filesSelectElement;
for (var i = 0; i < files.options.length; ++i) {
if (files.options[i].value.indexOf("inspector-test.js") !== -1) {
files.selectedIndex = i;
WebInspector.panels.scripts._fileSelector._filesSelectChanged();
break;
}
}
function test(timer)
{
WebInspector.showPanel("audits");
var showPanelTimerCookie = timer.start("first-open-scripts");
WebInspector.showPanel("scripts");
var count = WebInspector.panels.scripts.visibleView._textEditor._mainPanel._textChunks.length;
WebInspector.panels.scripts.visibleView._textEditor._mainPanel._expandChunks(0, count);
WebInspector.panels.scripts.visibleView._textEditor._mainPanel._paintScheduledLines();
timer.finish(showPanelTimerCookie);
timer.done("first-open");
}
InspectorTest.runAfterPendingDispatches(InspectorTest.runPerformanceTest.bind(null, test, 5000));
}
</script>
</head>
<body onload="runTest()">
</body>
</html>
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="../../LayoutTests/inspector/profiler/heap-snapshot-test.js"></script>
<script src="performance-test.js"></script>
<script src="heap-snapshot-performance-test.js"></script>
<script>
function makeLinkedList(n)
{
var node = {};
while (--n)
node = { next: node };
return node;
}
function makeDoubleLinkedList(n)
{
var tail = {};
var head = tail;
while (--n) {
head = { next: head };
head.next.prev = head;
}
return { head: head, tail: tail };
}
var list = makeLinkedList(20000);
var double_list = makeDoubleLinkedList(5000);
</script>
</head>
<body onload="runTest()">
</body>
</html>
function test()
{
WebInspector.showPanel("profiles");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_buildEdgeIndexes");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_buildRetainers");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_buildDominatedNodes");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_calculateFlags");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_buildAggregates");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_calculateClassesRetainedSize");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_calculateDistances");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_calculateRetainedSizes");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_markDetachedDOMTreeNodes");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_markQueriableHeapObjects");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_markPageOwnedNodes");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_splitNodesAndContainmentEdges");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_buildPostOrderIndex");
InspectorTest.measureFunction(WebInspector.JSHeapSnapshot.prototype, "_buildDominatorTree");
InspectorTest.measureFunction(WebInspector.HeapSnapshotConstructorsDataGrid.prototype, "_aggregatesReceived");
function performanceTest(timer)
{
var transferTimerCookie;
var showTimerCookie;
var changeViewTimerCookie;
var clearTimerCookie;
var testName = /([^\/]+)\.html$/.exec(WebInspector.inspectedPageURL)[1];
var fullTimerCookie = timer.start("full-summary-snapshot-time");
var backendTimerCookie = timer.start("take-snapshot");
HeapProfilerAgent.takeHeapSnapshot(step0);
function step0()
{
timer.finish(backendTimerCookie);
transferTimerCookie = timer.start("transfer-snapshot");
var type = WebInspector.panels.profiles.getProfileType("HEAP");
var profiles = type.getProfiles();
WebInspector.panels.profiles._showProfile(profiles[profiles.length - 1]);
InspectorTest.addSniffer(type, "finishHeapSnapshot", step1);
}
function step1(uid)
{
timer.finish(transferTimerCookie);
showTimerCookie = timer.start("show-snapshot");
var panel = WebInspector.panels.profiles;
var profile = panel.getProfile("HEAP", uid);
profile.load(step2); // Add load callback.
}
function step2()
{
timer.finish(showTimerCookie);
changeViewTimerCookie = timer.start("switch-to-containment-view");
InspectorTest.switchToView("Containment", cleanup);
}
function cleanup()
{
timer.finish(changeViewTimerCookie);
timer.finish(fullTimerCookie);
clearTimerCookie = timer.start("clear-snapshot");
HeapProfilerAgent.clearProfiles(done);
WebInspector.panels.profiles._reset();
}
function done()
{
timer.finish(clearTimerCookie);
timer.done(testName);
}
}
InspectorTest.runPerformanceTest(performanceTest, 60000);
}
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="../../LayoutTests/inspector/profiler/heap-snapshot-test.js"></script>
<script src="performance-test.js"></script>
<script src="heap-snapshot-performance-test.js"></script>
<script>
var counter = 0;
function makeObjectsTree(deep)
{
var node = {};
node.text = "some text " + counter;
if (deep === 0)
return node;
for (var i = 0; i < 2; ++i)
node[counter++] = makeObjectsTree(deep - 1);
return node;
}
function makeObjectsTree2(name, deep)
{
window[name] = makeObjectsTree(deep);
}
makeObjectsTree2("t", 16);
</script>
</head>
<body onload="runTest()">
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="performance-test.js"></script>
<script>
function onload()
{
testRunner.waitUntilDone();
times = [];
startTime = Date.now();
testStartTime = startTime;
runTest();
}
function inspectorIsReady()
{
times.push(Date.now() - startTime);
if (Date.now() - testStartTime > 20000) {
testRunner.evaluateInWebInspector(2, "InspectorTest.dumpTestStats('inspector-startup-time', 'time', " + JSON.stringify(times) + ", 'ms')")
testRunner.evaluateInWebInspector(3, "(InspectorTest.completeTest())")
return;
}
testRunner.closeWebInspector();
startTime = Date.now();
testRunner.showWebInspector();
runTest();
}
function test()
{
WebInspector.domAgent._setDocument(null);
InspectorTest.addBackendResponseSniffer(DOMAgent, "requestChildNodes", function() {
WebInspector.settings.lastActivePanel.set("audits");
InspectorTest.evaluateInPage("inspectorIsReady()");
});
WebInspector.showPanel("elements");
}
</script>
</head>
<body onload="onload()">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</body>
</html>
<html>
<head>
<script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
<script src="performance-test.js"></script>
<script>
function makeXHRRequests(count)
{
for (var i = 0; i < count; ++i) {
var xhr = new XMLHttpRequest();
xhr.open("GET", document.URL, true);
xhr.send();
}
}
function test()
{
WebInspector.showPanel("network");
var originalRefresh = InspectorTest.override(WebInspector.panels.network._networkLogView, "refresh", timeTrackingRefresh, true);
WebInspector.panels.network._networkLogView._defaultRefreshDelay = 30;
function timeTrackingRefresh()
{
var cookie = InspectorTest.timer.start("network-append-30-requests");
originalRefresh.call(this);
InspectorTest.timer.finish(cookie);
WebInspector.panels.network._networkLogView._reset();
// In real life this array is cleaning up at navigation event.
WebInspector.networkLog._resources = [];
InspectorTest.timer.done("panel-update");
}
function test(timer)
{
InspectorTest.evaluateInPage("makeXHRRequests(30)");
}
InspectorTest.runPerformanceTest(test, 15000);
}
if (!window.testRunner) {
setTimeout(function() {
makeXHRRequests(30);
}, 3000);
}
</script>
</head>
<body onload="runTest()">
</body>
</html>
var initialize_TimeTracker = function() {
InspectorTest.runPerformanceTest = function(perfTest, executeTime, callback)
{
var Timer = function(test, callback)
{
this._callback = callback;
this._test = test;
this._times = {};
this._testStartTime = new Date();
this._heapSizeDeltas = [];
this._jsHeapSize = this._getJSHeapSize();
}
Timer.prototype = {
start: function(name)
{
return {name: name, startTime: new Date()};
},
finish: function(cookie)
{
var endTime = new Date();
if (!this._times[cookie.name])
this._times[cookie.name] = [];
this._times[cookie.name].push(endTime - cookie.startTime);
},
_getJSHeapSize: function()
{
if (window.gc) {
window.gc();
window.gc();
}
return console.memory.usedJSHeapSize;
},
done: function(groupName)
{
var newJSHeapSize = this._getJSHeapSize();
this._heapSizeDeltas.push(newJSHeapSize - this._jsHeapSize);
this._jsHeapSize = newJSHeapSize;
var time = new Date();
if (time - this._testStartTime < executeTime)
this._runTest();
else {
if (this._complete)
return;
this._complete = true;
this._dump(groupName);
if (this._callback)
this._callback();
else
InspectorTest.completeTest();
}
},
_runTest: function()
{
if (this._guard) {
setTimeout(this._runTest.bind(this), 0);
return;
}
this._guard = true;
var safeTest = InspectorTest.safeWrap(this._test);
safeTest(this);
this._guard = false;
},
_dump: function(groupName)
{
for (var testName in this._times)
InspectorTest.dumpTestStats(groupName, testName, this._times[testName], "ms");
var url = WebInspector.inspectedPageURL;
var regExp = /([^\/]+)\.html/;
var matches = regExp.exec(url);
InspectorTest.dumpTestStats("heap-delta", matches[1], this._heapSizeDeltas, "kB", 1024);
},
}
InspectorTest.timer = new Timer(perfTest, callback);
InspectorTest.timer._runTest();
}
InspectorTest.measureFunction = function(object, functionName)
{
function measure() {
var timer = InspectorTest.timer;
var cookie;
if (timer)
cookie = timer.start(functionName);
var result = func.apply(this, arguments);
if (timer)
timer.finish(cookie);
return result;
}
var func = object[functionName];
object[functionName] =