public class BuildTraces extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BuildTraces.TraceAttributes |
Modifier and Type | Field and Description |
---|---|
static Pattern |
TRACE_ID_PATTERN |
Constructor and Description |
---|
BuildTraces(ProjectFilesystem projectFilesystem) |
Modifier and Type | Method and Description |
---|---|
Iterable<InputStream> |
getInputsForTraces(String id) |
BuildTraces.TraceAttributes |
getTraceAttributesFor(Path pathToTrace)
Parses a trace file and returns the command that the user executed to create the trace.
|
BuildTraces.TraceAttributes |
getTraceAttributesFor(String id) |
List<Path> |
listTraceFilesByLastModified()
The most recent trace (the one with the greatest last-modified time) will be listed first.
|
public static final Pattern TRACE_ID_PATTERN
public BuildTraces(ProjectFilesystem projectFilesystem)
public Iterable<InputStream> getInputsForTraces(String id) throws IOException
IOException
public BuildTraces.TraceAttributes getTraceAttributesFor(String id) throws IOException
IOException
public BuildTraces.TraceAttributes getTraceAttributesFor(Path pathToTrace) throws IOException
This method tries to be reasonably tolerant of changes to the .trace file schema, returning
Optional.empty()
if it does not find the fields in the JSON that it expects.
IOException
public List<Path> listTraceFilesByLastModified() throws IOException
IOException