aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime
diff options
context:
space:
mode:
authorGravatar Miguel Alcon Pinto <malcon@google.com>2015-03-10 21:27:48 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-11 18:17:38 +0000
commit7cf2365a90ca3080eb89cbb8b746e7cc49d400eb (patch)
treeaf374082c2216c63b8b6ea321fb80ca471fb2ccf /src/main/java/com/google/devtools/build/lib/runtime
parentf4f8c66e20c9a6016d60f869ec6701dde615669d (diff)
Record statistics about dirty output files detected in the output tree.
-- MOS_MIGRATED_REVID=88257621
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index d911820c37..b4308dbfc1 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Lists;
+import com.google.common.collect.Range;
import com.google.common.collect.Sets;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.SubscriberExceptionContext;
@@ -181,6 +182,8 @@ public final class BlazeRuntime {
private Path workingDirectory;
private long commandStartTime;
+ private Range<Long> lastExecutionStartFinish = null;
+
private final SkyframeExecutor skyframeExecutor;
private final Reporter reporter;
@@ -418,6 +421,17 @@ public final class BlazeRuntime {
}
}
+ public void recordLastExecutionTime() {
+ lastExecutionStartFinish = Range.closed(commandStartTime, clock.currentTimeMillis());
+ }
+
+ /**
+ * Range that represents the last execution time of a build in millis since epoch.
+ */
+ @Nullable
+ public Range<Long> getLastExecutionTimeRange() {
+ return lastExecutionStartFinish;
+ }
public void recordCommandStartTime(long commandStartTime) {
this.commandStartTime = commandStartTime;
}