goog.testing.PerformanceTimer |
opt_numSamples
: number=
Number of times to run the test function;
defaults to 10.
|
opt_timeoutInterval
: number=
Number of milliseconds after which the
test is to be aborted; defaults to 5 seconds (5,000ms).
|
Finishes the run of a task by creating a result object from samples, in the
format described in
run .
Returns: !Object
Object containing performance stats.
|
code » | |||||||
No description.
Returns: number
The number of times the test function will be run.
|
code » | |||||||
No description.
Returns: number
The number of milliseconds after which the test times out.
|
code » | |||||||
![]()
Execute a function that optionally returns a deferred object and continue
with the given continuation function only once the deferred object has a
result.
Arguments:
|
code » | |||||||
No description.
Returns: boolean
Whether outlier values are discarded prior to computing
stats.
|
code » | |||||||
Executes the test function the required number of times (or until the
test run exceeds the timeout interval, whichever comes first). Returns
an object containing the following:
{ 'average': average execution time (ms) 'count': number of executions (may be fewer than expected due to timeout) 'maximum': longest execution time (ms) 'minimum': shortest execution time (ms) 'standardDeviation': sample standard deviation (ms) 'total': total execution time (ms) } |
code » | |||||||
Executes the test function of the specified task asynchronously. The test
function is expected to take a callback as input and has to call it to signal
that it's done. In addition, if specified, the setUp and tearDown functions
of the task are invoked before and after each invocation of the test
function. Note that setUp/tearDown functions take a callback as input and
must call this callback when they are done.
Arguments:
Returns: !goog.async.Deferred
The deferred result, eventually an object
containing performance stats.
|
code » | |||||||
![]()
Runs a task once, waits for the test function to complete asynchronously
and starts another run if not enough samples have been collected. Otherwise
finishes this task.
Arguments:
|
code » | |||||||
Executes the test function of the specified task as described in
run . In addition, if specified, the set up and tear down functions of
the task are invoked before and after each invocation of the test function.
Arguments:
Returns: !Object
Object containing performance stats.
|
code » | |||||||
![]()
Sets whether to ignore the smallest and the largest values when computing
stats.
Arguments:
|
code » | |||||||
![]()
Sets the number of times the test function will be run.
Arguments:
|
code » | |||||||
![]()
Sets the number of milliseconds after which the test times out.
Arguments:
|
code » |
![]()
Whether to discard outliers (i.e. the smallest and the largest values)
from the sample set before computing statistics. Defaults to false.
|
Code » | |
![]()
Number of times the test function is to be run; defaults to 10.
|
Code » | |
![]()
Number of milliseconds after which the test is to be aborted; defaults to
5,000ms.
|
Code » |
Creates a performance timer results object by analyzing a given array of
sample timings.
|
code » |
![]()
A test function whose performance should be measured or a setUp/tearDown
function. It may optionally return a deferred object. If it does so, the
test harness will assume the function is asynchronous and it must signal
that it's done by setting an (empty) result on the deferred object. If the
function doesn't return anything, the test harness will assume it's
synchronous.
|
Code » |