Record Class TraceResult

java.lang.Object
java.lang.Record
cs1302.tracer.execution.TraceResult
Record Components:
schemaVersion - Envelope schema version.
format - Payload format name.
status - completed, stopped, or failed.
stopReason - Machine-readable reason, or null on normal completion.
phase - Phase at completion or failure.
complete - Whether execution and capture completed normally.
trace - Payload; null when unavailable, empty steps when capture ran without snapshots.
limits - Effective trace policy.
counters - Resource accounting and snapshot counters.
diagnostics - Human-readable diagnostics; never an isolation attestation.
stdout - Bounded guest standard output, decoded as UTF-8.
stderr - Bounded guest standard error, decoded as UTF-8.

public record TraceResult(int schemaVersion, String format, String status, String stopReason, String phase, boolean complete, Object trace, TraceLimits limits, Map<String,Long> counters, List<String> diagnostics, String stdout, String stderr) extends Record
Versioned opt-in job result. The trace payload retains its existing format.
  • Constructor Details

    • TraceResult

      public TraceResult(int schemaVersion, String format, String status, String stopReason, String phase, boolean complete, Object trace, TraceLimits limits, Map<String,Long> counters, List<String> diagnostics, String stdout, String stderr)
      Creates an instance of a TraceResult record class.
      Parameters:
      schemaVersion - the value for the schemaVersion record component
      format - the value for the format record component
      status - the value for the status record component
      stopReason - the value for the stopReason record component
      phase - the value for the phase record component
      complete - the value for the complete record component
      trace - the value for the trace record component
      limits - the value for the limits record component
      counters - the value for the counters record component
      diagnostics - the value for the diagnostics record component
      stdout - the value for the stdout record component
      stderr - the value for the stderr record component
  • Method Details

    • failed

      public static TraceResult failed(String format, String phase, String diagnostic)
      Creates a failed TraceResult with default unlimited limits.
      Parameters:
      format - Output format.
      phase - Failure phase.
      diagnostic - Human-readable diagnostic.
      Returns:
      New failed TraceResult instance.
    • failed

      public static TraceResult failed(String format, String phase, String diagnostic, TraceLimits limits)
      Creates a failed TraceResult with specified effective limits.
      Parameters:
      format - Output format.
      phase - Failure phase.
      diagnostic - Human-readable diagnostic.
      limits - Effective trace limits.
      Returns:
      New failed TraceResult instance.
    • stopped

      public static TraceResult stopped(String format, String reason, String diagnostic)
      Creates a stopped TraceResult with default unlimited limits.
      Parameters:
      format - Output format.
      reason - Machine-readable reason.
      diagnostic - Human-readable diagnostic.
      Returns:
      New stopped TraceResult instance.
    • stopped

      public static TraceResult stopped(String format, String reason, String diagnostic, TraceLimits limits)
      Creates a stopped TraceResult with specified effective limits.
      Parameters:
      format - Output format.
      reason - Machine-readable reason.
      diagnostic - Human-readable diagnostic.
      limits - Effective trace limits.
      Returns:
      New stopped TraceResult instance.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schemaVersion

      public int schemaVersion()
      Returns the value of the schemaVersion record component.
      Returns:
      the value of the schemaVersion record component
    • format

      public String format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • stopReason

      public String stopReason()
      Returns the value of the stopReason record component.
      Returns:
      the value of the stopReason record component
    • phase

      public String phase()
      Returns the value of the phase record component.
      Returns:
      the value of the phase record component
    • complete

      public boolean complete()
      Returns the value of the complete record component.
      Returns:
      the value of the complete record component
    • trace

      public Object trace()
      Returns the value of the trace record component.
      Returns:
      the value of the trace record component
    • limits

      public TraceLimits limits()
      Returns the value of the limits record component.
      Returns:
      the value of the limits record component
    • counters

      public Map<String,Long> counters()
      Returns the value of the counters record component.
      Returns:
      the value of the counters record component
    • diagnostics

      public List<String> diagnostics()
      Returns the value of the diagnostics record component.
      Returns:
      the value of the diagnostics record component
    • stdout

      public String stdout()
      Returns the value of the stdout record component.
      Returns:
      the value of the stdout record component
    • stderr

      public String stderr()
      Returns the value of the stderr record component.
      Returns:
      the value of the stderr record component