| 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 var fragment = document.createDocumentFragment(); | 1060 var fragment = document.createDocumentFragment(); |
| 1061 fragment.appendChild(WebInspector.TimelineUIUtils.generatePieChart(aggre
gatedStats)); | 1061 fragment.appendChild(WebInspector.TimelineUIUtils.generatePieChart(aggre
gatedStats)); |
| 1062 var startOffset = startTime - this._model.minimumRecordTime(); | 1062 var startOffset = startTime - this._model.minimumRecordTime(); |
| 1063 var endOffset = endTime - this._model.minimumRecordTime(); | 1063 var endOffset = endTime - this._model.minimumRecordTime(); |
| 1064 var title = WebInspector.UIString("%s \u2013 %s", Number.millisToString(
startOffset), Number.millisToString(endOffset)); | 1064 var title = WebInspector.UIString("%s \u2013 %s", Number.millisToString(
startOffset), Number.millisToString(endOffset)); |
| 1065 | 1065 |
| 1066 for (var i = 0; i < this._overviewControls.length; ++i) { | 1066 for (var i = 0; i < this._overviewControls.length; ++i) { |
| 1067 if (this._overviewControls[i] instanceof WebInspector.TimelinePowerO
verview) { | 1067 if (this._overviewControls[i] instanceof WebInspector.TimelinePowerO
verview) { |
| 1068 var energy = this._overviewControls[i].calculateEnergy(startTime
, endTime); | 1068 var energy = this._overviewControls[i].calculateEnergy(startTime
, endTime); |
| 1069 title += WebInspector.UIString(" Energy: %.2f Joules", energy); | 1069 title += WebInspector.UIString(" Energy: %.2f Joules", energy); |
| 1070 title += WebInspector.UIString(" Accuracy: %s", WebInspector.po
werProfiler.accuracyLevel()); |
| 1070 break; | 1071 break; |
| 1071 } | 1072 } |
| 1072 } | 1073 } |
| 1073 this.showInDetails(title, fragment); | 1074 this.showInDetails(title, fragment); |
| 1074 }, | 1075 }, |
| 1075 | 1076 |
| 1076 /** | 1077 /** |
| 1077 * @param {?WebInspector.TimelineSelection} selection | 1078 * @param {?WebInspector.TimelineSelection} selection |
| 1078 */ | 1079 */ |
| 1079 select: function(selection) | 1080 select: function(selection) |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 * @param {!WebInspector.TimelineModel.Record} record | 1436 * @param {!WebInspector.TimelineModel.Record} record |
| 1436 * @return {boolean} | 1437 * @return {boolean} |
| 1437 */ | 1438 */ |
| 1438 accept: function(record) | 1439 accept: function(record) |
| 1439 { | 1440 { |
| 1440 return !this._hiddenRecords[record.type()]; | 1441 return !this._hiddenRecords[record.type()]; |
| 1441 }, | 1442 }, |
| 1442 | 1443 |
| 1443 __proto__: WebInspector.TimelineModel.Filter.prototype | 1444 __proto__: WebInspector.TimelineModel.Filter.prototype |
| 1444 } | 1445 } |
| OLD | NEW |