~ubuntu-branches/ubuntu/lucid/loggerhead/lucid-security

« back to all changes in this revision

Viewing changes to loggerhead/static/javascript/yui/build/profiler/profiler-min.js

  • Committer: Bazaar Package Importer
  • Author(s): James Westby, Roland Mas, Jelmer Vernooij, James Westby
  • Date: 2009-08-26 13:18:03 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090826131803-0ce1fhaetci8b0c5
Tags: 1.17-0ubuntu1
[ Roland Mas ]
* Use the YUI library provided by libjs-yui. (Closes: #511286)

[ Jelmer Vernooij ]
* Use my debian.org address in Uploaders field.
* Add ${misc:Depends} to please lintian.
* Suggest recent version of paste, which doesn't expose internal port
  numbers in links. (Closes: #507000)
* Bump standards version to 3.8.1.

[ James Westby ]
* New upstream release.
* Drop get-orig-source rule in favour of debian/watch.
* Add python-pkg-resources and python-paste to Build-Depends,
  python-pkg-resources to Depends and python-simplejson to
  Recommends due to dependency changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
 
3
Code licensed under the BSD License:
 
4
http://developer.yahoo.net/yui/license.txt
 
5
version: 3.0.0pr2
 
6
*/
 
7
YUI.add("profiler",function(Y){var L=Y.Lang;Y.Profiler={_container:{},_report:{},_saveData:function(name,duration){var functionData=this._report[name];functionData.calls++;functionData.points.push(duration);if(functionData.calls>1){functionData.avg=((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;functionData.min=Math.min(functionData.min,duration);functionData.max=Math.max(functionData.max,duration);}else{functionData.avg=duration;functionData.min=duration;functionData.max=duration;}},getAverage:function(name){return this._report[name].avg;},getCallCount:function(name){return this._report[name].calls;},getMax:function(name){return this._report[name].max;},getMin:function(name){return this._report[name].min;},getFunctionReport:function(name){return this._report[name];},getFullReport:function(filter){filter=filter||function(){return true;};if(typeof filter=="function"){var report={};for(var name in this._report){if(filter(this._report[name])){report[name]=this._report[name];}}return report;}},registerConstructor:function(name,owner){this.registerFunction(name,owner,true);},registerFunction:function(name,owner,registerPrototype){var funcName=(name.indexOf(".")>-1?name.substring(name.lastIndexOf(".")+1):name);if(!L.isObject(owner)){owner=eval(name.substring(0,name.lastIndexOf(".")));}var method=owner[funcName];var prototype=method.prototype;if(L.isFunction(method)&&!method.__yuiProfiled){this._container[name]=method;owner[funcName]=function(){var start=new Date();var retval=method.apply(this,arguments);var stop=new Date();Y.Profiler._saveData(name,stop-start);return retval;};Y.mix(owner[funcName],method);owner[funcName].__yuiProfiled=true;owner[funcName].prototype=prototype;this._container[name].__yuiOwner=owner;this._container[name].__yuiFuncName=funcName;if(registerPrototype){this.registerObject(name+".prototype",prototype);}this._report[name]={calls:0,max:0,min:0,avg:0,points:[]};}return method;},registerObject:function(name,object,recurse){object=(L.isObject(object)?object:eval(name));this._container[name]=object;for(var prop in object){if(typeof object[prop]=="function"){if(prop!="constructor"&&prop!="superclass"){this.registerFunction(name+"."+prop,object);}}else{if(typeof object[prop]=="object"&&recurse){this.registerObject(name+"."+prop,object[prop],recurse);}}}},unregisterConstructor:function(name){if(L.isFunction(this._container[name])){this.unregisterFunction(name,true);}},unregisterFunction:function(name,unregisterPrototype){if(L.isFunction(this._container[name])){if(unregisterPrototype){this.unregisterObject(name+".prototype",this._container[name].prototype);}var owner=this._container[name].__yuiOwner;var funcName=this._container[name].__yuiFuncName;delete this._container[name].__yuiOwner;delete this._container[name].__yuiFuncName;owner[funcName]=this._container[name];delete this._container[name];delete this._report[name];}},unregisterObject:function(name,recurse){if(L.isObject(this._container[name])){var object=this._container[name];for(var prop in object){if(typeof object[prop]=="function"){this.unregisterFunction(name+"."+prop);}else{if(typeof object[prop]=="object"&&recurse){this.unregisterObject(name+"."+prop,recurse);}}}delete this._container[name];}}};},"3.0.0pr2");
 
 
b'\\ No newline at end of file'