Add a new Histogram for detected page language |
|||||||||||
Issue descriptionThe idea is to record, for every page load, the result of CLD2 (client-side language detection that we use to trigger translation prompts today). Rationale: Chrome needs to know what language(s) people read/speak before we can actually offer useful, respectful (language) assistance. This histogram will help us understand how far off we are (ex: on Android where we inherit OS display language) and how much opportunity exists for translate to be useful. https://docs.google.com/presentation/d/1_Tc1wMhNJ0WwBki1Jd6EkvilWPsqHMiMweMkn7XiLWo/edit#slide=id.p
,
Mar 21 2016
,
Mar 21 2016
I think you want this code for your histogram: https://code.google.com/p/chromium/codesearch#chromium/src/components/translate/content/browser/content_translate_driver.cc&sq=package:chromium&type=cs&l=243&rcl=1458574421 (ContentTranslateDriver::OnLanguageDetermined) You definitely want to gather this in the browser process for ease of use, since the renderer doesn't guarantee that the histograms will get flushed back to the browser process in a timely manner (or at all). I've CC'd myself, feel free to bug me if you run into issues. CC riesa@, the owner of CLD2.
,
Mar 22 2016
You don't want to collect the metrics content side, since this is a Chrome, not a translate metric. But you're in luck, browser already subclasses translate::ContentTranslateDriver::Observer. You want to override OnLanguageDetermine on browser - Translate's observer API is overriden here: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/browser.h&rcl=1458646239&l=738 Alternatively, because we never do things in just one way, listen to NOTIFICATION_TAB_LANGUAGE_DETERMINED. But the first solution is probably the better one.
,
Mar 22 2016
Oh, and before I forget: We do have IIRC metrics for pages that are translated (i.e. that are different from the UI language). We can _probably_ derive this all from existing UMA data, if we dig.
,
Mar 23 2016
Per discussion with riesa@ today, it'd be neat to also add a histogram for the CLD2-returned confidence/probability for the top language. That might give us a better sense for when/where detection is getting tripped up or people are reading pages with multiple languages. Assigning to rkaplow@ for now since he may be able to pick this up in the short term.
,
Mar 27 2016
,
Mar 30 2016
Hi, I wrote the CL and only at the end read the discussion here - oops. https://codereview.chromium.org/1847713002/ SO I took a different tack and did it close to the CLD2 analysis. This let me easily access the probability distribution data as well. This gets called through the TranslateHelper, which looks like it is on the renderer. I didn't think there was a problem with adding the metrics from the renderer, maybe +alexei if he has any thoughts on that. Even if this isn't what you suggested, I figured I would send it off anyways since it was already written - no worries either way.
,
Mar 31 2016
The histogram you've added there should work by happy coincidence because of TranslateHelper::RecordLanguageDetectionTiming() here: https://code.google.com/p/chromium/codesearch#chromium/src/components/translate/content/renderer/translate_helper.cc This triggers a flush to the browser process right away. I had forgotten this code was in there. So I guess as long as you're tightly coupled to that same code timing it will all just work out :)
,
Apr 1 2016
For folks following along, these are the new histograms: Translate.CLD2LanguageAccuracy Translate.CLD2LanguageDetected
,
Apr 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eb4ffca7b23f6f8d1a0af549bfc18e31a3a0e331 commit eb4ffca7b23f6f8d1a0af549bfc18e31a3a0e331 Author: rkaplow <rkaplow@chromium.org> Date: Fri Apr 01 14:04:15 2016 Add histograms to measure CLD2 language detection as well as the accuracy of the chosen detection. BUG= 596537 Review URL: https://codereview.chromium.org/1847713002 Cr-Commit-Position: refs/heads/master@{#384575} [modify] https://crrev.com/eb4ffca7b23f6f8d1a0af549bfc18e31a3a0e331/components/translate/core/language_detection/language_detection_util.cc [modify] https://crrev.com/eb4ffca7b23f6f8d1a0af549bfc18e31a3a0e331/tools/metrics/histograms/histograms.xml
,
Apr 4 2016
Can I get this merged to M50? It is adding 2 extra histograms to track what languages are detected, request by ainsle@ and talo@
,
Apr 4 2016
Your change meets the bar and is auto-approved for M50 (branch: 2661)
,
Apr 4 2016
Please merge your change to M50 branch 2661 by 5:00 PM PST today, 04/04/16 so we can take it for this week beta. Thank you.
,
Apr 4 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ddf07ff2b2eed462a4530f644e994af17e8aceab commit ddf07ff2b2eed462a4530f644e994af17e8aceab Author: Robert Kaplow <rkaplow@chromium.org> Date: Mon Apr 04 20:49:22 2016 Add histograms to measure CLD2 language detection as well as the accuracy of the chosen detection. BUG= 596537 Review URL: https://codereview.chromium.org/1847713002 Cr-Commit-Position: refs/heads/master@{#384575} (cherry picked from commit eb4ffca7b23f6f8d1a0af549bfc18e31a3a0e331) Review URL: https://codereview.chromium.org/1860723002 . Cr-Commit-Position: refs/branch-heads/2661@{#480} Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081} [modify] https://crrev.com/ddf07ff2b2eed462a4530f644e994af17e8aceab/components/translate/core/language_detection/language_detection_util.cc [modify] https://crrev.com/ddf07ff2b2eed462a4530f644e994af17e8aceab/tools/metrics/histograms/histograms.xml
,
Jul 27 2016
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by rsesek@chromium.org
, Mar 21 2016