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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 { | 243 { |
244 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); | 244 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); |
245 }, | 245 }, |
246 | 246 |
247 /** | 247 /** |
248 * @return {!WebInspector.TimelineFrameModel} | 248 * @return {!WebInspector.TimelineFrameModel} |
249 */ | 249 */ |
250 _frameModel: function() | 250 _frameModel: function() |
251 { | 251 { |
252 if (!this._lazyFrameModel) { | 252 if (!this._lazyFrameModel) { |
253 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod
el); | 253 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod
el.target()); |
| 254 this._lazyFrameModel.setMergeRecords(!WebInspector.experimentsSettin
gs.timelineNoLiveUpdate.isEnabled() || !this._recordingInProgress); |
| 255 this._lazyFrameModel.addRecords(this._model.records()); |
254 if (this._lazyTracingModel) | 256 if (this._lazyTracingModel) |
255 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i
nspectedTargetEvents(), this._lazyTracingModel.sessionId()); | 257 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i
nspectedTargetEvents(), this._lazyTracingModel.sessionId()); |
256 | |
257 } | 258 } |
258 return this._lazyFrameModel; | 259 return this._lazyFrameModel; |
259 }, | 260 }, |
260 | 261 |
261 /** | 262 /** |
262 * @return {!WebInspector.TracingModel} | 263 * @return {!WebInspector.TracingModel} |
263 */ | 264 */ |
264 _tracingModel: function() | 265 _tracingModel: function() |
265 { | 266 { |
266 if (!this._lazyTracingModel) { | 267 if (!this._lazyTracingModel) { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 this._model.willStartRecordingTraceEvents(); | 666 this._model.willStartRecordingTraceEvents(); |
666 this._tracingModel().start(categories.join(","), ""); | 667 this._tracingModel().start(categories.join(","), ""); |
667 this._tracingTimelineModel.willStartRecordingTraceEvents(); | 668 this._tracingTimelineModel.willStartRecordingTraceEvents(); |
668 } else { | 669 } else { |
669 this._model.startRecording(this._captureStacksSetting.get(), this._c
aptureMemorySetting.get()); | 670 this._model.startRecording(this._captureStacksSetting.get(), this._c
aptureMemorySetting.get()); |
670 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()
) { | 671 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()
) { |
671 this._tracingModel().start(WebInspector.TimelinePanel.defaultTra
cingCategoryFilter, ""); | 672 this._tracingModel().start(WebInspector.TimelinePanel.defaultTra
cingCategoryFilter, ""); |
672 this._tracingTimelineModel.willStartRecordingTraceEvents(); | 673 this._tracingTimelineModel.willStartRecordingTraceEvents(); |
673 } | 674 } |
674 } | 675 } |
| 676 if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() &&
this._lazyFrameModel) |
| 677 this._lazyFrameModel.setMergeRecords(false); |
| 678 |
675 for (var i = 0; i < this._overviewControls.length; ++i) | 679 for (var i = 0; i < this._overviewControls.length; ++i) |
676 this._overviewControls[i].timelineStarted(); | 680 this._overviewControls[i].timelineStarted(); |
677 | 681 |
678 if (userInitiated) | 682 if (userInitiated) |
679 WebInspector.userMetrics.TimelineStarted.record(); | 683 WebInspector.userMetrics.TimelineStarted.record(); |
680 }, | 684 }, |
681 | 685 |
682 _stopRecording: function() | 686 _stopRecording: function() |
683 { | 687 { |
684 this._userInitiatedRecording = false; | 688 this._userInitiatedRecording = false; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 _hideProgressPane: function() | 815 _hideProgressPane: function() |
812 { | 816 { |
813 if (this._progressElement) | 817 if (this._progressElement) |
814 this._progressElement.remove(); | 818 this._progressElement.remove(); |
815 delete this._progressElement; | 819 delete this._progressElement; |
816 }, | 820 }, |
817 | 821 |
818 _onRecordingStopped: function() | 822 _onRecordingStopped: function() |
819 { | 823 { |
820 this._updateToggleTimelineButton(false); | 824 this._updateToggleTimelineButton(false); |
| 825 if (this._lazyFrameModel && WebInspector.experimentsSettings.timelineNoL
iveUpdate.isEnabled()) { |
| 826 this._lazyFrameModel.reset(); |
| 827 this._lazyFrameModel.addRecords(this._model.records()); |
| 828 } |
821 this._hideProgressPane(); | 829 this._hideProgressPane(); |
822 }, | 830 }, |
823 | 831 |
824 _onRecordAdded: function(event) | 832 _onRecordAdded: function(event) |
825 { | 833 { |
826 this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event.
data)); | 834 this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event.
data)); |
827 }, | 835 }, |
828 | 836 |
829 /** | 837 /** |
830 * @param {!WebInspector.TimelineModel.Record} record | 838 * @param {!WebInspector.TimelineModel.Record} record |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 * @param {!WebInspector.TimelineModel.Record} record | 1448 * @param {!WebInspector.TimelineModel.Record} record |
1441 * @return {boolean} | 1449 * @return {boolean} |
1442 */ | 1450 */ |
1443 accept: function(record) | 1451 accept: function(record) |
1444 { | 1452 { |
1445 return !this._hiddenRecords[record.type()]; | 1453 return !this._hiddenRecords[record.type()]; |
1446 }, | 1454 }, |
1447 | 1455 |
1448 __proto__: WebInspector.TimelineModel.Filter.prototype | 1456 __proto__: WebInspector.TimelineModel.Filter.prototype |
1449 } | 1457 } |
OLD | NEW |