Commit 3cc9189a authored by Jenny Zhang's avatar Jenny Zhang Committed by Commit Bot

[metrics] Log latency of a default play store result being activated.

This logs the time delay between a default play store result being
activated by user pressing ENTER key and being displayed.

Bug: 1016026
Change-Id: I0282e65a5dc3d80d5a848234d720dcf1e25df89a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918113Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715930}
parent 5018f3af
...@@ -389,24 +389,30 @@ void SearchResultTileItemView::OnMenuClosed() { ...@@ -389,24 +389,30 @@ void SearchResultTileItemView::OnMenuClosed() {
void SearchResultTileItemView::ActivateResult(int event_flags, void SearchResultTileItemView::ActivateResult(int event_flags,
bool by_button_press) { bool by_button_press) {
const bool launch_as_default = is_default_result() && !by_button_press;
if (result()->result_type() == AppListSearchResultType::kPlayStoreApp) { if (result()->result_type() == AppListSearchResultType::kPlayStoreApp) {
UMA_HISTOGRAM_MEDIUM_TIMES( const base::TimeDelta activation_delay =
"Arc.PlayStoreSearch.ResultClickLatency", base::TimeTicks::Now() - result_display_start_time();
base::TimeTicks::Now() - result_display_start_time()); UMA_HISTOGRAM_MEDIUM_TIMES("Arc.PlayStoreSearch.ResultClickLatency",
activation_delay);
UMA_HISTOGRAM_EXACT_LINEAR( UMA_HISTOGRAM_EXACT_LINEAR(
"Apps.AppListPlayStoreAppLaunchedIndex", "Apps.AppListPlayStoreAppLaunchedIndex",
group_index_in_container_view(), group_index_in_container_view(),
AppListConfig::instance().max_search_result_tiles()); AppListConfig::instance().max_search_result_tiles());
if (launch_as_default) {
UMA_HISTOGRAM_MEDIUM_TIMES(
"Arc.PlayStoreSearch.DefaultResultClickLatency", activation_delay);
}
} }
LogAppLaunchForSuggestedApp(); LogAppLaunchForSuggestedApp();
RecordSearchResultOpenSource(result(), view_delegate_->GetModel(), RecordSearchResultOpenSource(result(), view_delegate_->GetModel(),
view_delegate_->GetSearchModel()); view_delegate_->GetSearchModel());
view_delegate_->OpenSearchResult( view_delegate_->OpenSearchResult(result()->id(), event_flags,
result()->id(), event_flags, AppListLaunchedFrom::kLaunchedFromSearchBox, AppListLaunchedFrom::kLaunchedFromSearchBox,
AppListLaunchType::kAppSearchResult, index_in_container(), AppListLaunchType::kAppSearchResult,
is_default_result() && !by_button_press /* launch_as_default */); index_in_container(), launch_as_default);
view_delegate_->LogResultLaunchHistogram( view_delegate_->LogResultLaunchHistogram(
SearchResultLaunchLocation::kTileList, index_in_container()); SearchResultLaunchLocation::kTileList, index_in_container());
} }
......
...@@ -7046,6 +7046,16 @@ uploading your change for review. ...@@ -7046,6 +7046,16 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram name="Arc.PlayStoreSearch.DefaultResultClickLatency" units="ms"
expires_after="2020-11-01">
<owner>jennyz@chromium.org</owner>
<owner>newcomer@chromium.org</owner>
<summary>
Time between a default play store result being activated by user pressing
ENTER key and being displayed.
</summary>
</histogram>
<histogram name="Arc.PlayStoreSearch.QueryTime" units="ms" <histogram name="Arc.PlayStoreSearch.QueryTime" units="ms"
expires_after="2020-03-22"> expires_after="2020-03-22">
<owner>hejq@chromium.org</owner> <owner>hejq@chromium.org</owner>
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