Record Class StageResult

java.lang.Object
java.lang.Record
com.tnsai.quality.security.harness.StageResult
Record Components:
stage - id of the stage that produced this result
filesProcessed - number of FileRecords the stage touched (read or written; not just changed)
findingsAdded - net new ReviewFindings produced by this stage; cached / duplicate findings don't count
durationMs - wall-clock execution time
metrics - free-form per-stage metrics ("agentCalls", "matcherHits"); never null

public record StageResult(String stage, int filesProcessed, int findingsAdded, long durationMs, Map<String,Object> metrics) extends Record
Outcome of one PipelineStage execution (TNS-291).
Since:
0.10.0 (TNS-291)
  • Constructor Details

    • StageResult

      public StageResult(String stage, int filesProcessed, int findingsAdded, long durationMs, Map<String,Object> metrics)
      Creates an instance of a StageResult record class.
      Parameters:
      stage - the value for the stage record component
      filesProcessed - the value for the filesProcessed record component
      findingsAdded - the value for the findingsAdded record component
      durationMs - the value for the durationMs record component
      metrics - the value for the metrics record component
  • Method Details

    • empty

      public static StageResult empty(String stage)
      Empty / no-op result (zero files, zero findings).
    • 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.
    • stage

      public String stage()
      Returns the value of the stage record component.
      Returns:
      the value of the stage record component
    • filesProcessed

      public int filesProcessed()
      Returns the value of the filesProcessed record component.
      Returns:
      the value of the filesProcessed record component
    • findingsAdded

      public int findingsAdded()
      Returns the value of the findingsAdded record component.
      Returns:
      the value of the findingsAdded record component
    • durationMs

      public long durationMs()
      Returns the value of the durationMs record component.
      Returns:
      the value of the durationMs record component
    • metrics

      public Map<String,Object> metrics()
      Returns the value of the metrics record component.
      Returns:
      the value of the metrics record component