testing.PerformanceTable Extends
A UI widget that runs performance tests and displays the results.

Inheritance

Constructor

goog.testing.PerformanceTable(rootopt_timeropt_precision)

Parameters

root : Element
The element where the table should be attached.
opt_timer : goog.testing.PerformanceTimer=
A timer to use for executing functions and profiling them.
opt_precision : number=
Number of digits of precision to include in results. Defaults to 0.

Instance Methods

Public Protected Private
getTableBody_() Element
No description.
Returns: Element  The body of the table.
code »
No description.
Returns: goog.testing.PerformanceTimer  The timer being used.
code »
initRoot_()
Render the initial table.
code »
recordResults(resultsopt_desc)
Record a performance timer results object to the performance table. See goog.testing.PerformanceTimer for details of the format of this object.
Arguments:
results : Object
The performance timer results object.
opt_desc : string=
A description to associate with these results.
code »
reportError(reason)
Report an error in the table.
Arguments:
reason : *
The reason for the error.
code »
round_(num) string
Round to the specified precision.
Arguments:
num : number
The number to round.
Returns: string  The rounded number, as a string.
code »
run(fnopt_desc)
Run the given function with the performance timer, and show the results.
Arguments:
fn : Function
The function to run.
opt_desc : string=
A description to associate with this run.
code »
runTask(taskopt_desc)
Run the given task with the performance timer, and show the results.
Arguments:
task : goog.testing.PerformanceTimer.Task
The performance timer task to run.
opt_desc : string=
A description to associate with this run.
code »

Instance Properties

precision_ :
Number of digits of precision to include in results. Defaults to 0.
Code »
root_ :
Where the table should be attached.
Code »
A timer for running the tests.
Code »

Package testing

Package Reference