diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 18:50:39 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 18:50:39 +0000 |
commit | aac186e80cc3fee4a7f7631433b7baab944f9239 (patch) | |
tree | 85ae7eb2b2395695f5daab470cfa5152b3a7b358 /net/disk_cache/block_files.h | |
parent | 6b658bf84d667bbaacd59d6337a09ac2e80645a8 (diff) | |
download | chromium_src-aac186e80cc3fee4a7f7631433b7baab944f9239.zip chromium_src-aac186e80cc3fee4a7f7631433b7baab944f9239.tar.gz chromium_src-aac186e80cc3fee4a7f7631433b7baab944f9239.tar.bz2 |
Disk cache: Read the index and data_0 files in a single
operation to reduce multiple IO operations generated by
on-demand paging.
Also, generate extra histograms and improve the scale of
some others.
BUG=none
TEST=net_unittests
Review URL: http://codereview.chromium.org/2891022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/block_files.h')
-rw-r--r-- | net/disk_cache/block_files.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/disk_cache/block_files.h b/net/disk_cache/block_files.h index 5a3e9af..3ed19de 100644 --- a/net/disk_cache/block_files.h +++ b/net/disk_cache/block_files.h @@ -46,6 +46,9 @@ class BlockFiles { // cache is being purged. void CloseFiles(); + // Sends UMA stats. + void ReportStats(); + private: // Set force to true to overwrite the file if it exists. bool CreateBlockFile(int index, FileType file_type, bool force); @@ -69,6 +72,9 @@ class BlockFiles { // Restores the header of a potentially inconsistent file. bool FixBlockFileHeader(MappedFile* file); + // Retrieves stats for the given file index. + void GetFileStats(int index, int* used_count, int* load); + // Returns the filename for a given file index. FilePath Name(int index); @@ -79,6 +85,7 @@ class BlockFiles { FRIEND_TEST(DiskCacheTest, BlockFiles_ZeroSizeFile); FRIEND_TEST(DiskCacheTest, BlockFiles_InvalidFile); + FRIEND_TEST(DiskCacheTest, BlockFiles_Stats); DISALLOW_COPY_AND_ASSIGN(BlockFiles); }; |