Module ringo/profiler
A profiler for measuring execution time of JavaScript functions. Note that you need to run with optimization level -1 for profiling to work. Running the profiler on optimized code will produce no data.
Functions
- profile (func, maxFrames)
Class Profiler
Instance Methods
- formatResult(maxFrames)
- getFrames()
- getScriptFrame(cx, script)
- toString()
Profiler ()
A class for measuring the frequency and runtime of function invocations.
Profiler.prototype. formatResult (maxFrames)
Parameters
Number | maxFrames | optional maximal number of frames to include |
Profiler.prototype. getFrames ()
Profiler.prototype. toString ()
profile (func, maxFrames)
Convenience function for profiling the invocation of a function.
Parameters
Function | func | the function to profile |
Number | maxFrames | optional maximal number of frames to include |
Returns
Object | an object with the following properties:
|