| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 | 1052 |
| 1053 var childrenTime = 0; | 1053 var childrenTime = 0; |
| 1054 var children = record.children() || []; | 1054 var children = record.children() || []; |
| 1055 for (var i = 0; i < children.length; ++i) { | 1055 for (var i = 0; i < children.length; ++i) { |
| 1056 var child = children[i]; | 1056 var child = children[i]; |
| 1057 if (!child.endTime() || child.endTime() < startTime || child.sta
rtTime() > endTime) | 1057 if (!child.endTime() || child.endTime() < startTime || child.sta
rtTime() > endTime) |
| 1058 continue; | 1058 continue; |
| 1059 childrenTime += Math.min(endTime, child.endTime()) - Math.max(st
artTime, child.startTime()); | 1059 childrenTime += Math.min(endTime, child.endTime()) - Math.max(st
artTime, child.startTime()); |
| 1060 aggregateTimeForRecordWithinWindow(child); | 1060 aggregateTimeForRecordWithinWindow(child); |
| 1061 } | 1061 } |
| 1062 var categoryName = WebInspector.TimelineUIUtils.categoryForRecord(re
cord).name; | 1062 var categoryName = record.category().name; |
| 1063 var ownTime = Math.min(endTime, record.endTime()) - Math.max(startTi
me, record.startTime()) - childrenTime; | 1063 var ownTime = Math.min(endTime, record.endTime()) - Math.max(startTi
me, record.startTime()) - childrenTime; |
| 1064 aggregatedStats[categoryName] = (aggregatedStats[categoryName] || 0)
+ ownTime; | 1064 aggregatedStats[categoryName] = (aggregatedStats[categoryName] || 0)
+ ownTime; |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 var mainThreadTasks = this._model.mainThreadTasks(); | 1067 var mainThreadTasks = this._model.mainThreadTasks(); |
| 1068 var taskIndex = insertionIndexForObjectInListSortedByFunction(startTime,
mainThreadTasks, compareEndTime); | 1068 var taskIndex = insertionIndexForObjectInListSortedByFunction(startTime,
mainThreadTasks, compareEndTime); |
| 1069 for (; taskIndex < mainThreadTasks.length; ++taskIndex) { | 1069 for (; taskIndex < mainThreadTasks.length; ++taskIndex) { |
| 1070 var task = mainThreadTasks[taskIndex]; | 1070 var task = mainThreadTasks[taskIndex]; |
| 1071 if (task.startTime() > endTime) | 1071 if (task.startTime() > endTime) |
| 1072 break; | 1072 break; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1456 * @param {!WebInspector.TimelineModel.Record} record | 1456 * @param {!WebInspector.TimelineModel.Record} record |
| 1457 * @return {boolean} | 1457 * @return {boolean} |
| 1458 */ | 1458 */ |
| 1459 accept: function(record) | 1459 accept: function(record) |
| 1460 { | 1460 { |
| 1461 return !this._hiddenRecords[record.type()]; | 1461 return !this._hiddenRecords[record.type()]; |
| 1462 }, | 1462 }, |
| 1463 | 1463 |
| 1464 __proto__: WebInspector.TimelineModel.Filter.prototype | 1464 __proto__: WebInspector.TimelineModel.Filter.prototype |
| 1465 } | 1465 } |
| OLD | NEW |