Namespaces

Records

Functions

  • void WriteJSONString (FILE * out_file, const char * string)

    Defined at line 85 of file ../../zircon/system/ulib/perftest/results.cc

  • template <typename Func, typename Arg, typename... Args>
    void RegisterTest (const char * name, Func test_func, Arg arg, Args... args)

    Convenience routine for registering parameterized perf tests.

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

  • template <SimpleTestFunc test_func>
    void RegisterSimpleTest (const char * test_name)

    Convenience routine for registering a perf test that is specified by a

    function. This is for tests that don't set up any fixtures that are

    shared across invocations of the function.

    This takes the function as a template parameter rather than as a value

    parameter in order to avoid the potential cost of an indirect function

    call.

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

  • template <typename Type>
    void DoNotOptimize (const Type & value)

    DoNotOptimize() can be used to prevent the computation of |value| from

    being optimized away by the compiler. It also prevents the compiler

    from optimizing away reads or writes to memory that |value| points to

    (if |value| is a pointer).

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

  • void RegisterTest (const char * name, fit::function<TestFunc> test_func)

    Defined at line 288 of file ../../zircon/system/ulib/perftest/runner.cc

  • int PerfTestMain (int argc, char ** argv, const char * test_suite)

    Entry point for the perf test runner that a test executable should call

    from main(). This will run the registered perf tests and/or unit tests,

    based on the command line arguments. (See the "--help" output for more

    details.) |test_suite| is included in the test results JSON and is used to

    categorize test results in the performance dashboard.

    Defined at line 496 of file ../../zircon/system/ulib/perftest/runner.cc

  • bool RunTest (const char * test_suiteconst char * test_nameconst fit::function<TestFunc> & test_funcuint32_t run_countResultsSet * results_setfbl::String * error_out)

    Run a single test for |test_suite| |run_count| times, and add the results to

    |results_set| using the given name, |test_name|. On error, this returns

    false and sets |*error_out| to an error string.

    This function is useful for test suites that don't want to use

    PerfTestMain() -- e.g. for test cases with complex parameters based on

    command line arguments, or for test cases that reuse some shared state

    and must be run in a particular order.

    Defined at line 296 of file ../../zircon/system/ulib/perftest/runner.cc