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

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

Issue 1184333003: DevTools: Move frame rate overview timeline out of experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/main/Main.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 /** 71 /**
72 * @override 72 * @override
73 */ 73 */
74 update: function() 74 update: function()
75 { 75 {
76 this.resetCanvas(); 76 this.resetCanvas();
77 var threads = this._model.virtualThreads(); 77 var threads = this._model.virtualThreads();
78 var mainThreadEvents = this._model.mainThreadEvents(); 78 var mainThreadEvents = this._model.mainThreadEvents();
79 var networkHeight = this._canvas.clientHeight 79 var networkHeight = this._canvas.clientHeight
80 - WebInspector.TimelineEventOverview._fullStripHeight 80 - 2 * WebInspector.TimelineEventOverview._fullStripHeight
81 - 2 * WebInspector.TimelineEventOverview._smallStripHeight; 81 - 2 * WebInspector.TimelineEventOverview._smallStripHeight;
82 var position = 0; 82 var position = 0;
83 if (Runtime.experiments.isEnabled("inputEventsOnTimelineOverview")) { 83 if (Runtime.experiments.isEnabled("inputEventsOnTimelineOverview")) {
84 var inputHeight = this._drawInputEvents(mainThreadEvents, position, WebInspector.TimelineEventOverview._smallStripHeight); 84 var inputHeight = this._drawInputEvents(mainThreadEvents, position, WebInspector.TimelineEventOverview._smallStripHeight);
85 position += inputHeight; 85 position += inputHeight;
86 networkHeight -= inputHeight; 86 networkHeight -= inputHeight;
87 } 87 }
88 if (Runtime.experiments.isEnabled("frameRateOnEventsOverview"))
89 networkHeight -= WebInspector.TimelineEventOverview._fullStripHeight ;
90 position += this._drawNetwork(mainThreadEvents, position, networkHeight) ; 88 position += this._drawNetwork(mainThreadEvents, position, networkHeight) ;
91 position += this._drawStackedUtilizationChart(mainThreadEvents, position , WebInspector.TimelineEventOverview._fullStripHeight); 89 position += this._drawStackedUtilizationChart(mainThreadEvents, position , WebInspector.TimelineEventOverview._fullStripHeight);
92 for (var thread of threads.filter(function(thread) { return !thread.isWo rker(); })) 90 for (var thread of threads.filter(function(thread) { return !thread.isWo rker(); }))
93 this._drawEvents(thread.events, position, WebInspector.TimelineEvent Overview._smallStripHeight); 91 this._drawEvents(thread.events, position, WebInspector.TimelineEvent Overview._smallStripHeight);
94 position += WebInspector.TimelineEventOverview._smallStripHeight; 92 position += WebInspector.TimelineEventOverview._smallStripHeight;
95 for (var thread of threads.filter(function(thread) { return thread.isWor ker(); })) 93 for (var thread of threads.filter(function(thread) { return thread.isWor ker(); }))
96 this._drawEvents(thread.events, position, WebInspector.TimelineEvent Overview._smallStripHeight); 94 this._drawEvents(thread.events, position, WebInspector.TimelineEvent Overview._smallStripHeight);
97 position += WebInspector.TimelineEventOverview._smallStripHeight; 95 position += WebInspector.TimelineEventOverview._smallStripHeight;
98 if (Runtime.experiments.isEnabled("frameRateOnEventsOverview")) 96 position += this._drawFrames(position, WebInspector.TimelineEventOvervie w._fullStripHeight);
99 position += this._drawFrames(position, WebInspector.TimelineEventOve rview._fullStripHeight);
100 console.assert(position === this._canvas.clientHeight); 97 console.assert(position === this._canvas.clientHeight);
101 }, 98 },
102 99
103 /** 100 /**
104 * @param {!Array.<!WebInspector.TracingModel.Event>} events 101 * @param {!Array.<!WebInspector.TracingModel.Event>} events
105 * @param {number} position 102 * @param {number} position
106 * @param {number} height 103 * @param {number} height
107 * @return {number} 104 * @return {number}
108 */ 105 */
109 _drawInputEvents: function(events, position, height) 106 _drawInputEvents: function(events, position, height)
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 counters[group] = this._quantDuration; 535 counters[group] = this._quantDuration;
539 this._callback(counters); 536 this._callback(counters);
540 interval -= this._quantDuration; 537 interval -= this._quantDuration;
541 } 538 }
542 this._counters = []; 539 this._counters = [];
543 this._counters[group] = interval; 540 this._counters[group] = interval;
544 this._lastTime = time; 541 this._lastTime = time;
545 this._remainder = this._quantDuration - interval; 542 this._remainder = this._quantDuration - interval;
546 } 543 }
547 } 544 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698