summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 00:21:17 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 00:21:17 +0000
commit55a398fd414a0ccc7bdfa614d44e6c5328062040 (patch)
treea11a4f228300d6ce2699b1a0fafc71d992e34395 /net/disk_cache
parent653c71c9f764951ce33e1aecd5fc614ec26989ee (diff)
downloadchromium_src-55a398fd414a0ccc7bdfa614d44e6c5328062040.zip
chromium_src-55a398fd414a0ccc7bdfa614d44e6c5328062040.tar.gz
chromium_src-55a398fd414a0ccc7bdfa614d44e6c5328062040.tar.bz2
Disk cache: Add a new uma histogram for the total internal
buffers size. BUG=none TEST=none Review URL: http://codereview.chromium.org/3211003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/backend_impl.cc2
-rw-r--r--net/disk_cache/histogram_macros.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index f8a67eb..2b6d3af 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -979,7 +979,7 @@ bool BackendImpl::IsAllocAllowed(int current_size, int new_size) {
return false;
buffer_bytes_ += to_add;
- HISTOGRAM_COUNTS("DiskCache.BufferBytes", buffer_bytes_ / 10);
+ CACHE_UMA(COUNTS_50000, "BufferBytes", 0, buffer_bytes_ / 1024);
return true;
}
diff --git a/net/disk_cache/histogram_macros.h b/net/disk_cache/histogram_macros.h
index 2b8af4b..2505a8a 100644
--- a/net/disk_cache/histogram_macros.h
+++ b/net/disk_cache/histogram_macros.h
@@ -33,6 +33,9 @@
#define CACHE_HISTOGRAM_COUNTS_10000(name, sample) \
CACHE_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 10000, 50)
+#define CACHE_HISTOGRAM_COUNTS_50000(name, sample) \
+ CACHE_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 50000000, 50)
+
#define CACHE_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \
do { \
static scoped_refptr<Histogram> counter; \