OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2013 The Chromium Authors. All rights reserved. | 3 Copyright 2013 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <meta charset="utf-8"> | 7 <meta charset="utf-8"> |
8 <link rel="stylesheet" href="static/index.css"> | 8 <link rel="stylesheet" href="static/index.css"> |
9 <link rel="stylesheet" href="static/third_party/jqTree/jqtree.css"> | 9 <link rel="stylesheet" href="static/third_party/jqTree/jqtree.css"> |
10 | 10 |
11 <script src="static/third_party/flot/jquery.min.js"></script> | 11 <script src="static/third_party/flot/jquery.min.js"></script> |
12 <script src="static/third_party/flot/jquery.flot.min.js"></script> | 12 <script src="static/third_party/flot/jquery.flot.min.js"></script> |
13 <script src="static/third_party/flot/jquery.flot.stack.min.js"></script> | 13 <script src="static/third_party/flot/jquery.flot.stack.min.js"></script> |
14 <script src="static/third_party/jqTree/tree.jquery.js"></script> | 14 <script src="static/third_party/jqTree/tree.jquery.js"></script> |
15 <script src="static/utility.js"></script> | 15 <script src="static/utility.js"></script> |
16 <script src="static/profiler.js"></script> | 16 <script src="static/profiler.js"></script> |
17 <script src="static/graph-view.js"></script> | 17 <script src="static/graph-view.js"></script> |
18 <script src="static/dropdown-view.js"></script> | 18 <script src="static/dropdown-view.js"></script> |
19 <script src="static/menu-view.js"></script> | 19 <script src="static/menu-view.js"></script> |
20 <script src="static/index.js"></script> | 20 <script> |
| 21 $(function() { |
| 22 // Create model. |
| 23 var profiler = new Profiler({{ json|safe }}, {{ template|safe }}); |
| 24 // Create views subscribing model events. |
| 25 var graphView = new GraphView(profiler); |
| 26 var dropdownView = new DropdownView(profiler); |
| 27 var menuView = new MenuView(profiler); |
| 28 |
| 29 // initialize categories according to roots information. |
| 30 profiler.reparse(); |
| 31 }); |
| 32 </script> |
21 | 33 |
22 <body> | 34 <body> |
23 <h2>Deep Memory Profiler Visulaizer</h2> | 35 <h2>Deep Memory Profiler Visulaizer</h2> |
24 <form action="/" method="post"> | 36 <form enctype="multipart/form-data" action="{{ upload_url }}" method="post"> |
25 <input type="file" action=name="data"/> | 37 <input type="file" name="file"/> |
26 <input type="submit"/> | 38 <input type="submit" value="Upload"/> |
27 </form> | 39 </form> |
28 <div id="graph-div"></div> | 40 <div id="graph-div"></div> |
29 <div id="info-div"> | 41 <div id="info-div"> |
30 <div id="subs-dropdown"></div> | 42 <div id="subs-dropdown"></div> |
31 <div id="category-menu"></div> | 43 <div id="category-menu"></div> |
32 </div> | 44 </div> |
33 </body> | 45 </body> |
OLD | NEW |