Changeset 96326 in webkit


Ignore:
Timestamp:
Sep 29, 2011 7:30:38 AM (13 years ago)
Author:
loislo@chromium.org
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):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96323 r96326  
     12011-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
     4        https://bugs.webkit.org/show_bug.cgi?id=69087
     5
     6        The fix has the changes for the test and minor perf framework improvements.
     7
     8        Reviewed by Yury Semikhatsky.
     9
     10        * inspector/performance/resources/network-append-30-requests.html:
     11        * inspector/performance/resources/performance-test.js:
     12        (initialize_TimeTracker.InspectorTest.runPerformanceTest.Timer.prototype.done):
     13        (initialize_TimeTracker.InspectorTest.runPerformanceTest):
     14        (initialize_TimeTracker.InspectorTest.mark):
     15
    1162011-09-29  Vsevolod Vlasov  <vsevik@chromium.org>
    217
  • trunk/LayoutTests/inspector/performance/resources/network-append-30-requests.html

    r96110 r96326  
    1818    WebInspector.showPanel("network");
    1919
     20    var originalRefresh = InspectorTest.override(WebInspector.panels.network._networkLogView, "refresh", timeTrackingRefresh, true);
     21    WebInspector.panels.network._networkLogView._defaultRefreshDelay = 30;
     22    function timeTrackingRefresh()
     23    {
     24        var cookie = InspectorTest.timer.start("network-append-30-requests");
     25        originalRefresh.call(this);
     26        InspectorTest.timer.finish(cookie);
     27        InspectorTest.timer.done();
     28    }
     29
    2030    function test(timer)
    2131    {
    2232        WebInspector.panels.network._networkLogView._reset();
    23         var cookie = timer.start("network-append-30-requests");
    2433        InspectorTest.evaluateInPage("makeXHRRequests(30)");
    25         function finish()
    26         {
    27             timer.finish(cookie);
    28             timer.done();
    29         }
    30         InspectorTest.addSniffer(WebInspector.panels.network._networkLogView, "refresh", finish);
    3134    }
     35
    3236    InspectorTest.runPerformanceTest(test, 15000);
    3337}
  • trunk/LayoutTests/inspector/performance/resources/performance-test.js

    r96209 r96326  
    4444                this._runTest();
    4545            else {
     46                if (this._complete)
     47                    return;
     48                this._complete = true;
     49
    4650                this._dump();
    4751                if (this._callback)
     
    7882    }
    7983
    80     var timer = new Timer(perfTest, callback);
    81     timer._runTest();
     84    InspectorTest.timer = new Timer(perfTest, callback);
     85    InspectorTest.timer._runTest();
     86}
     87
     88InspectorTest.mark = function(markerName)
     89{
     90    var timer = InspectorTest.timer;
     91    if (!timer)
     92        return;
     93
     94    if (InspectorTest.lastMarkCookie)
     95        timer.finish(InspectorTest.lastMarkCookie);
     96
     97    InspectorTest.lastMarkCookie = markerName ? timer.start(markerName) : null;
    8298}
    8399
  • trunk/Source/WebCore/ChangeLog

    r96323 r96326  
     12011-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
     4        https://bugs.webkit.org/show_bug.cgi?id=69087
     5
     6        The fix has the changes for the test and minor perf framework improvements.
     7
     8        Reviewed by Yury Semikhatsky.
     9
     10        * inspector/front-end/NetworkPanel.js:
     11        (WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh):
     12
    1132011-09-29  Vsevolod Vlasov  <vsevik@chromium.org>
    214
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r96321 r96326  
    497497    },
    498498
     499    _defaultRefreshDelay: 500,
     500
    499501    _scheduleRefresh: function()
    500502    {
     
    505507
    506508        if (this.visible && !("_refreshTimeout" in this))
    507             this._refreshTimeout = setTimeout(this.refresh.bind(this), 500);
     509            this._refreshTimeout = setTimeout(this.refresh.bind(this), this._defaultRefreshDelay);
    508510    },
    509511
Note: See TracChangeset for help on using the changeset viewer.