Changeset 67474 in webkit


Ignore:
Timestamp:
Sep 14, 2010 9:30:45 AM (14 years ago)
Author:
caseq@chromium.org
Message:

2010-09-14 Andrey Kosyakov <caseq@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
Added support for resource timings to HAREntry.
https://bugs.webkit.org/show_bug.cgi?id=45663

2010-09-14 Andrey Kosyakov <caseq@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
https://bugs.webkit.org/show_bug.cgi?id=45663

  • http/tests/inspector/resource-har-conversion-expected.txt:
  • http/tests/inspector/resource-parameters-expected.txt:
  • http/tests/inspector/resource-test2.js: Added entire timings object to list of non-deterministic fields.
  • http/tests/inspector/resource-tests.js: Ditto.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r67471 r67474  
     12010-09-14  Andrey Kosyakov  <caseq@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
     6        https://bugs.webkit.org/show_bug.cgi?id=45663
     7
     8        * http/tests/inspector/resource-har-conversion-expected.txt:
     9        * http/tests/inspector/resource-parameters-expected.txt:
     10        * http/tests/inspector/resource-test2.js: Added entire timings object to list of non-deterministic fields.
     11        * http/tests/inspector/resource-tests.js: Ditto.
     12
    1132010-09-14  Hans Wennborg  <hans@chromium.org>
    214
  • trunk/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt

    r66735 r67474  
    2626            bodySize : <number>
    2727        }
    28         timings : {
    29             blocked : -1
    30             dns : -1
    31             connect : -1
    32             send : -1
    33             wait : <number>
    34             receive : <number>
    35             ssl : -1
    36         }
     28        timings : <object>
    3729    }
    3830    1 : {
     
    5951            bodySize : <number>
    6052        }
    61         timings : {
    62             blocked : -1
    63             dns : -1
    64             connect : -1
    65             send : -1
    66             wait : <number>
    67             receive : <number>
    68             ssl : -1
    69         }
     53        timings : <object>
    7054    }
    7155    2 : {
     
    9276            bodySize : <number>
    9377        }
    94         timings : {
    95             blocked : -1
    96             dns : -1
    97             connect : -1
    98             send : -1
    99             wait : <number>
    100             receive : <number>
    101             ssl : -1
    102         }
     78        timings : <object>
    10379    }
    10480    3 : {
     
    129105            bodySize : <number>
    130106        }
    131         timings : {
    132             blocked : -1
    133             dns : -1
    134             connect : -1
    135             send : -1
    136             wait : <number>
    137             receive : <number>
    138             ssl : -1
    139         }
     107        timings : <object>
    140108    }
    141109}
  • trunk/LayoutTests/http/tests/inspector/resource-parameters-expected.txt

    r66735 r67474  
    5050        bodySize : 14
    5151    }
    52     timings : {
    53         blocked : -1
    54         dns : -1
    55         connect : -1
    56         send : -1
    57         wait : <number>
    58         receive : <number>
    59         ssl : -1
    60     }
     52    timings : <object>
    6153}
    6254
  • trunk/LayoutTests/http/tests/inspector/resource-test2.js

    r66672 r67474  
    77    receive: 1,
    88    headers: 1,
     9    timings: 1,
    910};
    1011
  • trunk/LayoutTests/http/tests/inspector/resource-tests.js

    r60562 r67474  
    55    receive: 1,
    66    headers: 1,
     7    timings: 1,
    78};
    89
  • trunk/WebCore/ChangeLog

    r67473 r67474  
     12010-09-14  Andrey Kosyakov  <caseq@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
     6        Added support for resource timings to HAREntry.
     7        https://bugs.webkit.org/show_bug.cgi?id=45663
     8
     9        * inspector/front-end/HAREntry.js:
     10        (WebInspector.HAREntry.prototype._buildTimings):
     11        (WebInspector.HAREntry.prototype._toMilliseconds):
     12        (WebInspector.HAREntry.prototype._interval):
     13
    1142010-09-14  Kwang Yul Seo  <skyul@company100.net>
    215
  • trunk/WebCore/inspector/front-end/HAREntry.js

    r66669 r67474  
    9696    _buildTimings: function()
    9797    {
     98        var waitForConnection = this._interval("connectStart", "connectEnd");
     99        var blocked;
     100        var connect;
     101        var dns = this._interval("dnsStart", "dnsEnd");
     102        var send = this._interval("sendStart", "sendEnd");
     103        var ssl = this._interval("sslStart", "sslEnd");
     104
     105        if (ssl !== -1 && send !== -1)
     106            send -= ssl;
     107
     108        if (this._resource.connectionReused) {
     109            connect = -1;
     110            blocked = waitForConnection;
     111        } else {
     112            blocked = 0;
     113            connect = waitForConnection;
     114            if (dns !== -1)
     115                connect -= dns;
     116        }
     117
    98118        return {
    99             blocked: -1, // Not available.
    100             dns: -1, // Not available.
    101             connect: -1, // Not available.
    102             send: -1, // Not available.
    103             wait: this._toMilliseconds(this._resource.latency),
     119            blocked: blocked,
     120            dns: dns,
     121            connect: connect,
     122            send: send,
     123            wait: this._interval("sendEnd", "receiveHeadersEnd"),
    104124            receive: this._toMilliseconds(this._resource.receiveDuration),
    105             ssl: -1 // Not available.
     125            ssl: ssl
    106126        };
    107127    },
     
    134154    {
    135155        return time === -1 ? -1 : Math.round(time * 1000);
     156    },
     157
     158    _interval: function(start, end)
     159    {
     160        var timing = this._resource.timing;
     161        if (!timing)
     162            return -1;
     163        var startTime = timing[start];
     164        return typeof startTime !== "number" || startTime === -1 ? -1 : Math.round(timing[end] - startTime);
    136165    }
    137166};
Note: See TracChangeset for help on using the changeset viewer.