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

Unified Diff: perf_insights/perf_insights/mappers/slice_cost.html

Issue 1417063004: Ensure traces with bad timers are not taken into accound in the startup report. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | perf_insights/perf_insights/mappers/startup_map_function.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | perf_insights/perf_insights/mappers/startup_map_function.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698