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

Side by Side Diff: chrome/browser/resources/tracing/timeline.js

Issue 9706010: about:tracing support for TRACE_ASYNC_START/FINISH events. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Interactive visualizaiton of TimelineModel objects 6 * @fileoverview Interactive visualizaiton of TimelineModel objects
7 * based loosely on gantt charts. Each thread in the TimelineModel is given a 7 * based loosely on gantt charts. Each thread in the TimelineModel is given a
8 * set of TimelineTracks, one per subrow in the thread. The Timeline class 8 * set of TimelineTracks, one per subrow in the thread. The Timeline class
9 * acts as a controller, creating the individual tracks, while TimelineTracks 9 * acts as a controller, creating the individual tracks, while TimelineTracks
10 * do actual drawing. 10 * do actual drawing.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // Get a sorted list of threads. 389 // Get a sorted list of threads.
390 var threads = []; 390 var threads = [];
391 for (var tid in process.threads) 391 for (var tid in process.threads)
392 threads.push(process.threads[tid]); 392 threads.push(process.threads[tid]);
393 threads.sort(tracing.TimelineThread.compare); 393 threads.sort(tracing.TimelineThread.compare);
394 394
395 // Create the threads. 395 // Create the threads.
396 threads.forEach(function(thread) { 396 threads.forEach(function(thread) {
397 var track = new tracing.TimelineThreadTrack(); 397 var track = new tracing.TimelineThreadTrack();
398 track.heading = thread.userFriendlyName + ':'; 398 track.heading = thread.userFriendlyName + ':';
399 track.tooltip = thread.userFriendlyDetials; 399 track.tooltip = thread.userFriendlyDetails;
400 track.headingWidth = maxHeadingWidth; 400 track.headingWidth = maxHeadingWidth;
401 track.viewport = this.viewport_; 401 track.viewport = this.viewport_;
402 track.thread = thread; 402 track.thread = thread;
403 this.tracks_.appendChild(track); 403 this.tracks_.appendChild(track);
404 }.bind(this)); 404 }.bind(this));
405 }.bind(this)); 405 }.bind(this));
406 406
407 // Set up a reasonable viewport. 407 // Set up a reasonable viewport.
408 this.viewport_.setWhenPossible(function() { 408 this.viewport_.setWhenPossible(function() {
409 var rangeTimestamp = this.model_.maxTimestamp - 409 var rangeTimestamp = this.model_.maxTimestamp -
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 * The TimelineModel being viewed by the timeline 755 * The TimelineModel being viewed by the timeline
756 * @type {TimelineModel} 756 * @type {TimelineModel}
757 */ 757 */
758 cr.defineProperty(Timeline, 'model', cr.PropertyKind.JS); 758 cr.defineProperty(Timeline, 'model', cr.PropertyKind.JS);
759 759
760 return { 760 return {
761 Timeline: Timeline, 761 Timeline: Timeline,
762 TimelineViewport: TimelineViewport 762 TimelineViewport: TimelineViewport
763 }; 763 };
764 }); 764 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698