Commit f8bb2ba9 authored by Chris Mumford's avatar Chris Mumford Committed by Commit Bot

leveldb: Not logging SharedCache.BytesUsed.InMemory.

A bug was not recording LevelDB.SharedCache.BytesUsed.InMemory
on small memory devices. However, because the in-memory shared
cache size is always zero the correct fix is to simply not
record this value.

Bug: 750798
Change-Id: Ib5e1188aa857aae6510118bb9ccf27e06ac8c8eb
Reviewed-on: https://chromium-review.googlesource.com/723607
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509636}
parent 7e1b7588
...@@ -85,6 +85,9 @@ class Globals { ...@@ -85,6 +85,9 @@ class Globals {
void UpdateHistograms() { void UpdateHistograms() {
leveldb_env::DBTracker::GetInstance()->UpdateHistograms(); leveldb_env::DBTracker::GetInstance()->UpdateHistograms();
// In-memory caches are hard-coded to be zero bytes so don't log
// LevelDB.SharedCache.BytesUsed.InMemory.
// leveldb limits the read cache size to 1GB, but its default value is 8MB, // leveldb limits the read cache size to 1GB, but its default value is 8MB,
// and Chrome uses either 1MB or 8MB. // and Chrome uses either 1MB or 8MB.
if (GetSharedWebBlockCache() == GetSharedBrowserBlockCache()) { if (GetSharedWebBlockCache() == GetSharedBrowserBlockCache()) {
...@@ -96,8 +99,6 @@ class Globals { ...@@ -96,8 +99,6 @@ class Globals {
web_block_cache_->TotalCharge()); web_block_cache_->TotalCharge());
UMA_HISTOGRAM_COUNTS_10M("LevelDB.SharedCache.BytesUsed.Browser", UMA_HISTOGRAM_COUNTS_10M("LevelDB.SharedCache.BytesUsed.Browser",
browser_block_cache_->TotalCharge()); browser_block_cache_->TotalCharge());
UMA_HISTOGRAM_COUNTS_10M("LevelDB.SharedCache.BytesUsed.InMemory",
GetSharedInMemoryBlockCache()->TotalCharge());
} }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment