OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 eventDivider.title = title; | 222 eventDivider.title = title; |
223 | 223 |
224 return eventDivider; | 224 return eventDivider; |
225 } | 225 } |
226 | 226 |
227 WebInspector.TimelinePresentationModel._hiddenRecords = { } | 227 WebInspector.TimelinePresentationModel._hiddenRecords = { } |
228 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkDOMContent] = 1; | 228 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkDOMContent] = 1; |
229 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkLoad] = 1; | 229 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkLoad] = 1; |
230 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.ScheduleStyleRecalculation] = 1; | 230 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.ScheduleStyleRecalculation] = 1; |
231 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.InvalidateLayout] = 1; | 231 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.InvalidateLayout] = 1; |
| 232 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.CommitFrame] = 1; |
232 | 233 |
233 WebInspector.TimelinePresentationModel.prototype = { | 234 WebInspector.TimelinePresentationModel.prototype = { |
234 /** | 235 /** |
235 * @param {!WebInspector.TimelinePresentationModel.Filter} filter | 236 * @param {!WebInspector.TimelinePresentationModel.Filter} filter |
236 */ | 237 */ |
237 addFilter: function(filter) | 238 addFilter: function(filter) |
238 { | 239 { |
239 this._filters.push(filter); | 240 this._filters.push(filter); |
240 }, | 241 }, |
241 | 242 |
(...skipping 29 matching lines...) Expand all Loading... |
271 this._frames = []; | 272 this._frames = []; |
272 this._minimumRecordTime = -1; | 273 this._minimumRecordTime = -1; |
273 this._layoutInvalidateStack = {}; | 274 this._layoutInvalidateStack = {}; |
274 this._lastScheduleStyleRecalculation = {}; | 275 this._lastScheduleStyleRecalculation = {}; |
275 this._webSocketCreateRecords = {}; | 276 this._webSocketCreateRecords = {}; |
276 this._coalescingBuckets = {}; | 277 this._coalescingBuckets = {}; |
277 }, | 278 }, |
278 | 279 |
279 addFrame: function(frame) | 280 addFrame: function(frame) |
280 { | 281 { |
281 this._frames.push(frame); | 282 if (!frame.isBackground) |
| 283 this._frames.push(frame); |
282 }, | 284 }, |
283 | 285 |
284 /** | 286 /** |
285 * @param {TimelineAgent.TimelineEvent} record | 287 * @param {TimelineAgent.TimelineEvent} record |
286 * @return {Array.<WebInspector.TimelinePresentationModel.Record>} | 288 * @return {Array.<WebInspector.TimelinePresentationModel.Record>} |
287 */ | 289 */ |
288 addRecord: function(record) | 290 addRecord: function(record) |
289 { | 291 { |
290 if (this._minimumRecordTime === -1 || record.startTime < this._minimumRe
cordTime) | 292 if (this._minimumRecordTime === -1 || record.startTime < this._minimumRe
cordTime) |
291 this._minimumRecordTime = WebInspector.TimelineModel.startTimeInSeco
nds(record); | 293 this._minimumRecordTime = WebInspector.TimelineModel.startTimeInSeco
nds(record); |
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 | 1488 |
1487 WebInspector.TimelinePresentationModel.generatePopupContentForFrame = function(f
rame) | 1489 WebInspector.TimelinePresentationModel.generatePopupContentForFrame = function(f
rame) |
1488 { | 1490 { |
1489 var contentHelper = new WebInspector.PopoverContentHelper(WebInspector.UIStr
ing("Frame")); | 1491 var contentHelper = new WebInspector.PopoverContentHelper(WebInspector.UIStr
ing("Frame")); |
1490 var durationInSeconds = frame.endTime - frame.startTime; | 1492 var durationInSeconds = frame.endTime - frame.startTime; |
1491 var durationText = WebInspector.UIString("%s (at %s)", Number.secondsToStrin
g(frame.endTime - frame.startTime, true), | 1493 var durationText = WebInspector.UIString("%s (at %s)", Number.secondsToStrin
g(frame.endTime - frame.startTime, true), |
1492 Number.secondsToString(frame.startTimeOffset, true)); | 1494 Number.secondsToString(frame.startTimeOffset, true)); |
1493 contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationText)
; | 1495 contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationText)
; |
1494 contentHelper.appendTextRow(WebInspector.UIString("FPS"), Math.floor(1 / dur
ationInSeconds)); | 1496 contentHelper.appendTextRow(WebInspector.UIString("FPS"), Math.floor(1 / dur
ationInSeconds)); |
1495 contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.second
sToString(frame.cpuTime, true)); | 1497 contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.second
sToString(frame.cpuTime, true)); |
| 1498 contentHelper.appendTextRow(WebInspector.UIString("Thread"), frame.isBackgro
und ? WebInspector.UIString("background") : WebInspector.UIString("main")); |
1496 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Time"), | 1499 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Time"), |
1497 WebInspector.TimelinePresentationModel._generateAggregatedInfo(frame.tim
eByCategory)); | 1500 WebInspector.TimelinePresentationModel._generateAggregatedInfo(frame.tim
eByCategory)); |
1498 | |
1499 return contentHelper.contentTable(); | 1501 return contentHelper.contentTable(); |
1500 } | 1502 } |
1501 | 1503 |
1502 /** | 1504 /** |
1503 * @param {WebInspector.FrameStatistics} statistics | 1505 * @param {WebInspector.FrameStatistics} statistics |
1504 */ | 1506 */ |
1505 WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics =
function(statistics) | 1507 WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics =
function(statistics) |
1506 { | 1508 { |
1507 /** | 1509 /** |
1508 * @param {number} time | 1510 * @param {number} time |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 }, | 1673 }, |
1672 | 1674 |
1673 set hidden(hidden) | 1675 set hidden(hidden) |
1674 { | 1676 { |
1675 this._hidden = hidden; | 1677 this._hidden = hidden; |
1676 this.dispatchEventToListeners(WebInspector.TimelineCategory.Events.Visib
ilityChanged, this); | 1678 this.dispatchEventToListeners(WebInspector.TimelineCategory.Events.Visib
ilityChanged, this); |
1677 }, | 1679 }, |
1678 | 1680 |
1679 __proto__: WebInspector.Object.prototype | 1681 __proto__: WebInspector.Object.prototype |
1680 } | 1682 } |
OLD | NEW |