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

Unified Diff: chrome/browser/win/jumplist.cc

Issue 2811393002: Log UpdateJumpList() and CreateIconFiles() execution time to UMA (Closed)
Patch Set: Better UMA metric names Created 3 years, 8 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist.cc
diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc
index 071087a3db853eaa28f52a2a835f809db9bf2b44..3f879adac52ca93f91df8048d6129f9304a48ef8 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -121,6 +121,7 @@ bool CreateIconFile(const gfx::ImageSkia& image_skia,
// loaded icons.
void CreateIconFiles(const base::FilePath& icon_dir,
const ShellLinkItemList& item_list) {
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplist.CreateIconFilesDuration");
gab 2017/04/13 15:14:22 Add // TODO(chengx): Remove after settling http:/
chengx 2017/04/13 19:21:52 Done.
for (ShellLinkItemList::const_iterator item = item_list.begin();
item != item_list.end(); ++item) {
base::FilePath icon_path;
@@ -177,6 +178,7 @@ bool UpdateJumpList(const wchar_t* app_id,
const ShellLinkItemList& most_visited_pages,
const ShellLinkItemList& recently_closed_pages,
IncognitoModePrefs::Availability incognito_availability) {
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplist.UpdateJumpListDuration");
// JumpList is implemented only on Windows 7 or later.
// So, we should return now when this function is called on earlier versions
// of Windows.
@@ -256,6 +258,10 @@ void RunUpdateJumpListUserVisiblePriority(
// jumplist icons. The jumplist links should be updated anyway, as it doesn't
// involve disk IO.
if (base::DirectoryExists(icon_dir) && base::IsDirectoryEmpty(icon_dir)) {
+ UMA_HISTOGRAM_COUNTS_100(
+ "WinJumplist.CreateIconFilesCount",
+ local_most_visited_pages.size() + local_recently_closed_pages.size());
+
// Create icon files for shortcuts in the "Most Visited" category.
CreateIconFiles(icon_dir, local_most_visited_pages);
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698