summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/entry_impl.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 23:05:46 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-28 23:05:46 +0000
commit447baadf9dd279ae3dfb226ba34c75c48f3da930 (patch)
tree59a025fb0ec67ccc35cac98182fda81d64cab619 /net/disk_cache/entry_impl.h
parentfda418552b5a32755b4414c172f4b5c52615e502 (diff)
downloadchromium_src-447baadf9dd279ae3dfb226ba34c75c48f3da930.zip
chromium_src-447baadf9dd279ae3dfb226ba34c75c48f3da930.tar.gz
chromium_src-447baadf9dd279ae3dfb226ba34c75c48f3da930.tar.bz2
Disk cache: Add a histogram to measure the latency of
asynchronous IO. BUG=none TEST=none Review URL: http://codereview.chromium.org/178023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_impl.h')
-rw-r--r--net/disk_cache/entry_impl.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h
index 4bb4d04..f5961f9 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/entry_impl.h
@@ -21,6 +21,14 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
friend class base::RefCounted<EntryImpl>;
friend class SparseControl;
public:
+ enum Operation {
+ kRead,
+ kWrite,
+ kSparseRead,
+ kSparseWrite,
+ kAsyncIO
+ };
+
EntryImpl(BackendImpl* backend, Addr address);
// Entry interface.
@@ -99,18 +107,14 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
// the upgrade tool.
void SetTimes(base::Time last_used, base::Time last_modified);
+ // Generates a histogram for the time spent working on this operation.
+ void ReportIOTime(Operation op, const base::Time& start);
+
private:
enum {
kNumStreams = 3
};
- enum Operation {
- kRead,
- kWrite,
- kSparseRead,
- kSparseWrite
- };
-
~EntryImpl();
// Initializes the storage for an internal or external data block.
@@ -166,9 +170,6 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
// actual cleanup.
void GetData(int index, char** buffer, Addr* address);
- // Generates a histogram for the time spent working on this operation.
- void ReportIOTime(Operation op, const base::Time& start);
-
// Logs this entry to the internal trace buffer.
void Log(const char* msg);