The goog.testing.PerformanceTable Class

goog.testing.PerformanceTable(root, opt_timer, opt_precision)

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

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.

.getTimer()

returns {goog.testing.PerformanceTimer}
The timer being used.

.recordResults(results, opt_desc)

Record a performance timer results object to the performance table. See {@code goog.testing.PerformanceTimer} for details of the format of this object.

results {Object}
The performance timer results object.
opt_desc {string=}
A description to associate with these results.

.reportError(reason)

Report an error in the table.

reason {*}
The reason for the error.

.run(fn, opt_desc)

Run the given function with the performance timer, and show the results.

fn {Function}
The function to run.
opt_desc {string=}
A description to associate with this run.

.runTask(task, opt_desc)

Run the given task with the performance timer, and show the results.

task {goog.testing.PerformanceTimer.Task}
The performance timer task to run.
opt_desc {string=}
A description to associate with this run.