diff options
author | aehlig <aehlig@google.com> | 2017-03-30 18:15:06 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2017-03-31 17:10:15 +0200 |
commit | 31a57dc4b3dadfe5ac6c70b9cf57b5983088fa96 (patch) | |
tree | b5e1d382f1b01c204af3db03fee7ea769e681621 /src/main/java/com/google/devtools/build/lib/rules/test | |
parent | 395940c69dcb657fd602f3d319fb50dac7ce52f7 (diff) |
Also report starting times of test actions
Record the starting times of test actions, so that they can be reported
in the build event protocol.
Change-Id: I28e8d7d6ad39d91f4ffdd8a6161a5fc30f9a39b8
PiperOrigin-RevId: 151724760
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/test')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java b/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java index 542659eadd..8e01b0b1ce 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java +++ b/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java @@ -37,6 +37,7 @@ public class TestAttempt implements BuildEvent { private final boolean lastAttempt; private final Collection<Pair<String, Path>> files; private final long durationMillis; + private final long startTimeMillis; /** * Construct the event given the test action and attempt number. @@ -50,6 +51,7 @@ public class TestAttempt implements BuildEvent { TestRunnerAction testAction, Integer attempt, BlazeTestStatus status, + long startTimeMillis, long durationMillis, Collection<Pair<String, Path>> files, boolean lastAttempt) { @@ -57,6 +59,7 @@ public class TestAttempt implements BuildEvent { this.attempt = attempt; this.status = status; this.cachedLocally = cachedLocally; + this.startTimeMillis = startTimeMillis; this.durationMillis = durationMillis; this.files = files; this.lastAttempt = lastAttempt; @@ -66,10 +69,11 @@ public class TestAttempt implements BuildEvent { TestRunnerAction testAction, Integer attempt, BlazeTestStatus status, + long startTimeMillis, long durationMillis, Collection<Pair<String, Path>> files, boolean lastAttempt) { - this(false, testAction, attempt, status, durationMillis, files, lastAttempt); + this(false, testAction, attempt, status, startTimeMillis, durationMillis, files, lastAttempt); } public TestAttempt( @@ -78,7 +82,7 @@ public class TestAttempt implements BuildEvent { BlazeTestStatus status, Collection<Pair<String, Path>> files, boolean lastAttempt) { - this(testAction, attempt, status, 0, files, lastAttempt); + this(testAction, attempt, status, 0, 0, files, lastAttempt); } public TestAttempt( @@ -96,6 +100,7 @@ public class TestAttempt implements BuildEvent { result.getTestAction(), 1, data.getStatus(), + data.getStartTimeMillisEpoch(), data.getRunDurationMillis(), result.getFiles(), true); @@ -130,6 +135,7 @@ public class TestAttempt implements BuildEvent { BuildEventStreamProtos.TestResult.newBuilder(); builder.setStatus(BuildEventStreamerUtils.bepStatus(status)); builder.setCachedLocally(cachedLocally); + builder.setTestAttemptStartMillisEpoch(startTimeMillis); builder.setTestAttemptDurationMillis(durationMillis); for (Pair<String, Path> file : files) { builder.addTestActionOutput( |