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

Issue 16213002: Add telemetry to track the time an event spent waiting for the main thread. (Closed)

Created:
7 years, 6 months ago by varunjain
Modified:
7 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

Add telemetry to track the time an event spent waiting for the main thread. BUG=244251

Patch Set 1 #

Patch Set 2 : patch #

Patch Set 3 : patch #

Total comments: 2

Patch Set 4 : patch #

Total comments: 6

Patch Set 5 : patch #

Total comments: 4

Patch Set 6 : patch #

Patch Set 7 : patch #

Total comments: 4

Patch Set 8 : patch #

Total comments: 2

Patch Set 9 : patch #

Total comments: 4

Patch Set 10 : rebased #

Total comments: 6

Patch Set 11 : patch #

Patch Set 12 : patch #

Total comments: 4

Patch Set 13 : patch #

Patch Set 14 : patch #

Total comments: 4

Patch Set 15 : patch #

Patch Set 16 : minor fixes #

Total comments: 5

Patch Set 17 : patch #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -15 lines) Patch
M content/browser/renderer_host/input/immediate_input_router.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -1 line 1 comment Download
M content/browser/renderer_host/input/immediate_input_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +8 lines, -5 lines 0 comments Download
M content/browser/renderer_host/input/immediate_input_router_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 1 comment Download
M content/browser/renderer_host/input/input_router_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +38 lines, -3 lines 1 comment Download
M content/common/browser_rendering_stats.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/browser_rendering_stats.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +12 lines, -1 line 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/gpu/input_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 1 comment Download
M tools/perf/metrics/gpu_rendering_stats.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M tools/perf/metrics/smoothness.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -0 lines 0 comments Download
M tools/perf/metrics/smoothness_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -1 line 0 comments Download
M ui/base/latency_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 57 (0 generated)
varunjain
7 years, 6 months ago (2013-05-30 00:01:04 UTC) #1
varunjain
On 2013/05/30 00:01:04, varunjain wrote: Actually I just realized that thus cl is wrong :( ...
7 years, 6 months ago (2013-05-30 00:40:37 UTC) #2
sadrul
https://codereview.chromium.org/16213002/diff/9001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/9001/content/renderer/gpu/input_event_filter.cc#newcode58 content/renderer/gpu/input_event_filter.cc:58: this, messages_.front())); You can send base::TimeTicks::Now() with base::Bind. So ...
7 years, 6 months ago (2013-05-30 00:50:56 UTC) #3
varunjain
On 2013/05/30 00:50:56, sadrul wrote: > https://codereview.chromium.org/16213002/diff/9001/content/renderer/gpu/input_event_filter.cc > File content/renderer/gpu/input_event_filter.cc (right): > > https://codereview.chromium.org/16213002/diff/9001/content/renderer/gpu/input_event_filter.cc#newcode58 > ...
7 years, 6 months ago (2013-05-30 01:12:16 UTC) #4
varunjain
7 years, 6 months ago (2013-05-30 01:15:16 UTC) #5
sadrul
LGTM https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc#newcode128 content/renderer/gpu/input_event_filter.cc:128: WebInputEvent::getEventName(event->type)), You are going to need to change ...
7 years, 6 months ago (2013-05-30 01:20:55 UTC) #6
Rick Byers
lgtm
7 years, 6 months ago (2013-05-30 01:37:21 UTC) #7
Ken Russell (switch to Gerrit)
Please ask nduca and brianderson for reviews before committing. How expensive is recording of an ...
7 years, 6 months ago (2013-05-30 11:07:30 UTC) #8
varunjain
On 2013/05/30 11:07:30, kbr wrote: > Please ask nduca and brianderson for reviews before committing. ...
7 years, 6 months ago (2013-05-30 16:42:40 UTC) #9
brianderson
UMA metrics are lightweight, so I am not concerned about adding them. I am concerned ...
7 years, 6 months ago (2013-05-30 18:28:00 UTC) #10
varunjain
On 2013/05/30 18:28:00, Brian Anderson wrote: > UMA metrics are lightweight, so I am not ...
7 years, 6 months ago (2013-05-30 18:33:25 UTC) #11
jbauman
On 2013/05/30 18:33:25, varunjain wrote: > On 2013/05/30 18:28:00, Brian Anderson wrote: > > UMA ...
7 years, 6 months ago (2013-05-30 20:50:49 UTC) #12
DaveMoore
We have some already existing UMA metrics tracking event latency (they've been shipping for a ...
7 years, 6 months ago (2013-05-30 20:52:36 UTC) #13
brianderson
On 2013/05/30 20:50:49, jbauman wrote: > On 2013/05/30 18:33:25, varunjain wrote: > > On 2013/05/30 ...
7 years, 6 months ago (2013-05-30 20:54:17 UTC) #14
nduca
I really would have preferred to see some refactoring of this code to make collecting ...
7 years, 6 months ago (2013-05-30 21:37:01 UTC) #15
Rick Byers
On 2013/05/30 21:37:01, nduca wrote: > I really would have preferred to see some refactoring ...
7 years, 6 months ago (2013-05-31 17:51:02 UTC) #16
jamesr
https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc#newcode127 content/renderer/gpu/input_event_filter.cc:127: base::StringPrintf("Event.Latency.ImplThreadToRendererThread.%s", doing a runtime StringPrintf() every time we hit ...
7 years, 6 months ago (2013-05-31 19:36:31 UTC) #17
Rick Byers
On 2013/05/31 19:36:31, jamesr wrote: > https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc > File content/renderer/gpu/input_event_filter.cc (right): > > https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc#newcode127 > ...
7 years, 6 months ago (2013-06-01 01:19:21 UTC) #18
Rick Byers
On 2013/06/01 01:19:21, Rick Byers wrote: > On 2013/05/31 19:36:31, jamesr wrote: > > > ...
7 years, 6 months ago (2013-06-01 01:20:23 UTC) #19
Rick Byers
On 2013/05/30 21:37:01, nduca wrote: > I really would have preferred to see some refactoring ...
7 years, 6 months ago (2013-06-01 01:27:11 UTC) #20
varunjain
https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/13001/content/renderer/gpu/input_event_filter.cc#newcode127 content/renderer/gpu/input_event_filter.cc:127: base::StringPrintf("Event.Latency.ImplThreadToRendererThread.%s", On 2013/05/31 19:36:32, jamesr wrote: > doing a ...
7 years, 6 months ago (2013-06-03 04:43:53 UTC) #21
jamesr
not quite https://codereview.chromium.org/16213002/diff/33002/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/33002/content/renderer/gpu/input_event_filter.cc#newcode120 content/renderer/gpu/input_event_filter.cc:120: int64 delta = base::TimeTicks::Now().ToInternalValue() - dispatch_time; you ...
7 years, 6 months ago (2013-06-03 18:05:56 UTC) #22
varunjain
https://codereview.chromium.org/16213002/diff/33002/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/33002/content/renderer/gpu/input_event_filter.cc#newcode120 content/renderer/gpu/input_event_filter.cc:120: int64 delta = base::TimeTicks::Now().ToInternalValue() - dispatch_time; On 2013/06/03 18:05:57, ...
7 years, 6 months ago (2013-06-03 18:37:39 UTC) #23
jamesr
lgtm
7 years, 6 months ago (2013-06-03 18:40:22 UTC) #24
Rick Byers
On 2013/06/01 01:20:23, Rick Byers wrote: > On 2013/06/01 01:19:21, Rick Byers wrote: > > ...
7 years, 6 months ago (2013-06-03 19:07:04 UTC) #25
varunjain
On 2013/06/03 18:40:22, jamesr wrote: > lgtm Hi James, Just had a quick discussion with ...
7 years, 6 months ago (2013-06-03 19:07:55 UTC) #26
varunjain
On 2013/06/03 19:07:55, varunjain wrote: > On 2013/06/03 18:40:22, jamesr wrote: > > lgtm > ...
7 years, 6 months ago (2013-06-03 20:24:05 UTC) #27
jamesr
This is still a lot less efficient and clear than it could be. I think ...
7 years, 6 months ago (2013-06-03 20:51:03 UTC) #28
varunjain
Hi James, I think the symptom is not so much of trying to record the ...
7 years, 6 months ago (2013-06-03 22:10:40 UTC) #29
nduca
To jamesr's point, this is why I was thinking that a better direciton for both ...
7 years, 6 months ago (2013-06-03 22:11:46 UTC) #30
jamesr
https://codereview.chromium.org/16213002/diff/41004/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/41004/content/renderer/gpu/input_event_filter.cc#newcode146 content/renderer/gpu/input_event_filter.cc:146: GetPerEventEventLatencyUmaName(event_type), kMin, kMax, 100, somehow this manages to take ...
7 years, 6 months ago (2013-06-04 06:44:54 UTC) #31
varunjain
@jamesr: Hard-coded specific input types as you suggested and removed the hash map stuff. @rbyers: ...
7 years, 6 months ago (2013-06-04 17:02:57 UTC) #32
jamesr
https://codereview.chromium.org/16213002/diff/49001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/49001/content/renderer/gpu/input_event_filter.cc#newcode191 content/renderer/gpu/input_event_filter.cc:191: "Event.Latency.ImplThreadToRendererThread.GestureScrollBegin", do you *really* need separate histograms for each ...
7 years, 6 months ago (2013-06-04 17:08:30 UTC) #33
varunjain
https://codereview.chromium.org/16213002/diff/49001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/49001/content/renderer/gpu/input_event_filter.cc#newcode191 content/renderer/gpu/input_event_filter.cc:191: "Event.Latency.ImplThreadToRendererThread.GestureScrollBegin", On 2013/06/04 17:08:30, jamesr wrote: > do you ...
7 years, 6 months ago (2013-06-04 18:32:42 UTC) #34
Rick Byers
> @rbyers: I have included all GestureScroll* and Touch* event types in UMA. > Please ...
7 years, 6 months ago (2013-06-04 20:19:36 UTC) #35
varunjain
https://codereview.chromium.org/16213002/diff/57001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/16213002/diff/57001/content/renderer/gpu/input_event_filter.cc#newcode159 content/renderer/gpu/input_event_filter.cc:159: UMA_HISTOGRAM_CUSTOM_TIMES("Event.Latency.ImplThreadToRendererThread", On 2013/06/04 20:19:36, Rick Byers wrote: > I'm ...
7 years, 6 months ago (2013-06-04 20:31:47 UTC) #36
nduca
Someone feel like responding to my comments?
7 years, 6 months ago (2013-06-04 21:12:49 UTC) #37
varunjain
On 2013/06/04 21:12:49, nduca wrote: > Someone feel like responding to my comments? Hi Nat, ...
7 years, 6 months ago (2013-06-04 21:48:17 UTC) #38
jamesr
On 2013/06/04 21:48:17, varunjain wrote: > On 2013/06/04 21:12:49, nduca wrote: > > Someone feel ...
7 years, 6 months ago (2013-06-04 21:50:00 UTC) #39
nduca
Sorry, Ricks' reply didn't help me. I would like to hear how we get this ...
7 years, 6 months ago (2013-06-04 22:53:23 UTC) #40
Rick Byers
This seems like a reasonable approach to me - track the key timestamps in LatencyInfo, ...
7 years, 5 months ago (2013-06-26 17:21:56 UTC) #41
varunjain
I have added telemetry reporting as well for this metric (a bit incomplete as I ...
7 years, 5 months ago (2013-06-27 17:29:56 UTC) #42
varunjain
ping @jamesr and nduca: I have switched to using latency info for this metric. PTAL. ...
7 years, 5 months ago (2013-07-03 17:43:26 UTC) #43
jbauman
https://codereview.chromium.org/16213002/diff/81001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/16213002/diff/81001/content/renderer/render_widget.cc#newcode187 content/renderer/render_widget.cc:187: receive_component.event_time - dispatch_component.event_time; This won't calculate an average. You'd ...
7 years, 5 months ago (2013-07-03 20:00:14 UTC) #44
varunjain
https://codereview.chromium.org/16213002/diff/81001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/16213002/diff/81001/content/renderer/render_widget.cc#newcode187 content/renderer/render_widget.cc:187: receive_component.event_time - dispatch_component.event_time; On 2013/07/03 20:00:15, jbauman wrote: > ...
7 years, 5 months ago (2013-07-04 16:49:45 UTC) #45
nduca
this still feels pretty wrong to me https://codereview.chromium.org/16213002/diff/96001/cc/debug/rendering_stats.h File cc/debug/rendering_stats.h (right): https://codereview.chromium.org/16213002/diff/96001/cc/debug/rendering_stats.h#newcode40 cc/debug/rendering_stats.h:40: int64 total_impl_thread_to_main_thread_count; ...
7 years, 5 months ago (2013-07-08 20:58:30 UTC) #46
varunjain
https://codereview.chromium.org/16213002/diff/96001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/16213002/diff/96001/content/renderer/render_widget.cc#newcode143 content/renderer/render_widget.cc:143: void SendToImplThreadLatencyUma(int routing_id, On 2013/07/08 20:58:32, nduca wrote: > ...
7 years, 5 months ago (2013-07-10 19:32:36 UTC) #47
nduca
The latency info struct is in a partial state when you're in the browser. Only ...
7 years, 5 months ago (2013-07-11 01:22:14 UTC) #48
jbauman
On 2013/07/11 01:22:14, nduca wrote: > The latency info struct is in a partial state ...
7 years, 5 months ago (2013-07-11 02:21:33 UTC) #49
nduca
> > Your approach would uma your metric but you're not thinking big picture enough ...
7 years, 5 months ago (2013-07-11 05:15:23 UTC) #50
Rick Byers
On 2013/07/11 05:15:23, nduca wrote: > > > Your approach would uma your metric but ...
7 years, 5 months ago (2013-07-11 14:56:49 UTC) #51
nduca
You're putting the tracking in one place so that we can expose this to telemetry ...
7 years, 5 months ago (2013-07-15 21:49:33 UTC) #52
varunjain
Hi Nat, John, I would like to restart review for this patch. As we discussed ...
7 years, 4 months ago (2013-08-14 23:54:00 UTC) #53
nduca
Thanks Varun. I've got a lot of feedback. You might want to consider a strategy ...
7 years, 4 months ago (2013-08-15 01:41:03 UTC) #54
jdduke (slow)
varunjain@: Please see crrev.com/23137002 for some additional thoughts I had on this kind of stats ...
7 years, 4 months ago (2013-08-15 14:56:33 UTC) #55
Yufeng Shen (Slow to review)
On 2013/08/15 01:41:03, nduca wrote: > Thanks Varun. I've got a lot of feedback. You ...
7 years, 4 months ago (2013-08-15 17:23:04 UTC) #56
nduca
7 years, 4 months ago (2013-08-15 19:56:08 UTC) #57
To recap our discussion offline:
1. Its cool to use a browser test for this. Goood point, sorry I missed that!
2. We can attack the input<->composited frame coorelation as a followup

SOrry for the confusion!

Powered by Google App Engine
This is Rietveld 408576698