diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-02 05:21:39 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-02 05:21:39 +0000 |
commit | 6055ad2b18fa1d3f020c52850374f2a20931943c (patch) | |
tree | 399a2b5443fa190f3bc22edd134ae95f7f0f0b92 | |
parent | aa646df8b821ad1a77b210bd5208056c9f579046 (diff) | |
download | chromium_src-6055ad2b18fa1d3f020c52850374f2a20931943c.zip chromium_src-6055ad2b18fa1d3f020c52850374f2a20931943c.tar.gz chromium_src-6055ad2b18fa1d3f020c52850374f2a20931943c.tar.bz2 |
Translate: adding a new UMA item to measure time for capturing text
Add a new UMA item to understand performance bottleneck in mobiles.
BUG=179277
Review URL: https://chromiumcodereview.appspot.com/14765005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197825 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/chrome_render_view_observer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc index 8e0420c..cfe0f83 100644 --- a/chrome/renderer/chrome_render_view_observer.cc +++ b/chrome/renderer/chrome_render_view_observer.cc @@ -108,6 +108,7 @@ static const char kDotJS[] = ".js"; static const char kDotCSS[] = ".css"; static const char kDotSWF[] = ".swf"; static const char kDotHTML[] = ".html"; +static const char kTranslateCaptureText[] = "Translate.CaptureText"; enum { INSECURE_CONTENT_DISPLAY = 0, INSECURE_CONTENT_DISPLAY_HOST_GOOGLE, @@ -697,7 +698,10 @@ void ChromeRenderViewObserver::CapturePageInfo(bool preliminary_capture) { // Retrieve the frame's full text (up to kMaxIndexChars), and pass it to the // translate helper for language detection and possible translation. string16 contents; + base::TimeTicks capture_begin_time = base::TimeTicks::Now(); CaptureText(main_frame, &contents); + UMA_HISTOGRAM_TIMES(kTranslateCaptureText, + base::TimeTicks::Now() - capture_begin_time); if (translate_helper_) translate_helper_->PageCaptured(contents); |