| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 WebInspector.MemoryCountersGraph = function(delegate, model, filters) | 39 WebInspector.MemoryCountersGraph = function(delegate, model, filters) |
| 40 { | 40 { |
| 41 WebInspector.CountersGraph.call(this, delegate, model, filters); | 41 WebInspector.CountersGraph.call(this, delegate, model, filters); |
| 42 this._countersByName = {}; | 42 this._countersByName = {}; |
| 43 this._countersByName["jsHeapSizeUsed"] = this.createCounter(WebInspector.UIS
tring("JS Heap"), WebInspector.UIString("JS Heap: %s"), "hsl(220, 90%, 43%)", Nu
mber.bytesToString); | 43 this._countersByName["jsHeapSizeUsed"] = this.createCounter(WebInspector.UIS
tring("JS Heap"), WebInspector.UIString("JS Heap: %s"), "hsl(220, 90%, 43%)", Nu
mber.bytesToString); |
| 44 this._countersByName["documents"] = this.createCounter(WebInspector.UIString
("Documents"), WebInspector.UIString("Documents: %s"), "hsl(0, 90%, 43%)"); | 44 this._countersByName["documents"] = this.createCounter(WebInspector.UIString
("Documents"), WebInspector.UIString("Documents: %s"), "hsl(0, 90%, 43%)"); |
| 45 this._countersByName["nodes"] = this.createCounter(WebInspector.UIString("No
des"), WebInspector.UIString("Nodes: %s"), "hsl(120, 90%, 43%)"); | 45 this._countersByName["nodes"] = this.createCounter(WebInspector.UIString("No
des"), WebInspector.UIString("Nodes: %s"), "hsl(120, 90%, 43%)"); |
| 46 this._countersByName["jsEventListeners"] = this.createCounter(WebInspector.U
IString("Listeners"), WebInspector.UIString("Listeners: %s"), "hsl(38, 90%, 43%)
"); | 46 this._countersByName["jsEventListeners"] = this.createCounter(WebInspector.U
IString("Listeners"), WebInspector.UIString("Listeners: %s"), "hsl(38, 90%, 43%)
"); |
| 47 this._gpuMemoryCounter = this.createCounter(WebInspector.UIString("GPU Memor
y"), WebInspector.UIString("GPU Memory [KB]: %s"), "hsl(300, 90%, 43%)", Number.
bytesToString); | 47 this._gpuMemoryCounter = this.createCounter(WebInspector.UIString("GPU Memor
y"), WebInspector.UIString("GPU Memory [KB]: %s"), "hsl(300, 90%, 43%)", Number.
bytesToString); |
| 48 this._countersByName["gpuMemoryUsedKB"] = this._gpuMemoryCounter; | 48 this._countersByName["gpuMemoryUsedKB"] = this._gpuMemoryCounter; |
| 49 } | 49 }; |
| 50 | 50 |
| 51 WebInspector.MemoryCountersGraph.prototype = { | 51 WebInspector.MemoryCountersGraph.prototype = { |
| 52 /** | 52 /** |
| 53 * @override | 53 * @override |
| 54 */ | 54 */ |
| 55 refreshRecords: function() | 55 refreshRecords: function() |
| 56 { | 56 { |
| 57 this.reset(); | 57 this.reset(); |
| 58 var events = this._model.mainThreadEvents(); | 58 var events = this._model.mainThreadEvents(); |
| 59 for (var i = 0; i < events.length; ++i) { | 59 for (var i = 0; i < events.length; ++i) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 var gpuMemoryLimitCounterName = "gpuMemoryLimitKB"; | 73 var gpuMemoryLimitCounterName = "gpuMemoryLimitKB"; |
| 74 if (gpuMemoryLimitCounterName in counters) | 74 if (gpuMemoryLimitCounterName in counters) |
| 75 this._gpuMemoryCounter.setLimit(counters[gpuMemoryLimitCounterNa
me]); | 75 this._gpuMemoryCounter.setLimit(counters[gpuMemoryLimitCounterNa
me]); |
| 76 } | 76 } |
| 77 this.scheduleRefresh(); | 77 this.scheduleRefresh(); |
| 78 }, | 78 }, |
| 79 | 79 |
| 80 __proto__: WebInspector.CountersGraph.prototype | 80 __proto__: WebInspector.CountersGraph.prototype |
| 81 } | 81 }; |
| OLD | NEW |