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

Unified Diff: components/omnibox/browser/search_suggestion_parser.cc

Issue 2728663005: Add a histogram for omnibox answer suggestion types. (Closed)
Patch Set: Created 3 years, 10 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') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/search_suggestion_parser.cc
diff --git a/components/omnibox/browser/search_suggestion_parser.cc b/components/omnibox/browser/search_suggestion_parser.cc
index 32f7e5fee69d8139a8105a3d57358a6a2dc2d667..1ec248f0f1519d2cfd4bc3879dea878c89bb5f8b 100644
--- a/components/omnibox/browser/search_suggestion_parser.cc
+++ b/components/omnibox/browser/search_suggestion_parser.cc
@@ -524,6 +524,7 @@ bool SearchSuggestionParser::ParseSuggestResults(
answer = SuggestionAnswer::ParseAnswer(answer_json);
int answer_type = 0;
if (answer && base::StringToInt(answer_type_str, &answer_type)) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Omnibox.AnswerType", answer_type);
Justin Donnelly 2017/03/02 19:00:13 Is this the right way to log this? These type IDs
Mark P 2017/03/02 20:59:35 Aren't there almost always zero or only one answer
Ilya Sherman 2017/03/02 21:17:32 I recommend sparse histograms over enumerated hist
Justin Donnelly 2017/03/02 21:21:25 Yes, there's always zero or one. When there's an a
Mark P 2017/03/02 23:28:48 No "implication." It just means that you're not c
answer_parsed_successfully = true;
answer->set_type(answer_type);
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698