summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/block_files.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 18:50:39 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 18:50:39 +0000
commitaac186e80cc3fee4a7f7631433b7baab944f9239 (patch)
tree85ae7eb2b2395695f5daab470cfa5152b3a7b358 /net/disk_cache/block_files.h
parent6b658bf84d667bbaacd59d6337a09ac2e80645a8 (diff)
downloadchromium_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.h7
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);
};