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

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

Issue 2818193002: Log JumpListUpdater functions' execution time to UMA (Closed)
Patch Set: 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_updater.cc
diff --git a/chrome/browser/win/jumplist_updater.cc b/chrome/browser/win/jumplist_updater.cc
index 39bfc1f0728fe04fbd0e66f6c96d2c365cb2a23b..df7c772bee1184316eb7c2ce58f83f25bad9aa72 100644
--- a/chrome/browser/win/jumplist_updater.cc
+++ b/chrome/browser/win/jumplist_updater.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/metrics/histogram_macros.h"
#include "base/path_service.h"
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
@@ -117,6 +118,9 @@ bool JumpListUpdater::IsEnabled() {
}
bool JumpListUpdater::BeginUpdate() {
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplistUpdater.BeginUpdateDuration");
+
// This instance is expected to be one-time-use only.
DCHECK(!destination_list_.get());
@@ -153,6 +157,9 @@ bool JumpListUpdater::BeginUpdate() {
}
bool JumpListUpdater::CommitUpdate() {
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplistUpdater.CommitUpdateDuration");
+
if (!destination_list_.get())
return false;
@@ -161,6 +168,9 @@ bool JumpListUpdater::CommitUpdate() {
}
bool JumpListUpdater::AddTasks(const ShellLinkItemList& link_items) {
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplistUpdater.AddTasksDuration");
+
if (!destination_list_.get())
return false;
@@ -198,7 +208,10 @@ bool JumpListUpdater::AddTasks(const ShellLinkItemList& link_items) {
bool JumpListUpdater::AddCustomCategory(const std::wstring& category_name,
const ShellLinkItemList& link_items,
size_t max_items) {
- if (!destination_list_.get())
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplistUpdater.AddCustomCategoryDuration");
+
+ if (!destination_list_.get())
return false;
// Retrieve the absolute path to "chrome.exe".
« 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