Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Profiling AngularDart Applications

Miško Hevery edited this page Aug 15, 2014 · 5 revisions

Profiling AngularDart Applications with Web Tracing Framework / Dart Observatory

AngularDart is a framework for building Web-Applications. The job of the framework is to handle common repetitive tasks and abstract away the drudgery of building against the low level API. As such it is a black box to most applications. When performance problems arise, there needs to be a way to understand what the framework is doing.

Web Tracing Framework

Web Tracing Framework is an independent project for Rich instrumenting, analyzing, and visualizing any applications web apps. You can install the WTF plugin for Chrome and FireFox. Enabling WTF will negatively impact the performance of the AngularDart application and will skew the results. Keep this in mind.

Dart Observatory

Dart Observatory is a Dart VM specific instrumentation. Unlike WTF (tracing based analysis) the Observatory is statistical sampling based. This means that enabling Observatory has negligible impact on the application being profiled.

Instrumentation

AngularDart lifecycle has been pre-instrumented using scopes and ranges. Both scopes and ranges show as a duration with a given start and end. Scopes are strictly nested (think stack traces, method calling each other), whereas ranges are not strictly nested (think asynchronous operations such as http.)

AngularDart auto detects the presence of WTF and enables the instrumentation. This works in Dartium, Dart2js, developer and minified mode. If WTF is not present then the Scopes are map to Dart Observatory UserTags which allows them to be visualized in Dart Observatory.

You can also use instrument your application code with the same API.

Overview

Clone this wiki locally