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

Unified Diff: runtime/observatory/lib/src/elements/class_view.dart

Issue 1453983002: Add RPC and UI for reachable size of an object / all instances of a class. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/class_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/class_view.dart
diff --git a/runtime/observatory/lib/src/elements/class_view.dart b/runtime/observatory/lib/src/elements/class_view.dart
index 998f82d6a914ab1fed3f502c79ccfc4524abfcf9..8c67ebcfd677c6518ef8d843fbf405800f478cbd 100644
--- a/runtime/observatory/lib/src/elements/class_view.dart
+++ b/runtime/observatory/lib/src/elements/class_view.dart
@@ -15,6 +15,7 @@ import 'package:polymer/polymer.dart';
class ClassViewElement extends ObservatoryElement {
@published Class cls;
@observable ServiceMap instances;
+ @observable int reachableBytes;
@observable int retainedBytes;
@observable ObservableList mostRetained;
SampleBufferControlElement sampleBufferControlElement;
@@ -44,6 +45,12 @@ class ClassViewElement extends ObservatoryElement {
}
// TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
+ Future<ServiceObject> reachableSize(var dummy) {
+ return cls.isolate.getReachableSize(cls).then((Instance obj) {
+ reachableBytes = int.parse(obj.valueAsString);
+ });
+ }
+
Future<ServiceObject> retainedSize(var dummy) {
return cls.isolate.getRetainedSize(cls).then((Instance obj) {
retainedBytes = int.parse(obj.valueAsString);
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/class_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698