(function(){var Profiler;Profiler=(function(){function Profiler(){this.profiles={};this.results={};this.timeout=null;this.stack=[]}Profiler.prototype.start=function(id){var _base,_ref;if(this.profiles[id]){return this.stack.push(null)}else{if((_ref=(_base=this.profiles)[id])==null){_base[id]=new Date().getTime()}return this.stack.push(id)}};Profiler.prototype.stop=function(id){var _base,_ref,_this=this;if(id==null){id=this.stack.pop()}if(id===null){return}if((_ref=(_base=this.results)[id])==null){_base[id]=0}this.results[id]+=new Date().getTime()-this.profiles[id];this.profiles[id]=void 0;clearTimeout(this.timeout);return this.timeout=setTimeout(function(){return _this.dump()},1000)};Profiler.prototype.dump=function(){var id;for(id in this.results){console.log("Profiled",id,this.results[id]/1000,"s")}return this.results={}};return Profiler})();window.profiler=new Profiler()}).call(this);