- Dart:Scalable Application Development
- Davy Mitchell Sergey Akopkokhyants Ivo Balbaert
- 225字
- 2021-07-09 18:56:27
Observing the Dart VM internals
If you have been watching the output window keenly as you have launched Dart projects, you will have noticed references to the Observatory. This tool (which is part of the Dart SDK) allows developers to look inside a running Dart virtual machine, and profile the ongoing activities. This is useful to find out exactly what an application is doing and where bottlenecks exist.

The Observatory supports command line applications and web applications (Dart versions and not the compiled to JavaScript output) running in Dartium. To enable it, simply pass one of the many Observatory command line parameters—see the SDK documents (https://www.dartlang.org/tools/dart-vm/) for a full listing:
dart --enable-vm-service bin/main.dart
Launch the main.dart
program with the Observatory attached, and browse to the address localhost:8181
(note that this port number can change though it can be specified in the launch command parameter --enable-vm-service=<port>/<IP address>
):
chromium.exe index.html
Launch index.html
with the Observatory attached. The address to put into the web browser will be shown:
Observatory listening on http://127.0.0.1:34935
The URLs can be opened in any web browser, the most important feature is the Refresh button, that appears and re-samples the data that is being displayed.
While you are waiting for the data monitor to collect data, take some time to explore the inner workings of the Dart VM as it runs the code.
- DB2 V9權(quán)威指南
- 嵌入式軟件系統(tǒng)測試:基于形式化方法的自動化測試解決方案
- JavaScript修煉之道
- 單片機C語言程序設(shè)計實訓(xùn)100例:基于STC8051+Proteus仿真與實戰(zhàn)
- JavaScript 網(wǎng)頁編程從入門到精通 (清華社"視頻大講堂"大系·網(wǎng)絡(luò)開發(fā)視頻大講堂)
- NLTK基礎(chǔ)教程:用NLTK和Python庫構(gòu)建機器學(xué)習(xí)應(yīng)用
- PyTorch自然語言處理入門與實戰(zhàn)
- 教孩子學(xué)編程:C++入門圖解
- Redis Essentials
- PLC編程與調(diào)試技術(shù)(松下系列)
- 深入分布式緩存:從原理到實踐
- 區(qū)塊鏈技術(shù)與應(yīng)用
- Java面向?qū)ο蟪绦蛟O(shè)計
- 動手學(xué)數(shù)據(jù)結(jié)構(gòu)與算法
- Hands-On JavaScript for Python Developers