BEP: provide timing information for tests 

For tests, also provide information on the time the test took.

--
Change-Id: I8e71391e4dd97627d6293159a0cbb0d922683af7
Reviewed-on: https://cr.bazel.build/9214
PiperOrigin-RevId: 149547633
MOS_MIGRATED_REVID=149547633
diff --git a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
index 831183a..ac42e14 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
@@ -170,7 +170,8 @@
           .getEventBus()
           .post(
               new TestAttempt(
-                  action, attempt, data.getTestPassed(), testOutputsBuilder.build(), true));
+                  action, attempt, data.getTestPassed(), data.getRunDurationMillis(),
+                  testOutputsBuilder.build(), true));
       finalizeTest(actionExecutionContext, action, dataBuilder.build());
     } catch (IOException e) {
       executor.getEventHandler().handle(Event.error("Caught I/O exception: " + e));
@@ -211,7 +212,10 @@
     dataBuilder.addAllTestProcessTimes(data.getTestProcessTimesList());
     executor
         .getEventBus()
-        .post(new TestAttempt(action, attempt, data.getTestPassed(), testOutputsBuilder.build()));
+        .post(
+            new TestAttempt(
+                action, attempt, data.getTestPassed(), data.getRunDurationMillis(),
+                testOutputsBuilder.build(), false));
     processTestOutput(executor, outErr, new TestResult(action, data, false), testLog);
   }