Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Update the SimpleConsoleEventBusListener output once every 15s
Browse files Browse the repository at this point in the history
Without this, systems that timeout after too long
without output on stdout/stderr time out long
running buck builds and tasks (eg. Travis)
  • Loading branch information
shs96c committed Apr 18, 2017
1 parent cf0fbde commit 65874cb
Show file tree
Hide file tree
Showing 54 changed files with 261 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected ArtifactCacheEvent(
}

@Override
protected String getValueString() {
public String getValueString() {
return getEventName() + getEventKey().toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return getEventName() + getEventKey().toString();
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/com/facebook/buck/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1863,13 +1863,15 @@ private AbstractConsoleEventBusListener createConsoleEventListener(
TimeUnit.MILLISECONDS);
return superConsole;
}
return new SimpleConsoleEventBusListener(
SimpleConsoleEventBusListener simpleListener = new SimpleConsoleEventBusListener(
console,
clock,
testResultSummaryVerbosity,
locale,
testLogPath,
executionEnvironment);
simpleListener.startRenderScheduler(1, TimeUnit.SECONDS);
return simpleListener;
}

private boolean isSuperConsoleEnabled(Console console) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/counters/CounterRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ImmutableCollection<Counter> getCounters() {
}

@Override
protected String getValueString() {
public String getValueString() {
return toString();
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/counters/CountersSnapshotEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return String.format("%s with [%d] counters.", getEventName(), snapshots.size());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public DistBuildStatus getStatus() {
}

@Override
protected String getValueString() {
public String getValueString() {
return getEventName();
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/AbstractBuckEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public final boolean isRelatedTo(BuckEvent event) {
}

@JsonIgnore
protected abstract String getValueString();
public abstract String getValueString();

@Override
public String toString() {
Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/ActionGraphEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ActionGraphEvent(EventKey eventKey) {
}

@Override
protected String getValueString() {
public String getValueString() {
return "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return EVENT_NAME;
}
}
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/CommandEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public long getPid() {
}

@Override
protected String getValueString() {
public String getValueString() {
return String.format("%s, isDaemon: %b", commandName, isDaemon);
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/CompilerErrorEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static CompilerErrorEvent create(
}

@Override
protected String getValueString() {
public String getValueString() {
return "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ImmutableMap<String, String> getArgs() {
}

@Override
protected String getValueString() {
public String getValueString() {
return "";
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/ConsoleEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return String.format("%s: %s", getLevel(), getMessage());
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/DaemonEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public DaemonEvent(EventKey eventKey, String eventName) {
}

@Override
protected String getValueString() {
public String getValueString() {
return eventName;
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/DirCacheExperimentEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return description;
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/ExperimentEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return "";
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/FileHashCacheEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public String getCategory() {
}

@Override
protected String getValueString() {
public String getValueString() {
return getEventName() + getEventKey().toString();
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/InstallEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public String getCategory() {
}

@Override
protected String getValueString() {
public String getValueString() {
return buildTarget.getFullyQualifiedName();
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/NetworkEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public BytesReceivedEvent(long bytesReceived) {
}

@Override
protected String getValueString() {
public String getValueString() {
return "";
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/ParsingEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static EnvVariableChange environmentalChange(String diff) {
}

@Override
protected String getValueString() {
public String getValueString() {
return eventName;
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/ProgressEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static BuildProgressUpdated buildProgressUpdated(double v) {
}

@Override
protected String getValueString() {
public String getValueString() {
return "progress=" + String.valueOf(progressValue);
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/RuleKeyCalculationEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public String getEventName() {
}

@Override
protected String getValueString() {
public String getValueString() {
return type.toString();
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/SimplePerfEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public ImmutableMap<String, Object> getEventInfo() {
}

@Override
protected String getValueString() {
public String getValueString() {
return Joiner.on(',').withKeyValueSeparator(":").join(info);
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/StartActivityEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public String getCategory() {
}

@Override
protected String getValueString() {
public String getValueString() {
return String.format("%s %s", getBuildTarget().getFullyQualifiedName(), getActivityName());
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/UninstallEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public String getCategory() {
}

@Override
protected String getValueString() {
public String getValueString() {
return packageName;
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/event/WatchmanStatusEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public WatchmanStatusEvent(EventKey eventKey, String eventName) {
}

@Override
protected String getValueString() {
public String getValueString() {
return eventName;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public CacheRateStatsUpdateEvent(
}

@Override
protected String getValueString() {
public String getValueString() {
return MoreObjects.toStringHelper("")
.add("ruleCount", ruleCount)
.add("updated", updated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ PerfTimesStats getPerfTimesStats() {
}

@Override
protected String getValueString() {
public String getValueString() {
return perfTimesStats.toString();
}

Expand Down
Loading

0 comments on commit 65874cb

Please sign in to comment.