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

Unified Diff: runtime/observatory/lib/src/elements/object_common.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
Index: runtime/observatory/lib/src/elements/object_common.dart
diff --git a/runtime/observatory/lib/src/elements/object_common.dart b/runtime/observatory/lib/src/elements/object_common.dart
index eea85ffcaf0e5f040952c2ba8f7443185f658f27..1deb5d6023134dfe25a27f581e479c44a61ee9b0 100644
--- a/runtime/observatory/lib/src/elements/object_common.dart
+++ b/runtime/observatory/lib/src/elements/object_common.dart
@@ -15,10 +15,18 @@ class ObjectCommonElement extends ObservatoryElement {
@published ServiceMap path;
@published ServiceMap inboundReferences;
@observable int retainedBytes = null;
+ @observable int reachableBytes = null;
ObjectCommonElement.created() : super.created();
// TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
+ Future<ServiceObject> reachableSize(var dummy) {
+ return object.isolate.getReachableSize(object).then((Instance obj) {
+ // TODO(turnidge): Handle collected/expired objects gracefully.
+ reachableBytes = int.parse(obj.valueAsString);
+ });
+ }
+
Future<ServiceObject> retainedSize(var dummy) {
return object.isolate.getRetainedSize(object).then((Instance obj) {
// TODO(turnidge): Handle collected/expired objects gracefully.
« no previous file with comments | « runtime/observatory/lib/src/elements/class_view.html ('k') | runtime/observatory/lib/src/elements/object_common.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698