Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: net/disk_cache/entry_impl.h

Issue 146129: Disk Cache: Split some time histograms in groups based... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_impl.h
===================================================================
--- net/disk_cache/entry_impl.h (revision 19175)
+++ net/disk_cache/entry_impl.h (working copy)
@@ -101,9 +101,16 @@
private:
enum {
- NUM_STREAMS = 3
+ kNumStreams = 3
};
+ enum Operation {
+ kRead,
+ kWrite,
+ kSparseRead,
+ kSparseWrite
+ };
+
~EntryImpl();
// Initializes the storage for an internal or external data block.
@@ -143,16 +150,19 @@
// 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.
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698