Bug 45663

Summary: Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Andrey Kosyakov <caseq>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, caseq, joepeck, keishi, loislo, pfeldman, pmuellr, rik, sullivan, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
patch to land
none
patch
none
patch
none
patch
none
patch to land none

Description Pavel Feldman 2010-09-13 06:08:07 PDT
It would be great to have a way to export network data in HAR format. For bug reports, it’s very helpful to be able to save a network trace. It would be great to have this functionality built into Chrome/WebKit.
Comment 1 Andrey Kosyakov 2010-09-14 08:54:08 PDT
Created attachment 67559 [details]
patch
Comment 2 Yury Semikhatsky 2010-09-14 09:04:42 PDT
Comment on attachment 67559 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=67559&action=prettypatch

> WebCore/inspector/front-end/HAREntry.js:163
> +        return start === -1 ? -1 : Math.round(timing[end] - timing[start]);
start === -1 is not needed
Comment 3 Andrey Kosyakov 2010-09-14 09:23:28 PDT
Created attachment 67565 [details]
patch to land

- Changed check for timings[start] in HAREntry._interval()
- Return -1 instead of 0 for timings.connect if connection reused.
Comment 4 Andrey Kosyakov 2010-09-14 10:23:19 PDT
Committed manually r67474: http://trac.webkit.org/changeset/67474
Comment 5 Andrey Kosyakov 2010-09-14 10:26:45 PDT
See also https://bugs.webkit.org/show_bug.cgi?id=45764 for export of HAR data.
Comment 6 Pavel Feldman 2010-09-15 02:51:02 PDT
Bug description requests that HAR data is exportable in the Web Inspector. Reopening.
Comment 7 Pavel Feldman 2010-09-15 02:53:08 PDT
*** Bug 45764 has been marked as a duplicate of this bug. ***
Comment 8 Andrey Kosyakov 2010-09-16 05:36:34 PDT
Created attachment 67785 [details]
patch

- Added support to export HAR file from resource panel (disabled in Preferences by default until raw headers & cookies available per pfeldman's request)
- Added support for top-level HAR archive (we used to only support HAREntry)

N.B.: the unreadable name of file we offer for download looks to be an immanent effect of the underlying implementation: we use blobs to construct contents of file on the client side, and have no way to apply Content-disposition there or affect file name in the resulting blob URL returned by createBlobURL().
Comment 9 Andrey Kosyakov 2010-09-16 06:25:52 PDT
Created attachment 67788 [details]
patch

- Fixed binary diff
Comment 10 Andrey Kosyakov 2010-09-16 07:57:12 PDT
Committed manually r67615: http://trac.webkit.org/changeset/67615
Comment 11 Eric Seidel (no email) 2010-09-16 12:35:28 PDT
Comment on attachment 67559 [details]
patch

Cleared Yury Semikhatsky's review+ from obsolete attachment 67559 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 12 Andrey Kosyakov 2010-12-01 17:13:21 PST
Created attachment 75336 [details]
patch

This patch restores HAR export functionality that used to be in Resource panel but was lost during transitioning to Network panel.
Comment 13 Pavel Feldman 2010-12-01 17:34:09 PST
Comment on attachment 75336 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=75336&action=review

> WebCore/inspector/front-end/NetworkPanel.js:1312
> +    get resource()

no need for this getter.
Comment 14 Andrey Kosyakov 2010-12-01 18:02:32 PST
Created attachment 75341 [details]
patch to land

- removed NetworkDataGridNode.get resource(), directly access NetworkDataGridNode._resource instead
- removed trailing whitespace
Comment 15 Eric Seidel (no email) 2010-12-14 01:23:55 PST
Comment on attachment 67788 [details]
patch

Cleared Pavel Feldman's review+ from obsolete attachment 67788 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 16 Eric Seidel (no email) 2010-12-14 01:24:00 PST
Comment on attachment 75336 [details]
patch

Cleared Pavel Feldman's review+ from obsolete attachment 75336 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 17 Andrey Kosyakov 2011-03-15 07:38:40 PDT
This is now available for all platforms as Network panel -> context menu -> Copy as HAR, so closing bug.