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

Side by Side Diff: chrome/browser/prerender/prerender_observer.cc

Issue 7621030: Add Hover stats for 1.5s, 2s, and 3s hover thresholds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prerender/prerender_observer.h" 5 #include "chrome/browser/prerender/prerender_observer.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/prerender/prerender_manager.h" 10 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 10 matching lines...) Expand all
21 50, 21 50,
22 75, 22 75,
23 100, 23 100,
24 150, 24 150,
25 200, 25 200,
26 250, 26 250,
27 300, 27 300,
28 400, 28 400,
29 500, 29 500,
30 750, 30 750,
31 1000 31 1000,
32 1500,
33 2000,
34 3000,
35 4000,
36 5000
32 }; 37 };
33 38
34 // Overview of hover-related histograms: 39 // Overview of hover-related histograms:
35 // -- count of hover start 40 // -- count of hover start
36 // -- count of hover too short. 41 // -- count of hover too short.
37 // difference between these is pages prerendered 42 // difference between these is pages prerendered
38 // -- count of prerender used 43 // -- count of prerender used
39 // -- time from hover commence until click (subtract hover threshold 44 // -- time from hover commence until click (subtract hover threshold
40 // from that value to figure out average savings). 45 // from that value to figure out average savings).
41 46
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 elapsed_ms, num_buckets); 297 elapsed_ms, num_buckets);
293 } else { 298 } else {
294 UMA_HISTOGRAM_ENUMERATION("Prerender.HoverStats_TimeUntilDiscarded", 299 UMA_HISTOGRAM_ENUMERATION("Prerender.HoverStats_TimeUntilDiscarded",
295 elapsed_ms, num_buckets); 300 elapsed_ms, num_buckets);
296 } 301 }
297 302
298 current_hover_url_ = GURL(); 303 current_hover_url_ = GURL();
299 } 304 }
300 305
301 } // namespace prerender 306 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698