Merge pull request #84 from randym/instrumentation

WIP! Added first level instrumentation for travis-web
This commit is contained in:
Piotr Sarnacki 2013-01-03 07:13:34 -08:00
commit 938aaafc71
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)
}