From c01cd76b7d45e7ad513ff2016fdf10168ec925d3 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Mon, 18 Aug 2014 07:07:45 -0600 Subject: [PATCH] Bumping the version because now I'm watching for the $$phase before running a digest. Updated the demo. --- bower.json | 2 +- index.html | 154 +++++++++++++++++++++++++++++++++++++++------------ ng-stats.js | 4 +- package.json | 2 +- 4 files changed, 125 insertions(+), 37 deletions(-) diff --git a/bower.json b/bower.json index b4712e1..cc24e6c 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "ng-stats", "main": "ng-stats.js", - "version": "1.0.2", + "version": "1.0.3", "authors": [ "Kent C. Dodds (http://kent.doddsfamily.us)", "Viper Bailey (http://jinxidoru.blogspot.com)" diff --git a/index.html b/index.html index 05980a3..e39adcc 100644 --- a/index.html +++ b/index.html @@ -7,12 +7,39 @@ .title { text-align: center; } + body { + width: 600px; + margin-left: auto; + margin-right: auto; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + } + pre { + padding: 12px; + background-color: #eee; + } + .item.hovering { + background-color: #eee; + } + strong { + display: block; + margin-top: 12px; + } + .footer { + text-align: center; + margin: 40px 0 20px 0; + }

ng-stats demo

+ Repo on GitHub +
+
+ This is a demo for a little utility to show stats about your page's angular digest/watches. This library currently + has a simple script to produce a chart. It also creates a module called `angularStats` which has a directive called + `angular-stats` which can be used to put angular stats on a specific place on the page that you specify.

Chart

@@ -29,29 +56,56 @@

Directive

Watcher & Digest Simulation

-
- -
- {{item | longFilter}} +
+

Control Watch Count and Digest Length

+
+ +
+

Force Digests

+ You can force digests by mousing over the items below. Notice that the filter wait impacts performance more + quickly than the watch count... In fact, see the huge difference between 0 and 1 milliseconds on the filter wait. + This scenario is most likely to be the case in most apps, however, this demo illustrates the importance of keeping + your watcher expressions lightweight. +
+
+
+ {{item | longFilter}} +
+ +