public class FileSerializationOutputRuleDepsListener extends Object
BuckEventListener
that subscribes to BuildRuleExecutionEvent.Finished
events and
serialize rule build target, rule type, rule execution time, rule's dependencies to outputFile in
csv format. This file is intended to be used in the rule execution simulator.Modifier and Type | Class and Description |
---|---|
static interface |
FileSerializationOutputRuleDepsListener.RuleExecutionTimeData
Data object that is used to serialize rule execution information into a file
|
Constructor and Description |
---|
FileSerializationOutputRuleDepsListener(Path outputPath) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleanup, output any trace data collected to the backing store.
|
void |
commandFinished(CommandEvent.Finished event) |
protected void |
scheduleWrite(String line) |
void |
subscribe(BuildRuleExecutionEvent.Finished event)
Subscribes to
BuildRuleExecutionEvent.Finished events. |
protected final Logger LOG
public FileSerializationOutputRuleDepsListener(Path outputPath) throws IOException
IOException
public void subscribe(BuildRuleExecutionEvent.Finished event)
BuildRuleExecutionEvent.Finished
events. Convert this event into json
representation and serialize as a line to outputPath
.public void close()
BuckEventListener
close
in interface BuckEventListener
close
in interface Closeable
close
in interface AutoCloseable
public void commandFinished(CommandEvent.Finished event)
protected final void scheduleWrite(String line)