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

Unified Diff: Source/devtools/front_end/timeline/TimelineTracingView.js

Issue 318093002: Convert timestamp to milliseconds when creating TracingModel.Event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelineTracingView.js
diff --git a/Source/devtools/front_end/timeline/TimelineTracingView.js b/Source/devtools/front_end/timeline/TimelineTracingView.js
index 96a2d8465980277e7ee1abc7e62622b9951d1a64..f36ba2e5ad58ffd4664e331a198625709643c4ce 100644
--- a/Source/devtools/front_end/timeline/TimelineTracingView.js
+++ b/Source/devtools/front_end/timeline/TimelineTracingView.js
@@ -114,8 +114,8 @@ WebInspector.TimelineTracingView.prototype = {
var contentHelper = new WebInspector.TimelineDetailsContentHelper(null, null, false);
contentHelper.appendTextRow(WebInspector.UIString("Name"), record.name);
contentHelper.appendTextRow(WebInspector.UIString("Category"), record.category);
- contentHelper.appendTextRow(WebInspector.UIString("Start"), Number.millisToString(this._dataProvider._toTimelineTime(record.startTime - this._tracingModel.minimumRecordTime()), true));
- contentHelper.appendTextRow(WebInspector.UIString("Duration"), Number.millisToString(this._dataProvider._toTimelineTime(record.duration), true));
+ contentHelper.appendTextRow(WebInspector.UIString("Start"), Number.millisToString(record.startTime - this._tracingModel.minimumRecordTime(), true));
+ contentHelper.appendTextRow(WebInspector.UIString("Duration"), Number.millisToString(record.duration, true));
if (!Object.isEmpty(record.args))
contentHelper.appendElementRow(WebInspector.UIString("Arguments"), this._formatArguments(record.args));
/**
@@ -315,8 +315,8 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
this._currentLevel = 0;
this._headerTitles = {};
- this._minimumBoundary = this._timelineModelForMinimumBoundary.minimumRecordTime() * 1000;
- this._timeSpan = Math.max((this._model.maximumRecordTime() || 0) - this._minimumBoundary, 1000000);
+ this._minimumBoundary = this._timelineModelForMinimumBoundary.minimumRecordTime();
+ this._timeSpan = Math.max((this._model.maximumRecordTime() || 0) - this._minimumBoundary, 1000);
var processes = this._model.sortedProcesses();
for (var processIndex = 0; processIndex < processes.length; ++processIndex) {
var process = processes[processIndex];
@@ -350,7 +350,7 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
*/
minimumBoundary: function()
{
- return this._toTimelineTime(this._minimumBoundary);
+ return this._minimumBoundary;
},
/**
@@ -358,7 +358,7 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
*/
totalTime: function()
{
- return this._toTimelineTime(this._timeSpan);
+ return this._timeSpan;
},
/**
@@ -439,8 +439,8 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
if (!record || this._isHeaderRecord(record))
return null;
return {
- startTime: this._toTimelineTime(record.startTime),
- endTime: this._toTimelineTime(record.endTime)
+ startTime: record.startTime,
+ endTime: record.endTime
}
},
@@ -471,7 +471,7 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
this._records.push(record);
this._timelineData.entryLevels[index] = this._currentLevel++;
this._timelineData.entryTotalTimes[index] = this.totalTime();
- this._timelineData.entryStartTimes[index] = this._toTimelineTime(this._minimumBoundary);
+ this._timelineData.entryStartTimes[index] = this._minimumBoundary;
this._headerTitles[index] = title;
},
@@ -483,17 +483,8 @@ WebInspector.TraceViewFlameChartDataProvider.prototype = {
var index = this._records.length;
this._records.push(record);
this._timelineData.entryLevels[index] = this._currentLevel + record.level;
- this._timelineData.entryTotalTimes[index] = this._toTimelineTime(record.phase === WebInspector.TracingModel.Phase.SnapshotObject ? NaN : record.duration || 0);
- this._timelineData.entryStartTimes[index] = this._toTimelineTime(record.startTime);
- },
-
- /**
- * @param {number} time
- * @return {number}
- */
- _toTimelineTime: function(time)
- {
- return time / 1000;
+ this._timelineData.entryTotalTimes[index] = record.phase === WebInspector.TracingModel.Phase.SnapshotObject ? NaN : record.duration || 0;
+ this._timelineData.entryStartTimes[index] = record.startTime;
},
/**
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698