aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/util
diff options
context:
space:
mode:
authorGravatar nharmata <nharmata@google.com>2018-02-23 11:37:51 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-23 11:39:16 -0800
commit3fb7d34ed00fa88f2d9d5a2aa530e3a4cf70c1d9 (patch)
treead788977eb72a3d3fc1f208f323de99dbf362306 /src/main/java/com/google/devtools/build/lib/util
parentd829236e9feee234fde3a4aed36e1349b7e9ee16 (diff)
A couple quality-of-life improvements for Bazel devs, in response to an email from philwo@.
(i) Only have TimestampGranularityMonitor log the first file of relevance. This reduces log spam, especially in tests, while still maintaining useful information in the logs. (ii) Don't have ExternalFilesHelper log the fact that it encountered an external file when we're in a unit test or an integration test. Tests, especially bazel tests that use external repositories, tend to involve lots of "external" files. RELNOTES: None PiperOrigin-RevId: 186799176
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/util')
-rw-r--r--src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java b/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java
index dee3fb6ee7..12cb4897f9 100644
--- a/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java
+++ b/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java
@@ -126,11 +126,11 @@ public class TimestampGranularityMonitor {
*/
@ThreadSafe
public void notifyDependenceOnFileTime(PathFragment path, long ctimeMillis) {
- if (ctimeMillis == this.commandStartTimeMillis) {
+ if (!this.waitAMillisecond && ctimeMillis == this.commandStartTimeMillis) {
logger.info("Will have to wait for a millisecond on completion because of " + path);
this.waitAMillisecond = true;
}
- if (ctimeMillis == this.commandStartTimeMillisRounded) {
+ if (!this.waitASecond && ctimeMillis == this.commandStartTimeMillisRounded) {
logger.info("Will have to wait for a second on completion because of " + path);
this.waitASecond = true;
}