Skip to content

Commit

Permalink
Reland of DevTools: fix aggregated donut chart cache population (patc…
Browse files Browse the repository at this point in the history
…hset #1 id:1 of https://codereview.chromium.org/2839083002/ )

Reason for revert:
The patch has noting to do with the failing test. In fact if you look at the flakiness dashboard the test is very flaky there:

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_layout_tests&tests=virtual%2Fthreaded%2Finspector%2Ftracing%2Ftimeline-js%2Ftimeline-runtime-stats.html

Original issue's description:
> Revert of DevTools: fix aggregated donut chart cache population (patchset #1 id:1 of https://codereview.chromium.org/2840463003/ )
>
> Reason for revert:
> Suspected cause of failure of virtual/threaded/inspector/tracing/timeline-js/timeline-runtime-stats.html in https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20(dbg)/builds/9644
>
> Original issue's description:
> > DevTools: fix aggregated donut chart cache population
> >
> > The check for stats cache availablity was made on the first task in the main thread
> > tasks list. If the first task happens to be filtered out, it never gets cache built for
> > it. Later the cache presence check would look for a cache on the first task, never find
> > it and forces recaching.
> >
> > BUG=714934
> >
> > Review-Url: https://codereview.chromium.org/2840463003
> > Cr-Commit-Position: refs/heads/master@{#467114}
> > Committed: https://chromium.googlesource.com/chromium/src/+/755b1656f38d135013f24ddd8b6ec046874beed2
>
> [email protected],[email protected]
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=714934
>
> Review-Url: https://codereview.chromium.org/2839083002
> Cr-Commit-Position: refs/heads/master@{#467223}
> Committed: https://chromium.googlesource.com/chromium/src/+/65df576fce3007b62084239cc8e37a45aea0368f

[email protected],[email protected]
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=714934

Review-Url: https://codereview.chromium.org/2851823002
Cr-Commit-Position: refs/heads/master@{#468119}
  • Loading branch information
a1ph authored and Commit bot committed Apr 28, 2017
1 parent ef9fa0f commit ba54910
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions front_end/timeline/TimelineUIUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,13 +1046,14 @@ Timeline.TimelineUIUtils = class {
*/
static _buildRangeStatsCacheIfNeeded(model) {
var tasks = model.mainThreadTasks();
if (tasks.length && tasks[0][Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol])
var filter = Timeline.TimelineUIUtils._filterForStats();
var firstTask = tasks.find(filter);
if (!firstTask || firstTask[Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol])
return;
var aggregatedStats = {};
var ownTimes = [];
TimelineModel.TimelineModel.forEachEvent(
model.mainThreadEvents(), onStartEvent, onEndEvent, undefined, undefined, undefined,
Timeline.TimelineUIUtils._filterForStats());
model.mainThreadEvents(), onStartEvent, onEndEvent, undefined, undefined, undefined, filter);

/**
* @param {!SDK.TracingModel.Event} e
Expand Down

0 comments on commit ba54910

Please sign in to comment.