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

Unified Diff: chrome/browser/resources/tracing/timeline_view.js

Issue 8359025: Tons of timeline tweaks (Closed)
Patch Set: Disable eliding due to perf issues Created 9 years, 1 month 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: chrome/browser/resources/tracing/timeline_view.js
diff --git a/chrome/browser/resources/tracing/timeline_view.js b/chrome/browser/resources/tracing/timeline_view.js
index bd4a1d5fa8d3ad19866e0bfd20f4861fcaa6997a..7598ee634d714da08e0e9d30141657c2172be3af 100644
--- a/chrome/browser/resources/tracing/timeline_view.js
+++ b/chrome/browser/resources/tracing/timeline_view.js
@@ -64,7 +64,6 @@ cr.define('tracing', function() {
},
set traceEvents(traceEvents) {
- console.log('TimelineView.refresh');
this.timelineModel_ = new tracing.TimelineModel(traceEvents);
// remove old timeline
@@ -72,10 +71,11 @@ cr.define('tracing', function() {
// create new timeline if needed
if (traceEvents.length) {
+ if (this.timeline_)
+ this.timeline_.detach();
this.timeline_ = new tracing.Timeline();
this.timeline_.model = this.timelineModel_;
this.timelineContainer_.appendChild(this.timeline_);
- this.timeline_.onResize();
this.timeline_.addEventListener('selectionChange',
this.onSelectionChangedBoundToThis_);
this.onSelectionChanged_();
@@ -85,7 +85,6 @@ cr.define('tracing', function() {
},
onSelectionChanged_: function(e) {
- console.log('selection changed');
var timeline = this.timeline_;
var selection = timeline.selection;
if (!selection.length) {
@@ -105,8 +104,9 @@ cr.define('tracing', function() {
tsRound(slice.start) + ' ms\n';
text += leftAlign('Duration', c0Width) + ': ' +
tsRound(slice.duration) + ' ms\n';
- text += leftAlign('Duration (U)', c0Width) + ': ' +
- tsRound(slice.durationInUserTime) + ' ms\n';
+ if (slice.durationInUserTime)
+ text += leftAlign('Duration (U)', c0Width) + ': ' +
+ tsRound(slice.durationInUserTime) + ' ms\n';
var n = 0;
for (var argName in slice.args) {

Powered by Google App Engine
This is Rietveld 408576698