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 resultfilesProcessed- number ofFileRecords the stage touched (read or written; not just changed)findingsAdded- net newReviewFindings produced by this stage; cached / duplicate findings don't countdurationMs- wall-clock execution timemetrics- free-form per-stage metrics ("agentCalls","matcherHits"); nevernull
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 Summary
ConstructorsConstructorDescriptionStageResult(String stage, int filesProcessed, int findingsAdded, long durationMs, Map<String, Object> metrics) Creates an instance of aStageResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thedurationMsrecord component.static StageResultEmpty / no-op result (zero files, zero findings).final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefilesProcessedrecord component.intReturns the value of thefindingsAddedrecord component.final inthashCode()Returns a hash code value for this object.metrics()Returns the value of themetricsrecord component.stage()Returns the value of thestagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StageResult
public StageResult(String stage, int filesProcessed, int findingsAdded, long durationMs, Map<String, Object> metrics) Creates an instance of aStageResultrecord class.- Parameters:
stage- the value for thestagerecord componentfilesProcessed- the value for thefilesProcessedrecord componentfindingsAdded- the value for thefindingsAddedrecord componentdurationMs- the value for thedurationMsrecord componentmetrics- the value for themetricsrecord component
-
-
Method Details
-
empty
Empty / no-op result (zero files, zero findings). -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
stage
Returns the value of thestagerecord component.- Returns:
- the value of the
stagerecord component
-
filesProcessed
public int filesProcessed()Returns the value of thefilesProcessedrecord component.- Returns:
- the value of the
filesProcessedrecord component
-
findingsAdded
public int findingsAdded()Returns the value of thefindingsAddedrecord component.- Returns:
- the value of the
findingsAddedrecord component
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-