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

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

Issue 2600533002: Added entry for thread information in the isolate view of the observatory. Current information show… (Closed)
Patch Set: Created 4 years 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/isolate_view.dart
diff --git a/runtime/observatory/lib/src/elements/isolate_view.dart b/runtime/observatory/lib/src/elements/isolate_view.dart
index 73fde1acc5b4a5e331d9febdfd4f0c0c314f3a5d..ef157c09efa87c68edca2330885f7d294d5006ef 100644
--- a/runtime/observatory/lib/src/elements/isolate_view.dart
+++ b/runtime/observatory/lib/src/elements/isolate_view.dart
@@ -27,6 +27,7 @@ import 'package:observatory/src/elements/nav/vm_menu.dart';
import 'package:observatory/src/elements/script_inset.dart';
import 'package:observatory/src/elements/source_inset.dart';
import 'package:observatory/src/elements/view_footer.dart';
+import 'package:observatory/utils.dart';
class IsolateViewElement extends HtmlElement implements Renderable {
static const tag =
@@ -133,6 +134,7 @@ class IsolateViewElement extends HtmlElement implements Renderable {
void render() {
final uptime = new DateTime.now().difference(_isolate.startTime);
final libraries = _isolate.libraries.toList();
+ final List<Thread> threads = _isolate.threads;
children = [
navBar([
new NavTopMenuElement(queue: _r.queue),
@@ -294,6 +296,20 @@ class IsolateViewElement extends HtmlElement implements Renderable {
])
.toList()
]
+ ],
+ new DivElement()
+ ..classes = ['memberItem']
+ ..children = [
+ new DivElement()
+ ..classes = ['memberName']
+ ..text = 'threads (${threads.length})',
+ new DivElement()
+ ..classes = ['memberValue']
+ ..children = [
+ new CurlyBlockElement(queue: _r.queue)
+ ..content = threads
+ .map(_populateThreadInfo)
+ ]
]
],
new HRElement(),
@@ -314,6 +330,67 @@ class IsolateViewElement extends HtmlElement implements Renderable {
];
}
+ DivElement _populateThreadInfo(Thread t) {
+ int index = 0;
+ return new DivElement()
+ ..classes = ['indent']
+ ..children = [
+ new SpanElement()
+ ..text = '${t.id} ',
+ new CurlyBlockElement(queue: _r.queue)
+ ..content = [
+ new DivElement()
+ ..classes = ['indent']
+ ..text = 'kind ${t.kindString}',
+ new DivElement()
+ ..children = t.zones
+ .map((z) => new DivElement()
+ ..classes = ['indent']
+ ..children = [
+ new DivElement()
+ ..children = [
+ new SpanElement()
+ ..children = [
+ new SpanElement()
+ ..text = 'zone ${index++} ',
+ new CurlyBlockElement(queue: _r.queue)
+ ..content = [
+ new DivElement()
+ ..classes = ['memberList']
+ ..children = [
+ new DivElement()
+ ..classes = ['memberItem']
+ ..children = [
+ new SpanElement()
+ ..classes = ['memberName']
+ ..text = 'used ',
+ new SpanElement()
+ ..classes = ['memberValue']
+ ..title = '${z.used}B'
+ ..text =
+ Utils.formatSize(z.used)
+ ],
+ new DivElement()
+ ..classes = ['memberItem']
+ ..children = [
+ new SpanElement()
+ ..classes = ['memberName']
+ ..text = 'capacity',
+ new SpanElement()
+ ..classes = ['memberValue']
+ ..title = '${z.capacity}B'
+ ..text =
+ Utils.formatSize(z.capacity)
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ )]
+ ];
+ }
+
Future _loadExtraData() async {
_function = null;
_rootScript = null;

Powered by Google App Engine
This is Rietveld 408576698