| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library heap_snapshot_element; | 5 library heap_snapshot_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/app.dart'; | 10 import 'package:observatory/app.dart'; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 firstColumn.style.justifyContent = 'flex-start'; | 58 firstColumn.style.justifyContent = 'flex-start'; |
| 59 firstColumn.style.position = 'relative'; | 59 firstColumn.style.position = 'relative'; |
| 60 firstColumn.style.alignItems = 'center'; | 60 firstColumn.style.alignItems = 'center'; |
| 61 firstColumn.style.setProperty('overflow-x', 'hidden'); | 61 firstColumn.style.setProperty('overflow-x', 'hidden'); |
| 62 | 62 |
| 63 var percentRetained = vertex.retainedSize / snapshot.graph.size; | 63 var percentRetained = vertex.retainedSize / snapshot.graph.size; |
| 64 var percentNode = new SpanElement(); | 64 var percentNode = new SpanElement(); |
| 65 percentNode.text = Utils.formatPercentNormalized(percentRetained); | 65 percentNode.text = Utils.formatPercentNormalized(percentRetained); |
| 66 percentNode.style.minWidth = '5em'; | 66 percentNode.style.minWidth = '5em'; |
| 67 percentNode.style.textAlign = 'right'; | 67 percentNode.style.textAlign = 'right'; |
| 68 percentNode.title = "Retaining x of y."; | 68 percentNode.title = "Percent of heap being retained"; |
| 69 percentNode.style.display = 'inline-block'; | 69 percentNode.style.display = 'inline-block'; |
| 70 firstColumn.children.add(percentNode); | 70 firstColumn.children.add(percentNode); |
| 71 | 71 |
| 72 var gap = new SpanElement(); | 72 var gap = new SpanElement(); |
| 73 gap.style.minWidth = '1em'; | 73 gap.style.minWidth = '1em'; |
| 74 gap.style.display = 'inline-block'; | 74 gap.style.display = 'inline-block'; |
| 75 firstColumn.children.add(gap); | 75 firstColumn.children.add(gap); |
| 76 | 76 |
| 77 AnyServiceRefElement objectRef = new Element.tag("any-service-ref"); | 77 AnyServiceRefElement objectRef = new Element.tag("any-service-ref"); |
| 78 String hexAddress = vertex.address.toRadixString(16); | 78 String hexAddress = vertex.address.toRadixString(16); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 452 |
| 453 new Future.delayed(const Duration(milliseconds: 500), () { | 453 new Future.delayed(const Duration(milliseconds: 500), () { |
| 454 buildMergedVertices(snapshot.graph).then((vertices) { | 454 buildMergedVertices(snapshot.graph).then((vertices) { |
| 455 state = 'Loaded'; | 455 state = 'Loaded'; |
| 456 var rootRow = new MergedVerticesRow(tree, null, isolate, vertices); | 456 var rootRow = new MergedVerticesRow(tree, null, isolate, vertices); |
| 457 tree.initialize(rootRow); | 457 tree.initialize(rootRow); |
| 458 }); | 458 }); |
| 459 }); | 459 }); |
| 460 } | 460 } |
| 461 } | 461 } |
| OLD | NEW |