xxxxxxxxxx
function MethodToTestPerformance()
{
var methodName = arguments.callee.toString().substr('function '.length).substr(0, arguments.callee.toString().substr('function '.length).indexOf('('));
console.time(methodName);
// Existing method body here...
console.timeEnd(methodName);
}
Write the wrapper Javascript in each method to see which Javascript method takes most time to execute