RESOLVED FIXED 188391
[Curl] Surface additional NetworkLoadMetrics
https://bugs.webkit.org/show_bug.cgi?id=188391
Summary [Curl] Surface additional NetworkLoadMetrics
Don Olmstead
Reported 2018-08-07 14:57:40 PDT
Currently a few network load metrics are missing in the curl port.
Attachments
Patch (6.29 KB, patch)
2018-08-07 15:17 PDT, Don Olmstead
no flags
Patch (5.79 KB, patch)
2018-08-07 15:19 PDT, Don Olmstead
joepeck: review+
Patch (5.83 KB, patch)
2018-08-08 17:27 PDT, Don Olmstead
no flags
Don Olmstead
Comment 1 2018-08-07 15:17:05 PDT
Don Olmstead
Comment 2 2018-08-07 15:19:19 PDT
Joseph Pecoraro
Comment 3 2018-08-07 15:40:06 PDT
Comment on attachment 346738 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346738&action=review Nice! r=me You may be able to enable a few of the Inspector LayoutTests. Namely: LayoutTests/http/tests/inspector/network/resource-sizes-network.html > Source/WebCore/platform/network/curl/CurlContext.cpp:739 > + long protocol; This appears to be unused and can be removed. > Source/WebCore/platform/network/curl/CurlContext.cpp:761 > + errorCode = curl_easy_getinfo(m_handle, CURLINFO_REQUEST_SIZE, &requestHeaderSize); Can you subtract out the requestBodySize to get requestHeaderSize closer to the actual value? You'd want to do some sanity checking to see if that makes sense. > Source/WebCore/platform/network/curl/CurlContext.cpp:773 > + errorCode = curl_easy_getinfo(m_handle, CURLINFO_SIZE_DOWNLOAD_T, &responseBodySize); Same here, does this include the Header Size or not? The curl docs did not seem clear to me.
Basuke Suzuki
Comment 4 2018-08-08 17:02:54 PDT
Comment on attachment 346738 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346738&action=review > Source/WebCore/platform/network/curl/CurlContext.cpp:82 > +static const ASCIILiteral http20Protocol { "h2"_s }; constant should be named like kHttpProtocol10, kHttpProtocol11, kHttpProtocol2. Also version number of HTTP/2 is just 2, not 2.0. https://http2.github.io/faq/#is-it-http20-or-http2 >> Source/WebCore/platform/network/curl/CurlContext.cpp:761 >> + errorCode = curl_easy_getinfo(m_handle, CURLINFO_REQUEST_SIZE, &requestHeaderSize); > > Can you subtract out the requestBodySize to get requestHeaderSize closer to the actual value? You'd want to do some sanity checking to see if that makes sense. Write. Request size includes entire size (header + body). I confirmed that by reading code for libcurl. >> Source/WebCore/platform/network/curl/CurlContext.cpp:773 >> + errorCode = curl_easy_getinfo(m_handle, CURLINFO_SIZE_DOWNLOAD_T, &responseBodySize); > > Same here, does this include the Header Size or not? The curl docs did not seem clear to me. This doesn't include the header size.
Basuke Suzuki
Comment 5 2018-08-08 17:03:34 PDT
> Write. I mean "Right". :(
Don Olmstead
Comment 6 2018-08-08 17:27:55 PDT
Created attachment 346805 [details] Patch Updated based on review feedback.
WebKit Commit Bot
Comment 7 2018-08-08 18:12:12 PDT
Comment on attachment 346805 [details] Patch Clearing flags on attachment: 346805 Committed r234715: <https://trac.webkit.org/changeset/234715>
WebKit Commit Bot
Comment 8 2018-08-08 18:12:13 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2018-08-08 18:13:33 PDT
Note You need to log in before you can comment on or make changes to this bug.