averageTime
Integer
averageTime
(
fn
)
Returns the average execution time of a function
- Parameters:
-
fn <String>The name of the function to be profiled
- Returns:
Integer - The average execution time in milliseconds
callCount
Integer
callCount
(
fn
)
Returns how many times a function has been called
- Parameters:
-
fn <String>The name of the function to be profiled
- Returns:
Integer - The number of call
maxTime
Integer
maxTime
(
fn
)
Returns the maximum execution time of a function
- Parameters:
-
fn <String>The name of the function to be profiled
- Returns:
Integer - The maximum execution time in milliseconds
minTime
Integer
minTime
(
fn
)
Returns the minimum execution time of a function
- Parameters:
-
fn <String>The name of the function to be profiled
- Returns:
Integer - The minimum execution time in milliseconds
profile
void
profile
(
fn
,
namespace
,
callback
,
params
)
Profile a function, logging a lot of usefull informations
- Parameters:
-
fn <String>Name of the function -
namespace <String>The namespace of the funcion, default window -
callback <Function>The function to be profiled passed as a callback -
params <Object>Parameters to pass to the function
- Returns:
void
register
void
register
(
fn
,
namespace
)
Register a function to the profiler
- Parameters:
-
fn <String>The name of the function to be profiled -
namespace <String>The namespace of the funcion, default window
- Returns:
void
unregister
void
unregister
(
fn
)
Unregister a function from the profiler and stop profiling it
- Parameters:
-
fn <String>The name of the function to be profiled
- Returns:
void