Class JsonlThreadRecorder

java.lang.Object
fr.bl.drit.flow.agent.JsonlThreadRecorder
All Implemented Interfaces:
Recorder, ThreadRecorder, Closeable, AutoCloseable

public final class JsonlThreadRecorder extends Object implements ThreadRecorder
Call tree JSONL recorder.

Each line is either:

  • A method enter event: {"e":"enter","method":"<id>"}
  • A method exit event: {"e":"exit"}
  • Constructor Details

    • JsonlThreadRecorder

      public JsonlThreadRecorder(Path outputDir) throws IOException
      Parameters:
      outputDir - Path to output directory
      Throws:
      IOException - If an I/O error occurs when opening an output stream.
  • Method Details

    • getFileName

      public String getFileName()
      Returns:
      The file name this recorder is writing to
    • enter

      public void enter(long methodId) throws IOException
      Description copied from interface: Recorder
      Emit a method enter event with the given method ID.
      Specified by:
      enter in interface Recorder
      Parameters:
      methodId - The ID of the method to trace
      Throws:
      IOException - If an I/O error occurs when emitting the event.
    • exit

      public void exit() throws IOException
      Description copied from interface: Recorder
      Emit a method exit event.
      Specified by:
      exit in interface Recorder
      Throws:
      IOException - If an I/O error occurs when emitting the event.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException