I have been going through this post regarding newly added features in EmberJS. One of them being Ember.Instrumentation, can anyone explain where do we use it, if possible with an example…Thanks
I have been going through this post regarding newly added features in EmberJS. One
Share
Why
Instrumentation in general is a way to measure performance and other metrics in your app by subscribing to namespaced listeners. It can also be useful for debugging.
Example
I can’t take credit for making this fiddle, I only saw it last night at the NYC ember.js meetup, but this should provide some context:
http://jsfiddle.net/2Pn3f/6/
In my attempt to figure out who presented this, I could only find his meetup profile: http://www.meetup.com/EmberJS-NYC/members/6706336/
To see the magic happen, open your console and start marking students as ‘here.’
See the StudentView near the top and Em.Subscribe at the bottom.
…
Side note
What’s even cooler is that you can subscribe to ember’s use of instrumentation by using the wildcard.
http://jsfiddle.net/dmazza/sUvdg/
Documentation
See the documentation for details: http://emberjs.com/api/classes/Ember.Instrumentation.html