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

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineUIUtils.js

Issue 451993003: DevTools: Do not count events from other threads in aggregated stats. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.TimelineUIUtils} 7 * @extends {WebInspector.TimelineUIUtils}
8 */ 8 */
9 WebInspector.TracingTimelineUIUtils = function() 9 WebInspector.TracingTimelineUIUtils = function()
10 { 10 {
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 var index = events.binaryIndexOf(event.startTime, eventComparator); 706 var index = events.binaryIndexOf(event.startTime, eventComparator);
707 var hasChildren = false; 707 var hasChildren = false;
708 var endTime = event.endTime; 708 var endTime = event.endTime;
709 if (endTime) { 709 if (endTime) {
710 for (var i = index; i < events.length; i++) { 710 for (var i = index; i < events.length; i++) {
711 var nextEvent = events[i]; 711 var nextEvent = events[i];
712 if (nextEvent.startTime >= endTime) 712 if (nextEvent.startTime >= endTime)
713 break; 713 break;
714 if (!nextEvent.selfTime) 714 if (!nextEvent.selfTime)
715 continue; 715 continue;
716 if (nextEvent.thread !== event.thread)
717 continue;
716 if (i > index) 718 if (i > index)
717 hasChildren = true; 719 hasChildren = true;
718 var category = WebInspector.TracingTimelineUIUtils.styleForTraceEven t(nextEvent.name).category.name; 720 var category = WebInspector.TracingTimelineUIUtils.styleForTraceEven t(nextEvent.name).category.name;
719 total[category] = (total[category] || 0) + nextEvent.selfTime; 721 total[category] = (total[category] || 0) + nextEvent.selfTime;
720 } 722 }
721 } 723 }
722 return hasChildren; 724 return hasChildren;
723 } 725 }
724 726
725 /** 727 /**
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 return result; 804 return result;
803 } 805 }
804 806
805 /** 807 /**
806 * @return {!WebInspector.TracingTimelineModel.Filter} 808 * @return {!WebInspector.TracingTimelineModel.Filter}
807 */ 809 */
808 WebInspector.TracingTimelineUIUtils.hiddenEventsFilter = function() 810 WebInspector.TracingTimelineUIUtils.hiddenEventsFilter = function()
809 { 811 {
810 return new WebInspector.TracingTimelineModel.InclusiveEventNameFilter(WebIns pector.TracingTimelineUIUtils._visibleTypes()); 812 return new WebInspector.TracingTimelineModel.InclusiveEventNameFilter(WebIns pector.TracingTimelineUIUtils._visibleTypes());
811 } 813 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698