Index: tools/deep_memory_profiler/visualizer/static/index.js |
diff --git a/tools/deep_memory_profiler/visualizer/static/index.js b/tools/deep_memory_profiler/visualizer/static/index.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0499a2fd8f009f69b6b2d96650467859a6bc6d5d |
--- /dev/null |
+++ b/tools/deep_memory_profiler/visualizer/static/index.js |
@@ -0,0 +1,19 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+$(function() { |
+ // Read original data and plot. |
+ // TODO(junjianx): Make file path an argument. |
+ $.getJSON('data/sample.json', function(jsonData) { |
+ // Create model. |
+ var profiler = new Profiler(jsonData); |
+ // Create views subscribing model events. |
+ var graphView = new GraphView(profiler); |
+ var dropdownView = new DropdownView(profiler); |
+ var menuView = new MenuView(profiler); |
+ |
+ // initialize categories according to roots information. |
+ profiler.reparse(); |
+ }); |
+}); |