性能监控代码

var log = function(msg){
     if(window.console){
            var now = new Date - 0;
            var last = arguments.callee.last;
             if(typeof last === "number"){
               window.console.log(msg +"        :       "+(now-last)+" ms");
            }
            arguments.callee.last = now;
     }
}
原文地址:https://www.cnblogs.com/rubylouvre/p/1891875.html