| OLD | NEW |
| (Empty) | |
| 1 <link rel="import" href="../../../../packages/polymer/polymer.html"> |
| 2 <link rel="import" href="class_ref.html"> |
| 3 <link rel="import" href="observatory_element.html"> |
| 4 <link rel="import" href="nav_bar.html"> |
| 5 <link rel="import" href="view_footer.html"> |
| 6 |
| 7 <polymer-element name="heap-snapshot" extends="observatory-element"> |
| 8 <template> |
| 9 <link rel="stylesheet" href="css/shared.css"> |
| 10 <nav-bar> |
| 11 <top-nav-menu></top-nav-menu> |
| 12 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu> |
| 13 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu> |
| 14 <nav-menu link="{{ makeLink('/heap-snapshot', isolate) }}" anchor="heap snap
shot" last="{{ true }}"></nav-menu> |
| 15 <nav-refresh callback="{{ refresh }}"></nav-refresh> |
| 16 </nav-bar> |
| 17 <style> |
| 18 /* general */ |
| 19 .well { |
| 20 background-color: #ECECEC; |
| 21 padding: 0.2em; |
| 22 } |
| 23 .center { |
| 24 align-items: center; |
| 25 justify-content: center; |
| 26 } |
| 27 |
| 28 /* status messages */ |
| 29 .statusMessage { |
| 30 font-size: 150%; |
| 31 font-weight: bold; |
| 32 } |
| 33 .statusBox { |
| 34 height: 100%; |
| 35 padding: 1em; |
| 36 } |
| 37 |
| 38 /* tables */ |
| 39 .table { |
| 40 border-collapse: collapse!important; |
| 41 table-layout: fixed; |
| 42 height: 100%; |
| 43 } |
| 44 .th, .td { |
| 45 padding: 8px; |
| 46 vertical-align: top; |
| 47 } |
| 48 .table thead > tr > th { |
| 49 vertical-align: bottom; |
| 50 text-align: left; |
| 51 border-bottom:2px solid #ddd; |
| 52 } |
| 53 .spacer { |
| 54 width: 16px; |
| 55 } |
| 56 .left-border-spacer { |
| 57 width: 16px; |
| 58 border-left: 1px solid; |
| 59 } |
| 60 .clickable { |
| 61 color: #0489c3; |
| 62 text-decoration: none; |
| 63 cursor: pointer; |
| 64 min-width: 8em; |
| 65 } |
| 66 .clickable:hover { |
| 67 text-decoration: underline; |
| 68 cursor: pointer; |
| 69 } |
| 70 tr:hover:not(.focused) > td { |
| 71 background-color: #FAFAFA; |
| 72 } |
| 73 .focused { |
| 74 background-color: #F4C7C3; |
| 75 } |
| 76 .scroll { |
| 77 overflow: scroll; |
| 78 } |
| 79 .outlined { |
| 80 -webkit-box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.75); |
| 81 -moz-box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.75); |
| 82 box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.75); |
| 83 margin: 4px; |
| 84 } |
| 85 .centered { |
| 86 margin-left: auto; |
| 87 margin-right: auto; |
| 88 justify-content: center; |
| 89 } |
| 90 .full-height { |
| 91 height: 100%; |
| 92 } |
| 93 .mostly-full-height { |
| 94 height: 80%; |
| 95 } |
| 96 .full-width { |
| 97 width: 100%; |
| 98 } |
| 99 .focused-function-label { |
| 100 flex: 0 1 auto; |
| 101 margin-left: auto; |
| 102 margin-right: auto; |
| 103 justify-content: center; |
| 104 } |
| 105 .call-table { |
| 106 flex: 1 1 auto; |
| 107 } |
| 108 |
| 109 .tree { |
| 110 border-spacing: 0px; |
| 111 width: 100%; |
| 112 margin-bottom: 20px |
| 113 vertical-align: middle; |
| 114 } |
| 115 |
| 116 .tree tbody tr { |
| 117 animation: fadeIn 0.5s; |
| 118 -moz-animation: fadeIn 0.5s; |
| 119 -webkit-animation: fadeIn 0.5s; |
| 120 } |
| 121 |
| 122 .tree tbody tr:hover { |
| 123 background-color: #FAFAFA; |
| 124 } |
| 125 |
| 126 .tree tr td:first-child, |
| 127 .tree tr th:first-child { |
| 128 width: 100%; |
| 129 } |
| 130 |
| 131 .tree thead > tr > th { |
| 132 padding: 8px; |
| 133 vertical-align: bottom; |
| 134 text-align: left; |
| 135 border-bottom: 1px solid #ddd; |
| 136 } |
| 137 </style> |
| 138 <div class="content-centered-big"> |
| 139 <h1>Heap Snapshot</h1> |
| 140 <hr> |
| 141 <template if="{{ state != 'Done' }}"> |
| 142 <div class="statusBox shadow center"> |
| 143 <div class="statusMessage">{{state}}</div> |
| 144 </div> |
| 145 </template> |
| 146 <template if="{{ state == 'Done' }}"> |
| 147 <div class="memberList"> |
| 148 <div class="memberItem"> |
| 149 <div class="memberName">Refreshed at </div> |
| 150 <div class="memberValue">{{ snapshot.timeStamp }}</div> |
| 151 </div> |
| 152 <div class="memberItem"> |
| 153 <div class="memberName">Objects </div> |
| 154 <div class="memberValue">{{ snapshot.graph.vertexCount }}</div> |
| 155 </div> |
| 156 <div class="memberItem"> |
| 157 <div class="memberName">References </div> |
| 158 <div class="memberValue">{{ snapshot.graph.edgeCount }}</div> |
| 159 </div> |
| 160 <div class="memberItem"> |
| 161 <div class="memberName">Size </div> |
| 162 <div class="memberValue">{{ snapshot.graph.size | formatSize }}</div> |
| 163 </div> |
| 164 </div> |
| 165 <div class="memberItem"> |
| 166 <div class="memberName">Analysis </div> |
| 167 <div class="memberValue"> |
| 168 <select value="{{analysisSelector}}"> |
| 169 <option value="DominatorTree">Dominator tree</option> |
| 170 <option value="MergeByClass">Group by class</option> |
| 171 </select> |
| 172 </div> |
| 173 </div> |
| 174 </template> |
| 175 </div> |
| 176 <br> |
| 177 <div class="content-centered-big"> |
| 178 <div class="tableWell shadow"> |
| 179 <table class="full-width tree"> |
| 180 <thead id="treeHeader"> |
| 181 <tr> |
| 182 <th> |
| 183 <template if="{{analysisSelector == 'DominatorTree'}}">Object</templ
ate> |
| 184 <template if="{{analysisSelector == 'MergeByClass'}}">Class</templat
e> |
| 185 </th> |
| 186 <th style="white-space: nowrap"> |
| 187 <template if="{{analysisSelector == 'DominatorTree'}}">Retained Size
</template> |
| 188 <template if="{{analysisSelector == 'MergeByClass'}}">Shallow Size</
template> |
| 189 </th> |
| 190 </tr> |
| 191 </thead> |
| 192 <tbody id="treeBody"></tbody> |
| 193 </table> |
| 194 </div> |
| 195 </div> |
| 196 <view-footer></view-footer> |
| 197 </template> |
| 198 </polymer-element> |
| 199 |
| 200 <script type="application/dart" src="heap_snapshot.dart"></script> |
| OLD | NEW |