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

Unified Diff: Source/devtools/front_end/timeline/MemoryCountersGraph.js

Issue 1309723003: DevTools: Refactor memory counter display (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: default formatter complete Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/MemoryCountersGraph.js
diff --git a/Source/devtools/front_end/timeline/MemoryCountersGraph.js b/Source/devtools/front_end/timeline/MemoryCountersGraph.js
index 85555245b7aaa4bab6e1d1a0f32df26d5fd3a133..5e6931e83a04b293d99c8b1b8b1d87ee65298758 100644
--- a/Source/devtools/front_end/timeline/MemoryCountersGraph.js
+++ b/Source/devtools/front_end/timeline/MemoryCountersGraph.js
@@ -39,12 +39,12 @@ WebInspector.MemoryCountersGraph = function(delegate, model)
{
WebInspector.CountersGraph.call(this, WebInspector.UIString("MEMORY"), delegate, model);
this._countersByName = {};
- this._countersByName["jsHeapSizeUsed"] = this.createCounter(WebInspector.UIString("Used JS Heap"), WebInspector.UIString("JS Heap Size: %d"), "hsl(220, 90%, 43%)");
- this._countersByName["documents"] = this.createCounter(WebInspector.UIString("Documents"), WebInspector.UIString("Documents: %d"), "hsl(0, 90%, 43%)");
- this._countersByName["nodes"] = this.createCounter(WebInspector.UIString("Nodes"), WebInspector.UIString("Nodes: %d"), "hsl(120, 90%, 43%)");
- this._countersByName["jsEventListeners"] = this.createCounter(WebInspector.UIString("Listeners"), WebInspector.UIString("Listeners: %d"), "hsl(38, 90%, 43%)");
+ this._countersByName["jsHeapSizeUsed"] = this.createCounter(WebInspector.UIString("JS Heap"), WebInspector.UIString("JS Heap: %s"), "hsl(220, 90%, 43%)", Number.bytesToString);
+ this._countersByName["documents"] = this.createCounter(WebInspector.UIString("Documents"), WebInspector.UIString("Documents: %s"), "hsl(0, 90%, 43%)");
+ this._countersByName["nodes"] = this.createCounter(WebInspector.UIString("Nodes"), WebInspector.UIString("Nodes: %s"), "hsl(120, 90%, 43%)");
+ this._countersByName["jsEventListeners"] = this.createCounter(WebInspector.UIString("Listeners"), WebInspector.UIString("Listeners: %s"), "hsl(38, 90%, 43%)");
if (Runtime.experiments.isEnabled("gpuTimeline")) {
- this._gpuMemoryCounter = this.createCounter(WebInspector.UIString("GPU Memory"), WebInspector.UIString("GPU Memory [KB]: %d"), "hsl(300, 90%, 43%)");
+ this._gpuMemoryCounter = this.createCounter(WebInspector.UIString("GPU Memory"), WebInspector.UIString("GPU Memory [KB]: %s"), "hsl(300, 90%, 43%)", Number.bytesToString);
this._countersByName["gpuMemoryUsedKB"] = this._gpuMemoryCounter;
}
}
« no previous file with comments | « Source/devtools/front_end/timeline/CountersGraph.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698