diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-20 21:23:50 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-20 21:23:50 +0000 |
commit | 43b0aaf302306d1e202fa33c4eeafb294e700a83 (patch) | |
tree | 2f11bf6c0c13c48b78101c6066affcf311271139 /net | |
parent | 202ff04b72117fa53a67bd8eec3e7cfbdc5dc3aa (diff) | |
download | chromium_src-43b0aaf302306d1e202fa33c4eeafb294e700a83.zip chromium_src-43b0aaf302306d1e202fa33c4eeafb294e700a83.tar.gz chromium_src-43b0aaf302306d1e202fa33c4eeafb294e700a83.tar.bz2 |
Disk cache: Add another timming histogram.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8357021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/entry_impl.cc | 16 | ||||
-rw-r--r-- | net/disk_cache/entry_impl.h | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc index 920600d..976e16f 100644 --- a/net/disk_cache/entry_impl.cc +++ b/net/disk_cache/entry_impl.cc @@ -706,6 +706,12 @@ void EntryImpl::ReportIOTime(Operation op, const base::TimeTicks& start) { case kAsyncIO: CACHE_UMA(AGE_MS, "AsyncIOTime", group, start); break; + case kReadAsync1: + CACHE_UMA(AGE_MS, "AsyncReadDispatchTime", group, start); + break; + case kWriteAsync1: + CACHE_UMA(AGE_MS, "AsyncWriteDispatchTime", group, start); + break; default: NOTREACHED(); } @@ -991,6 +997,8 @@ int EntryImpl::InternalReadData(int index, int offset, net::IOBuffer* buf, net::NetLog::TYPE_ENTRY_READ_DATA); } + TimeTicks start_async = TimeTicks::Now(); + bool completed; if (!file->Read(buf->data(), buf_len, file_offset, io_callback, &completed)) { if (io_callback) @@ -1001,6 +1009,9 @@ int EntryImpl::InternalReadData(int index, int offset, net::IOBuffer* buf, if (io_callback && completed) io_callback->Discard(); + if (io_callback) + ReportIOTime(kReadAsync1, start_async); + ReportIOTime(kRead, start); return (completed || !callback) ? buf_len : net::ERR_IO_PENDING; } @@ -1085,6 +1096,8 @@ int EntryImpl::InternalWriteData(int index, int offset, net::IOBuffer* buf, net::NetLog::TYPE_ENTRY_WRITE_DATA); } + TimeTicks start_async = TimeTicks::Now(); + bool completed; if (!file->Write(buf->data(), buf_len, file_offset, io_callback, &completed)) { @@ -1096,6 +1109,9 @@ int EntryImpl::InternalWriteData(int index, int offset, net::IOBuffer* buf, if (io_callback && completed) io_callback->Discard(); + if (io_callback) + ReportIOTime(kWriteAsync1, start_async); + ReportIOTime(kWrite, start); return (completed || !callback) ? buf_len : net::ERR_IO_PENDING; } diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h index 16657af..f76f703 100644 --- a/net/disk_cache/entry_impl.h +++ b/net/disk_cache/entry_impl.h @@ -30,7 +30,9 @@ class NET_EXPORT_PRIVATE EntryImpl kWrite, kSparseRead, kSparseWrite, - kAsyncIO + kAsyncIO, + kReadAsync1, + kWriteAsync1 }; EntryImpl(BackendImpl* backend, Addr address, bool read_only); |