Chromium Code Reviews| Index: perf_insights/perf_insights/mappers/scheduling/map_input_blockers.html |
| diff --git a/perf_insights/perf_insights/mappers/scheduling/map_input_blockers.html b/perf_insights/perf_insights/mappers/scheduling/map_input_blockers.html |
| index e148e05f15ac3cd3f61d4f8177cef5eb1dda490a..a49cb14ac57bdbd69cecf720486993dae4d249aa 100644 |
| --- a/perf_insights/perf_insights/mappers/scheduling/map_input_blockers.html |
| +++ b/perf_insights/perf_insights/mappers/scheduling/map_input_blockers.html |
| @@ -35,11 +35,11 @@ tr.exportTo('pie', function() { |
| var mainThread = rendererHelper.mainThread; |
| // Look for events that represent main thread input handling that also |
| // have one associated flow event showing where the input came from. |
| - mainThread.iterateAllEvents(function(event) { |
| + for (var event of mainThread.descendantEvents()) { |
| if (event.title !== 'LatencyInfo.Flow' || |
| event.args['step'] !== 'HandleInputEventMain' || |
| event.inFlowEvents.length !== 1) { |
| - return; |
| + continue; |
| } |
| // Now we can derive the queueing interval from the flow event. |
| @@ -49,19 +49,19 @@ tr.exportTo('pie', function() { |
| // Find all events that intersect the queueing interval and compute how |
| // much they contributed to it. |
| - mainThread.iterateAllEvents(function(event) { |
| + for (var ievent of mainThread.descendantEvents()) { |
|
charliea (OOO until 10-5)
2016/06/29 18:08:43
Not a big fan of the name "ievent" for two reasons
alexandermont
2016/06/29 20:47:11
Done
|
| var eventRange = |
| - tr.b.Range.fromExplicitRange(event.start, |
| - event.start + event.duration); |
| + tr.b.Range.fromExplicitRange(ievent.start, |
| + ievent.start + ievent.duration); |
| var intersection = queueRange.findIntersection(eventRange); |
| if (intersection.isEmpty || intersection.duration === 0) |
| - return; |
| - if (inputBlockers[event.title] === undefined) |
| - inputBlockers[event.title] = []; |
| - inputBlockers[event.title].push(intersection.duration); |
| + continue; |
| + if (inputBlockers[ievent.title] === undefined) |
| + inputBlockers[ievent.title] = []; |
| + inputBlockers[ievent.title].push(intersection.duration); |
| foundInputBlockers = true; |
| - }); |
| - }); |
| + } |
| + } |
| } |
| if (!foundInputBlockers) { |