Added first level instrumentation for travis-web

This is not enabled by default. You need to run:

Travis.Instrumentation.subscribe('render.view')

To start capturing info
This commit is contained in:
Randy Morgan 2012-12-14 19:31:05 +09:00
parent 91812fb21c
commit fa7f8b9332
2 changed files with 9 additions and 0 deletions

View File

@ -13,6 +13,7 @@ require 'views'
require 'config/locales'
require 'data/sponsors'
require 'travis/instrumentation'
# $.mockjaxSettings.log = false
# Ember.LOG_BINDINGS = true
# Ember.ENV.RAISE_ON_DEPRECATION = true

View File

@ -0,0 +1,8 @@
Travis.Instrumentation = {
subscribe: (event) ->
Em.subscribe event,
before:(name, timestamp, payload) ->
timestamp
after: (name, timestamp, payload, start_timestamp) ->
console.log(name, payload, timestamp - start_timestamp)
}