OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |