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

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

Issue 336713005: [Blink] [PowerProfiler] Support accuracy level attribute for power data provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing! 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 unified diff | Download patch
« no previous file with comments | « Source/devtools/front_end/sdk/PowerProfiler.js ('k') | Source/devtools/protocol.json » ('j') | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 var pieChartContainer = document.createElement("div"); 1099 var pieChartContainer = document.createElement("div");
1100 pieChartContainer.classList.add("vbox", "timeline-range-summary"); 1100 pieChartContainer.classList.add("vbox", "timeline-range-summary");
1101 var startOffset = startTime - this._model.minimumRecordTime(); 1101 var startOffset = startTime - this._model.minimumRecordTime();
1102 var endOffset = endTime - this._model.minimumRecordTime(); 1102 var endOffset = endTime - this._model.minimumRecordTime();
1103 var title = WebInspector.UIString("Range: %s \u2013 %s", Number.millisTo String(startOffset), Number.millisToString(endOffset)); 1103 var title = WebInspector.UIString("Range: %s \u2013 %s", Number.millisTo String(startOffset), Number.millisToString(endOffset));
1104 1104
1105 for (var i = 0; i < this._overviewControls.length; ++i) { 1105 for (var i = 0; i < this._overviewControls.length; ++i) {
1106 if (this._overviewControls[i] instanceof WebInspector.TimelinePowerO verview) { 1106 if (this._overviewControls[i] instanceof WebInspector.TimelinePowerO verview) {
1107 var energy = this._overviewControls[i].calculateEnergy(startTime , endTime); 1107 var energy = this._overviewControls[i].calculateEnergy(startTime , endTime);
1108 title += WebInspector.UIString(" Energy: %.2f Joules", energy); 1108 title += WebInspector.UIString(" Energy: %.2f Joules", energy);
1109 title += WebInspector.UIString(" Accuracy: %s", WebInspector.po werProfiler.getAccuracyLevel());
1109 break; 1110 break;
1110 } 1111 }
1111 } 1112 }
1112 pieChartContainer.appendChild(document.createTextNode(title)); 1113 pieChartContainer.appendChild(document.createTextNode(title));
1113 pieChartContainer.appendChild(WebInspector.TimelineUIUtils.generatePieCh art(aggregatedStats)); 1114 pieChartContainer.appendChild(WebInspector.TimelineUIUtils.generatePieCh art(aggregatedStats));
1114 this.showInDetails(WebInspector.UIString("Selected Range"), pieChartCont ainer); 1115 this.showInDetails(WebInspector.UIString("Selected Range"), pieChartCont ainer);
1115 }, 1116 },
1116 1117
1117 /** 1118 /**
1118 * @param {?WebInspector.TimelineSelection} selection 1119 * @param {?WebInspector.TimelineSelection} selection
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 * @param {!WebInspector.TimelineModel.Record} record 1467 * @param {!WebInspector.TimelineModel.Record} record
1467 * @return {boolean} 1468 * @return {boolean}
1468 */ 1469 */
1469 accept: function(record) 1470 accept: function(record)
1470 { 1471 {
1471 return !this._hiddenTypes[record.type()]; 1472 return !this._hiddenTypes[record.type()];
1472 }, 1473 },
1473 1474
1474 __proto__: WebInspector.TimelineModel.Filter.prototype 1475 __proto__: WebInspector.TimelineModel.Filter.prototype
1475 } 1476 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/PowerProfiler.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698