Title: [96326] trunk
- Revision
- 96326
- Author
- [email protected]
- Date
- 2011-09-29 07:30:38 -0700 (Thu, 29 Sep 2011)
Log Message
Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
https://bugs.webkit.org/show_bug.cgi?id=69087
The fix has the changes for the test and minor perf framework improvements.
Reviewed by Yury Semikhatsky.
Source/WebCore:
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh):
LayoutTests:
* inspector/performance/resources/network-append-30-requests.html:
* inspector/performance/resources/performance-test.js:
(initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype.done):
(initialize_TimeTracker.InspectorTest.runPerformanceTest):
(initialize_TimeTracker.InspectorTest.mark):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (96325 => 96326)
--- trunk/LayoutTests/ChangeLog 2011-09-29 13:59:23 UTC (rev 96325)
+++ trunk/LayoutTests/ChangeLog 2011-09-29 14:30:38 UTC (rev 96326)
@@ -1,3 +1,18 @@
+2011-09-29 Ilya Tikhonovsky <[email protected]>
+
+ Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
+ https://bugs.webkit.org/show_bug.cgi?id=69087
+
+ The fix has the changes for the test and minor perf framework improvements.
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/performance/resources/network-append-30-requests.html:
+ * inspector/performance/resources/performance-test.js:
+ (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype.done):
+ (initialize_TimeTracker.InspectorTest.runPerformanceTest):
+ (initialize_TimeTracker.InspectorTest.mark):
+
2011-09-29 Vsevolod Vlasov <[email protected]>
Web Inspector: Make search-in-resource test simpler.
Modified: trunk/LayoutTests/inspector/performance/resources/network-append-30-requests.html (96325 => 96326)
--- trunk/LayoutTests/inspector/performance/resources/network-append-30-requests.html 2011-09-29 13:59:23 UTC (rev 96325)
+++ trunk/LayoutTests/inspector/performance/resources/network-append-30-requests.html 2011-09-29 14:30:38 UTC (rev 96326)
@@ -17,18 +17,22 @@
{
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);
+ InspectorTest.timer.done();
+ }
+
function test(timer)
{
WebInspector.panels.network._networkLogView._reset();
- var cookie = timer.start("network-append-30-requests");
InspectorTest.evaluateInPage("makeXHRRequests(30)");
- function finish()
- {
- timer.finish(cookie);
- timer.done();
- }
- InspectorTest.addSniffer(WebInspector.panels.network._networkLogView, "refresh", finish);
}
+
InspectorTest.runPerformanceTest(test, 15000);
}
Modified: trunk/LayoutTests/inspector/performance/resources/performance-test.js (96325 => 96326)
--- trunk/LayoutTests/inspector/performance/resources/performance-test.js 2011-09-29 13:59:23 UTC (rev 96325)
+++ trunk/LayoutTests/inspector/performance/resources/performance-test.js 2011-09-29 14:30:38 UTC (rev 96326)
@@ -43,6 +43,10 @@
if (time - this._testStartTime < executeTime)
this._runTest();
else {
+ if (this._complete)
+ return;
+ this._complete = true;
+
this._dump();
if (this._callback)
this._callback();
@@ -77,10 +81,22 @@
}
- var timer = new Timer(perfTest, callback);
- timer._runTest();
+ InspectorTest.timer = new Timer(perfTest, callback);
+ InspectorTest.timer._runTest();
}
+InspectorTest.mark = function(markerName)
+{
+ var timer = InspectorTest.timer;
+ if (!timer)
+ return;
+
+ if (InspectorTest.lastMarkCookie)
+ timer.finish(InspectorTest.lastMarkCookie);
+
+ InspectorTest.lastMarkCookie = markerName ? timer.start(markerName) : null;
+}
+
InspectorTest.dumpTestStats = function(testName, samples, divider)
{
divider = divider || 1;
Modified: trunk/Source/WebCore/ChangeLog (96325 => 96326)
--- trunk/Source/WebCore/ChangeLog 2011-09-29 13:59:23 UTC (rev 96325)
+++ trunk/Source/WebCore/ChangeLog 2011-09-29 14:30:38 UTC (rev 96326)
@@ -1,3 +1,15 @@
+2011-09-29 Ilya Tikhonovsky <[email protected]>
+
+ Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
+ https://bugs.webkit.org/show_bug.cgi?id=69087
+
+ The fix has the changes for the test and minor perf framework improvements.
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh):
+
2011-09-29 Vsevolod Vlasov <[email protected]>
Web Inspector: Make search-in-resource test simpler.
Modified: trunk/Source/WebCore/inspector/front-end/NetworkPanel.js (96325 => 96326)
--- trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2011-09-29 13:59:23 UTC (rev 96325)
+++ trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2011-09-29 14:30:38 UTC (rev 96326)
@@ -496,6 +496,8 @@
this._updateOffscreenRows();
},
+ _defaultRefreshDelay: 500,
+
_scheduleRefresh: function()
{
if (this._needsRefresh)
@@ -504,7 +506,7 @@
this._needsRefresh = true;
if (this.visible && !("_refreshTimeout" in this))
- this._refreshTimeout = setTimeout(this.refresh.bind(this), 500);
+ this._refreshTimeout = setTimeout(this.refresh.bind(this), this._defaultRefreshDelay);
},
_updateDividersIfNeeded: function(force)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes