Index: third_party/WebKit/Source/core/fetch/Resource.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp |
index 653d09c4caee83e947d5a18733f283eaf1f428ce..568f7c98de2a0d9436acf2b5466b159a1eb15161 100644 |
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp |
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp |
@@ -582,6 +582,11 @@ bool Resource::unlock() |
void Resource::responseReceived(const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle>) |
{ |
m_responseTimestamp = currentTime(); |
+ if (m_preloadDiscoveryTime) { |
+ int timeSinceDiscovery = static_cast<int>(1000 * (monotonicallyIncreasingTime() - m_preloadDiscoveryTime)); |
+ DEFINE_STATIC_LOCAL(CustomCountHistogram, preloadDiscoveryToFirstByteHistogram, ("PreloadScanner.TTFB", 0, 10000, 50)); |
+ preloadDiscoveryToFirstByteHistogram.count(timeSinceDiscovery); |
+ } |
if (!m_revalidatingRequest.isNull()) { |
if (response.httpStatusCode() == 304) { |