Chromium Code Reviews| Index: perf_insights/perf_insights/mappers/slice_cost.html |
| diff --git a/perf_insights/perf_insights/mappers/slice_cost.html b/perf_insights/perf_insights/mappers/slice_cost.html |
| index 77d73953470fed1393f36712e9327785955ca608..acf63eb9b764deafca9a416f66dfac193181585b 100644 |
| --- a/perf_insights/perf_insights/mappers/slice_cost.html |
| +++ b/perf_insights/perf_insights/mappers/slice_cost.html |
| @@ -90,7 +90,7 @@ tr.exportTo('pi.m', function() { |
| function getSliceCostReport(model, threadGrouping, railTypeNameByGUID, |
| - filterFunction) { |
| + ignorePoorTimers, filterFunction) { |
| var reduce = new pi.m.StreamingReducer(SliceCostInfo.asReduceTarget); |
| function generateDomainCosts(slice) { |
| @@ -132,12 +132,18 @@ tr.exportTo('pi.m', function() { |
| }); |
| } |
| + var nbEvents = 0; |
| + var nbSnappedEvents = 0; |
| model.iterateAllEvents(function(event) { |
| if (!(event instanceof tr.model.ThreadSlice)) |
| return; |
| if (filterFunction && !filterFunction(event)) |
| return; |
| + nbEvents++; |
| + if (event.start === Math.floor(event.start)) |
| + nbSnappedEvents++; |
| + |
| var threadSlice = event; |
| if (threadSlice.title === 'V8.Execute') { |
| generateDomainCosts(threadSlice); |
| @@ -161,6 +167,11 @@ tr.exportTo('pi.m', function() { |
| reduce.push(key, sliceCostInfo); |
| }); |
| + // If more than 90% of the events are snapped precisely on milliseconds |
| + // boundary we got a trace with a poor timer, conditionally ignore it. |
|
nduca
2015/10/29 21:43:12
i think this patch should probably block on https:
beaudoin
2015/10/30 14:09:53
Wasn't sure how early you wanted to trim these tra
|
| + if (ignorePoorTimers && nbSnappedEvents / nbEvents > 0.9) |
| + return []; |
| + |
| var sliceCostInfos = []; |
| reduce.finalizeAndIterResults(function(key, sliceCostInfo) { |
| sliceCostInfos.push(sliceCostInfo); |