Include resource size in some existing logging
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Apr 2017 02:40:10 +0000 (02:40 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Apr 2017 02:40:10 +0000 (02:40 +0000)
commitee5efb369526630efdc4bf166c3e4da107d4e927
tree9d58ecc49ba5ad8d7b56834b1f89c0cd95751f62
parent5d4e4c8cca02104eac7b01225297d6e727e45830
Include resource size in some existing logging
https://bugs.webkit.org/show_bug.cgi?id=170866

Reviewed by Alex Christensen.

In order to correlate resource load times with resource size, we log
when the resource is starting to be loaded and when the resource is
finished loading. In NetworkResourceLoader::didReceiveResponse, we
also log the expected resource length. However, we can only log the
length if it is provided in Content-Length, which is not always the
case. If it's not provided, we end up logging "length = -1". To make
up for this, change NetworkResourceLoader::didFinishLoading and
WebResourceLoader:: didFinishLoading to log the length once we know
it.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
* NetworkProcess/NetworkResourceLoader.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
* WebProcess/Network/WebResourceLoader.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoader.h