Commit a0b19056 authored by calamity's avatar calamity Committed by Commit bot

Add UMA for app list creation time.

This CL adds a UMA histogram for the amount of time taken to build the
app list.

BUG=415389

Review URL: https://codereview.chromium.org/580993003

Cr-Commit-Position: refs/heads/master@{#295672}
parent 8304b516
...@@ -448,6 +448,14 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -448,6 +448,14 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<summary>Interactions with the App Launcher promo dialog.</summary> <summary>Interactions with the App Launcher promo dialog.</summary>
</histogram> </histogram>
<histogram name="Apps.AppListCreationTime" units="milliseconds">
<owner>calamity@chromium.org</owner>
<summary>
The amount of time it takes to build the app list UI. This is logged each
time the app list is built from scratch.
</summary>
</histogram>
<histogram name="Apps.AppListHowEnabled" enum="AppListEnableSource"> <histogram name="Apps.AppListHowEnabled" enum="AppListEnableSource">
<owner>tapted@chromium.org</owner> <owner>tapted@chromium.org</owner>
<summary> <summary>
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <algorithm> #include <algorithm>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "ui/app_list/app_list_constants.h" #include "ui/app_list/app_list_constants.h"
...@@ -319,6 +320,8 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, ...@@ -319,6 +320,8 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
views::BubbleBorder::Arrow arrow, views::BubbleBorder::Arrow arrow,
bool border_accepts_events, bool border_accepts_events,
const gfx::Vector2d& anchor_offset) { const gfx::Vector2d& anchor_offset) {
base::Time start_time = base::Time::Now();
app_list_main_view_ = app_list_main_view_ =
new AppListMainView(delegate_, initial_apps_page, parent); new AppListMainView(delegate_, initial_apps_page, parent);
AddChildView(app_list_main_view_); AddChildView(app_list_main_view_);
...@@ -407,6 +410,9 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, ...@@ -407,6 +410,9 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
if (delegate_) if (delegate_)
delegate_->ViewInitialized(); delegate_->ViewInitialized();
UMA_HISTOGRAM_TIMES("Apps.AppListCreationTime",
base::Time::Now() - start_time);
} }
void AppListView::OnBeforeBubbleWidgetInit( void AppListView::OnBeforeBubbleWidgetInit(
......
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