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-06-25 17:28:31 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 17:28:31 +0000
commit55185493afba3b7813d44a25c614975c0bc0f32b (patch)
treeb8891744621915ba5cd12d0dd8e305f3ec5e0c5f /net/disk_cache/entry_impl.h
parentb235357d38b41a6d3dbf552fd9f4aee3261af0ba (diff)
downloadchromium_src-55185493afba3b7813d44a25c614975c0bc0f32b.zip
chromium_src-55185493afba3b7813d44a25c614975c0bc0f32b.tar.gz
chromium_src-55185493afba3b7813d44a25c614975c0bc0f32b.tar.bz2
Disk Cache: Split some time histograms in groups based
on the cache size. BUG=10727 TEST=none Review URL: http://codereview.chromium.org/146129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_impl.h')
-rw-r--r--net/disk_cache/entry_impl.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h
index 00f44db..89c9573 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/entry_impl.h
@@ -101,7 +101,14 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
private:
enum {
- NUM_STREAMS = 3
+ kNumStreams = 3
+ };
+
+ enum Operation {
+ kRead,
+ kWrite,
+ kSparseRead,
+ kSparseWrite
};
~EntryImpl();
@@ -143,16 +150,19 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
// Initializes the sparse control object. Returns a net error code.
int InitSparseData();
+ // 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);
CacheEntryBlock entry_; // Key related information for this entry.
CacheRankingsBlock node_; // Rankings related information for this entry.
BackendImpl* backend_; // Back pointer to the cache.
- scoped_array<char> user_buffers_[NUM_STREAMS]; // Store user data.
- scoped_refptr<File> files_[NUM_STREAMS + 1]; // Files to store external user
- // data and key.
- int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend.
+ scoped_array<char> user_buffers_[kNumStreams]; // Store user data.
+ scoped_refptr<File> files_[kNumStreams + 1]; // Files to store external
+ // user data and key.
+ int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend.
bool doomed_; // True if this entry was removed from the cache.
scoped_ptr<SparseControl> sparse_; // Support for sparse entries.