function profiling(fnc){ var start = new Date; fnc(); return {fnc: fnc.name, time: new Date - start}; }