},
/**
- * @param {boolean} captureStacks
+ * @param {boolean} captureCauses
* @param {boolean} captureMemory
* @param {boolean} capturePictures
*/
- startRecording: function(captureStacks, captureMemory, capturePictures)
+ startRecording: function(captureCauses, captureMemory, capturePictures)
{
console.assert(!capturePictures, "Legacy timeline does not support capturing pictures");
this.reset();
console.assert(this._currentTarget);
this._clientInitiatedRecording = true;
- var maxStackFrames = captureStacks ? 30 : 0;
+ var maxStackFrames = captureCauses ? 30 : 0;
var includeGPUEvents = Runtime.experiments.isEnabled("gpuTimeline");
var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame,
WebInspector.TimelineModel.RecordType.DrawFrame,
if (event.data.consoleTimeline) {
// Stopped from console.
- this._fireRecordingStopped(null, null);
+ this._fireRecordingStopped(null);
}
this._collectionEnabled = false;
/**
* @param {?Protocol.Error} error
- * @param {?ProfilerAgent.CPUProfile} cpuProfile
*/
- _fireRecordingStopped: function(error, cpuProfile)
+ _fireRecordingStopped: function(error)
{
- if (cpuProfile)
- WebInspector.TimelineJSProfileProcessor.mergeJSProfileIntoTimeline(this, cpuProfile);
this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped);
},
this._payloads = [];
this._stringPool = {};
this._bindings._reset();
+ this._minimumRecordTime = 0;
+ this._maximumRecordTime = 0;
WebInspector.TimelineModel.prototype.reset.call(this);
},
/**
+ * @return {number}
+ */
+ minimumRecordTime: function()
+ {
+ return this._minimumRecordTime;
+ },
+
+ /**
+ * @return {number}
+ */
+ maximumRecordTime: function()
+ {
+ return this._maximumRecordTime;
+ },
+
+ /**
+ * @param {!WebInspector.TimelineModel.Record} record
+ */
+ _updateBoundaries: function(record)
+ {
+ var startTime = record.startTime();
+ var endTime = record.endTime();
+
+ if (!this._minimumRecordTime || startTime < this._minimumRecordTime)
+ this._minimumRecordTime = startTime;
+ if (endTime > this._maximumRecordTime)
+ this._maximumRecordTime = endTime;
+ },
+
+ /**
* @param {!TimelineAgent.TimelineEvent} record
*/
_internStrings: function(record)
setUserObject: function(key, value)
{
if (!this._userObjects)
- this._userObjects = new StringMap();
+ this._userObjects = new Map();
this._userObjects.set(key, value);
},