Add function output_perf_value() that tests can use to output perf measurements.

Also modify platform_GesturesRegressionTest to invoke this function.

The output_perf_value() function causes perf measurements to be outputted
to a result file named "perf_measurements" in the test result directory,
next to the "keyval" file where perf keyvals are currently written.  Once
ready, all chromeOS perf tests that need to output perf measurements will
be converted to use output_perf_value() rather than write_perf_keyval().

This change is the first part of a series of changes in which we are
changing how autotest handles and stores perf test data, to align more
closely with the information required by Chrome team's performance
dashboard.  In a later CL, the autotest TKO parser will be modified to
parse the "perf_measurements" file and insert that data into the results
database.

BUG=chromium:258226,chromium:258228
TEST=Invoked run_remote_tests.sh with the new version of
platform_GesturesRegressionTest on a local lumpy device, then verified that
the result directory on the device contained a "perf_measurements" text file
with the expected info.

Change-Id: I43bad95b4413139bff47b121667d107dfc054519
Reviewed-on: https://gerrit.chromium.org/gerrit/61565
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
2 files changed