ATest: Send TF preparation time to clearcut.

Bug: 141085156
Test: atest hello_world_test.
      atest hello_world_test example/reboot.
      ./tools/tradefederation/core/atest/atest_integration_tests.py

Change-Id: Icea030aab0afe85053ddc5becef85846fd905650
diff --git a/atest/atest.py b/atest/atest.py
index 77d59f4..83f25b4 100755
--- a/atest/atest.py
+++ b/atest/atest.py
@@ -650,6 +650,14 @@
                 None, regression_args, reporter)
     metrics.RunTestsFinishEvent(
         duration=metrics_utils.convert_duration(time.time() - test_start))
+    preparation_time = atest_execution_info.preparation_time(test_start)
+    if preparation_time:
+        # Send the preparation time only if it's set.
+        metrics.RunnerFinishEvent(
+            duration=metrics_utils.convert_duration(preparation_time),
+            success=True,
+            runner_name=constants.TF_PREPARATION,
+            test=[])
     if tests_exit_code != constants.EXIT_CODE_SUCCESS:
         tests_exit_code = constants.EXIT_CODE_TEST_FAILURE
     return tests_exit_code