Commit 6ab66362 authored by rtenneti's avatar rtenneti Committed by Commit bot

QUIC - Record loading of QUICServerInfo from disk cache.

Added Net.QuicServerInfo.DiskCacheLoadTime histogram to track the read
time.

R=asvitkine@chromium.org, rch@chromium.org

Review URL: https://codereview.chromium.org/674453003

Cr-Commit-Position: refs/heads/master@{#300710}
parent 173a20da
......@@ -78,6 +78,7 @@ DiskCacheBasedQuicServerInfo::DiskCacheBasedQuicServerInfo(
void DiskCacheBasedQuicServerInfo::Start() {
DCHECK(CalledOnValidThread());
DCHECK_EQ(GET_BACKEND, state_);
load_start_time_ = base::TimeTicks::Now();
DoLoop(OK);
}
......@@ -312,6 +313,8 @@ int DiskCacheBasedQuicServerInfo::DoWaitForDataReadyDone() {
}
entry_ = NULL;
Parse(data_);
UMA_HISTOGRAM_TIMES("Net.QuicServerInfo.DiskCacheLoadTime",
base::TimeTicks::Now() - load_start_time_);
return OK;
}
......
......@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
#include "net/base/completion_callback.h"
#include "net/disk_cache/disk_cache.h"
#include "net/quic/crypto/quic_server_info.h"
......@@ -98,6 +99,7 @@ class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
scoped_refptr<IOBuffer> read_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
std::string data_;
base::TimeTicks load_start_time_;
base::WeakPtrFactory<DiskCacheBasedQuicServerInfo> weak_factory_;
};
......
......@@ -17214,6 +17214,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>
<histogram name="Net.QuicServerInfo.DiskCacheLoadTime" units="milliseconds">
<owner>rtenneti@chromium.org</owner>
<summary>Time spent to load QUIC server information from disk cache.</summary>
</histogram>
<histogram name="Net.QuicServerInfo.DiskCacheReadTime" units="milliseconds">
<obsolete>
Deprecated as of 10/2014. Replaced by DiskCacheWaitForDataReadyTime.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment