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

Unified Diff: chrome/browser/extensions/updater/extension_cache_impl.cc

Issue 148013004: Add UMA stats for ExtensionCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation Created 6 years, 11 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 | « no previous file | chrome/browser/extensions/updater/local_extension_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/updater/extension_cache_impl.cc
diff --git a/chrome/browser/extensions/updater/extension_cache_impl.cc b/chrome/browser/extensions/updater/extension_cache_impl.cc
index ddf0cd2e4ef19b93b5504fb591075eff297db4f3..53addd598bdc381207a1650935d8d47bcb781c52 100644
--- a/chrome/browser/extensions/updater/extension_cache_impl.cc
+++ b/chrome/browser/extensions/updater/extension_cache_impl.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/memory/singleton.h"
+#include "base/metrics/histogram.h"
#include "base/sequenced_task_runner.h"
#include "base/stl_util.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -104,6 +105,15 @@ void ExtensionCacheImpl::OnCacheInitialized() {
it->Run();
}
init_callbacks_.clear();
+
+ uint64 cache_size = 0;
+ size_t extensions_count = 0;
+ if (cache_->GetStatistics(&cache_size, &extensions_count)) {
+ UMA_HISTOGRAM_COUNTS_100("Extensions.ExtensionCacheCount",
+ extensions_count);
+ UMA_HISTOGRAM_MEMORY_MB("Extensions.ExtensionCacheSize",
+ cache_size / (1024 * 1024));
+ }
}
void ExtensionCacheImpl::Observe(int type,
« no previous file with comments | « no previous file | chrome/browser/extensions/updater/local_extension_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698