class RepeatState

Defined at line 127 of file ../../zircon/system/ulib/perftest/include/perftest/perftest.h

This object is passed to the test function. It controls the iteration

of test runs and records the times taken by test runs.

This is a pure virtual interface so that one can potentially use a test

runner other than the one provided by this library.

Public Methods

bool KeepRunning ()

KeepRunning() should be called by test functions using a "while"

loop shown above. A call to KeepRunning() indicates the start or

end of a test run, or both. KeepRunning() returns a bool indicating

whether the caller should do another test run.

void DeclareStep (const char * name)

Calls to DeclareStep() specify the names of the steps that a test

consists of. This is used for multi-step tests. If DeclareStep()

is not called, the test will just have a single step. DeclareStep()

should not be called after the first call to KeepRunning().

void NextStep ()

In multi-step tests, NextStep() should be called between each step

within a test run. So if a test has N steps, NextStep() should be

called N-1 times between calls to KeepRunning().