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

Side by Side Diff: components/startup_metric_utils/browser/startup_metric_utils.h

Issue 2913423003: Refactor recording of the Startup.FirstWebContents.RenderProcessHostInit.ToNonEmptyPaint metric
Patch Set: Created 3 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ 5 #ifndef COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_
6 #define COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ 6 #define COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 9
10 class PrefRegistrySimple; 10 class PrefRegistrySimple;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void RecordBrowserMainMessageLoopStart(base::TimeTicks ticks, 65 void RecordBrowserMainMessageLoopStart(base::TimeTicks ticks,
66 bool is_first_run, 66 bool is_first_run,
67 PrefService* pref_service); 67 PrefService* pref_service);
68 68
69 // Call this with the time when the first browser window became visible. 69 // Call this with the time when the first browser window became visible.
70 void RecordBrowserWindowDisplay(base::TimeTicks ticks); 70 void RecordBrowserWindowDisplay(base::TimeTicks ticks);
71 71
72 // Call this with the time delta that the browser spent opening its tabs. 72 // Call this with the time delta that the browser spent opening its tabs.
73 void RecordBrowserOpenTabsDelta(base::TimeDelta delta); 73 void RecordBrowserOpenTabsDelta(base::TimeDelta delta);
74 74
75 // Call this with the time recorded when the first RenderProcessHost is
76 // initialized, i.e. when we begin launching the first render process.
77 void RecordFirstRenderProcessHostInit(base::TimeTicks ticks);
78
75 // Call this with a renderer main entry time. The value provided for the first 79 // Call this with a renderer main entry time. The value provided for the first
76 // call to this function is used to compute 80 // call to this function is used to compute
77 // Startup.LoadTime.BrowserMainToRendererMain. Further calls to this 81 // Startup.LoadTime.BrowserMainToRendererMain. Further calls to this
78 // function are ignored. 82 // function are ignored.
79 void RecordRendererMainEntryTime(base::TimeTicks ticks); 83 void RecordRendererMainEntryTime(base::TimeTicks ticks);
80 84
81 // Call this with the time when the first web contents loaded its main frame, 85 // Call this with the time when the first web contents loaded its main frame,
82 // only if the first web contents was unimpended in its attempt to do so. 86 // only if the first web contents was unimpended in its attempt to do so.
83 void RecordFirstWebContentsMainFrameLoad(base::TimeTicks ticks); 87 void RecordFirstWebContentsMainFrameLoad(base::TimeTicks ticks);
84 88
85 // Call this with the time when the first web contents had a non-empty paint, 89 // Call this with the time when the first web contents had a non-empty paint,
86 // only if the first web contents was unimpeded in its attempt to do so. 90 // only if the first web contents was unimpeded in its attempt to do so.
87 void RecordFirstWebContentsNonEmptyPaint( 91 void RecordFirstWebContentsNonEmptyPaint(base::TimeTicks ticks);
88 base::TimeTicks now,
89 base::TimeTicks render_process_host_init_time);
90 92
91 // Call this with the time when the first web contents began navigating its main 93 // Call this with the time when the first web contents began navigating its main
92 // frame. Adds a suffix to its metrics according to |workload|. 94 // frame. Adds a suffix to its metrics according to |workload|.
93 void RecordFirstWebContentsMainNavigationStart(base::TimeTicks ticks, 95 void RecordFirstWebContentsMainNavigationStart(base::TimeTicks ticks,
94 WebContentsWorkload workload); 96 WebContentsWorkload workload);
95 97
96 // Call this with the time when the first web contents successfully committed 98 // Call this with the time when the first web contents successfully committed
97 // its navigation for the main frame. 99 // its navigation for the main frame.
98 void RecordFirstWebContentsMainNavigationFinished(base::TimeTicks ticks); 100 void RecordFirstWebContentsMainNavigationFinished(base::TimeTicks ticks);
99 101
100 // Call this with the time when the Browser window painted its children for the 102 // Call this with the time when the Browser window painted its children for the
101 // first time. 103 // first time.
102 void RecordBrowserWindowFirstPaint(base::TimeTicks ticks); 104 void RecordBrowserWindowFirstPaint(base::TimeTicks ticks);
103 105
104 // Call this with the time when the Browser window painted its children for the 106 // Call this with the time when the Browser window painted its children for the
105 // first time and we got a CompositingEnded after that. 107 // first time and we got a CompositingEnded after that.
106 void RecordBrowserWindowFirstPaintCompositingEnded(base::TimeTicks ticks); 108 void RecordBrowserWindowFirstPaintCompositingEnded(base::TimeTicks ticks);
107 109
108 // Returns the TimeTicks corresponding to main entry as recorded by 110 // Returns the TimeTicks corresponding to main entry as recorded by
109 // RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been 111 // RecordMainEntryPointTime. Returns a null TimeTicks if a value has not been
110 // recorded yet. This method is expected to be called from the UI thread. 112 // recorded yet. This method is expected to be called from the UI thread.
111 base::TimeTicks MainEntryPointTicks(); 113 base::TimeTicks MainEntryPointTicks();
112 114
113 } // namespace startup_metric_utils 115 } // namespace startup_metric_utils
114 116
115 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_ 117 #endif // COMPONENTS_STARTUP_METRIC_UTILS_BROWSER_STARTUP_METRIC_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698