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

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

Issue 399043002: DevTools: switch Timeline frontend into buffered mode and remove the corresponding experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: timeline-websocket-event rebaselined 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 | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | 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 /* 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 _frameModel: function() 273 _frameModel: function()
274 { 274 {
275 if (this._lazyFrameModel) 275 if (this._lazyFrameModel)
276 return this._lazyFrameModel; 276 return this._lazyFrameModel;
277 if (this._tracingModel) { 277 if (this._tracingModel) {
278 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel() ; 278 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel() ;
279 tracingFrameModel.addTraceEvents(this._tracingTimelineModel.inspecte dTargetEvents(), this._tracingModel.sessionId() || ""); 279 tracingFrameModel.addTraceEvents(this._tracingTimelineModel.inspecte dTargetEvents(), this._tracingModel.sessionId() || "");
280 this._lazyFrameModel = tracingFrameModel; 280 this._lazyFrameModel = tracingFrameModel;
281 } else { 281 } else {
282 var frameModel = new WebInspector.TimelineFrameModel(); 282 var frameModel = new WebInspector.TimelineFrameModel();
283 frameModel.setMergeRecords(!WebInspector.experimentsSettings.timelin eNoLiveUpdate.isEnabled() || !this._recordingInProgress);
284 frameModel.addRecords(this._model.records()); 283 frameModel.addRecords(this._model.records());
285 this._lazyFrameModel = frameModel; 284 this._lazyFrameModel = frameModel;
286 } 285 }
287 return this._lazyFrameModel; 286 return this._lazyFrameModel;
288 }, 287 },
289 288
290 /** 289 /**
291 * @return {!WebInspector.TimelineView} 290 * @return {!WebInspector.TimelineView}
292 */ 291 */
293 _timelineView: function() 292 _timelineView: function()
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 WebInspector.inspectorView.setCurrentPanelLocked(!enabled); 698 WebInspector.inspectorView.setCurrentPanelLocked(!enabled);
700 }, 699 },
701 700
702 /** 701 /**
703 * @param {boolean} userInitiated 702 * @param {boolean} userInitiated
704 */ 703 */
705 _startRecording: function(userInitiated) 704 _startRecording: function(userInitiated)
706 { 705 {
707 this._userInitiatedRecording = userInitiated; 706 this._userInitiatedRecording = userInitiated;
708 this._model.startRecording(this._captureStacksSetting.get(), this._captu reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay ersAndPicturesSetting.get()); 707 this._model.startRecording(this._captureStacksSetting.get(), this._captu reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay ersAndPicturesSetting.get());
709 if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() && this._lazyFrameModel) 708 if (this._lazyFrameModel)
710 this._lazyFrameModel.setMergeRecords(false); 709 this._lazyFrameModel.setMergeRecords(false);
711 710
712 for (var i = 0; i < this._overviewControls.length; ++i) 711 for (var i = 0; i < this._overviewControls.length; ++i)
713 this._overviewControls[i].timelineStarted(); 712 this._overviewControls[i].timelineStarted();
714 713
715 if (userInitiated) 714 if (userInitiated)
716 WebInspector.userMetrics.TimelineStarted.record(); 715 WebInspector.userMetrics.TimelineStarted.record();
717 this._setUIControlsEnabled(false); 716 this._setUIControlsEnabled(false);
718 }, 717 },
719 718
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 for (var i = 0; i < this._currentViews.length; ++i) 794 for (var i = 0; i < this._currentViews.length; ++i)
796 this._currentViews[i].reset(); 795 this._currentViews[i].reset();
797 for (var i = 0; i < this._overviewControls.length; ++i) 796 for (var i = 0; i < this._overviewControls.length; ++i)
798 this._overviewControls[i].reset(); 797 this._overviewControls[i].reset();
799 this._updateSelectedRangeStats(); 798 this._updateSelectedRangeStats();
800 }, 799 },
801 800
802 _onRecordingStarted: function() 801 _onRecordingStarted: function()
803 { 802 {
804 this._updateToggleTimelineButton(true); 803 this._updateToggleTimelineButton(true);
805 if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled()) 804 this._updateProgress(WebInspector.UIString("%d events collected", 0));
806 this._updateProgress(WebInspector.UIString("%d events collected", 0) );
807 }, 805 },
808 806
809 _recordingInProgress: function() 807 _recordingInProgress: function()
810 { 808 {
811 return this.toggleTimelineButton.toggled; 809 return this.toggleTimelineButton.toggled;
812 }, 810 },
813 811
814 /** 812 /**
815 * @param {!WebInspector.Event} event 813 * @param {!WebInspector.Event} event
816 */ 814 */
817 _onRecordingProgress: function(event) 815 _onRecordingProgress: function(event)
818 { 816 {
819 if (!WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled())
820 return;
821 this._updateProgress(WebInspector.UIString("%d events collected", event. data)); 817 this._updateProgress(WebInspector.UIString("%d events collected", event. data));
822 }, 818 },
823 819
824 /** 820 /**
825 * @param {!WebInspector.Event} event 821 * @param {!WebInspector.Event} event
826 */ 822 */
827 _onTracingBufferUsage: function(event) 823 _onTracingBufferUsage: function(event)
828 { 824 {
829 var usage = /** @type {number} */ (event.data); 825 var usage = /** @type {number} */ (event.data);
830 this._updateProgress(WebInspector.UIString("Buffer usage %d%", Math.roun d(usage * 100))); 826 this._updateProgress(WebInspector.UIString("Buffer usage %d%", Math.roun d(usage * 100)));
(...skipping 20 matching lines...) Expand all
851 if (this._progressElement) 847 if (this._progressElement)
852 this._progressElement.remove(); 848 this._progressElement.remove();
853 delete this._progressElement; 849 delete this._progressElement;
854 }, 850 },
855 851
856 _onRecordingStopped: function() 852 _onRecordingStopped: function()
857 { 853 {
858 this._stopPending = false; 854 this._stopPending = false;
859 this._updateToggleTimelineButton(false); 855 this._updateToggleTimelineButton(false);
860 if (this._lazyFrameModel) { 856 if (this._lazyFrameModel) {
857 this._lazyFrameModel.reset();
861 if (this._tracingTimelineModel) { 858 if (this._tracingTimelineModel) {
862 this._lazyFrameModel.reset();
863 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i nspectedTargetEvents(), this._tracingModel.sessionId()); 859 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i nspectedTargetEvents(), this._tracingModel.sessionId());
864 this._overviewPane.update(); 860 this._overviewPane.update();
865 } else if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isE nabled()) { 861 } else {
866 this._lazyFrameModel.reset();
867 this._lazyFrameModel.addRecords(this._model.records()); 862 this._lazyFrameModel.addRecords(this._model.records());
868 } 863 }
869 } 864 }
870 if (this._tracingTimelineModel) { 865 if (this._tracingTimelineModel) {
871 this.requestWindowTimes(this._tracingTimelineModel.minimumRecordTime (), this._tracingTimelineModel.maximumRecordTime()); 866 this.requestWindowTimes(this._tracingTimelineModel.minimumRecordTime (), this._tracingTimelineModel.maximumRecordTime());
872 this._refreshViews(); 867 this._refreshViews();
873 } 868 }
874 this._hideProgressPane(); 869 this._hideProgressPane();
875 }, 870 },
876 871
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 * @param {!WebInspector.TimelineModel.Record} record 1476 * @param {!WebInspector.TimelineModel.Record} record
1482 * @return {boolean} 1477 * @return {boolean}
1483 */ 1478 */
1484 accept: function(record) 1479 accept: function(record)
1485 { 1480 {
1486 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex); 1481 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex);
1487 }, 1482 },
1488 1483
1489 __proto__: WebInspector.TimelineModel.Filter.prototype 1484 __proto__: WebInspector.TimelineModel.Filter.prototype
1490 } 1485 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698