Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple profiler
var profiler = {
layer: $('<div id="profiler" style="position: fixed; left: 0; bottom: 0; width: 200px; z-index: 25000;"></div>'),
cache: {},
init: function(){
this.__inited = true;
$('body').mousemove(function(e) {
if(e.pageX < 200)
{
profiler.layer.css({
left: e.pageX - 200
});
}
});
this.layer.appendTo('body');
},
time: function(id){
this.cache[id] = new Date();
},
timeEnd: function(id){
if(this.__inited) $('<p>' + id + ': <b>' + ((new Date()) - this.cache[id]) + '</b></p>').appendTo(this.layer);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.