Class FuzzStatistics

java.lang.Object
org.ek9lang.compiler.fuzz.FuzzStatistics

public final class FuzzStatistics extends Object
Thread-safe statistics collector for the grammar-based fuzz generator. All counters use AtomicLong and maps use ConcurrentHashMap for lock-free parallel access.
  • Constructor Details

    • FuzzStatistics

      public FuzzStatistics()
      Create statistics with no strand filter (all strands active).
    • FuzzStatistics

      public FuzzStatistics(Set<Integer> activeStrands)
      Create statistics with an explicit set of active strands.
      Parameters:
      activeStrands - the set of active strand numbers (1-5), empty for all
  • Method Details

    • recordGeneration

      public void recordGeneration(long genTimeNs)
    • recordSourceSize

      public void recordSourceSize(int bytes, int lines)
    • recordFileCount

      public void recordFileCount(int fileCount)
    • recordParseResult

      public void recordParseResult(boolean parseable, long parseTimeNs)
    • recordCompilation

      public void recordCompilation(boolean success, long compileTimeNs, CompilationPhase deepestPhase)
    • recordCompilation

      public void recordCompilation(boolean success, long compileTimeNs, CompilationPhase deepestPhase, String strandId)
    • recordErrorCode

      public void recordErrorCode(String errorCode)
    • recordErrorCode

      public void recordErrorCode(String errorCode, String strandId)
      Record an error code with strand attribution for discovery tracking. The first strand to discover a given error code gets permanent credit.
    • recordConstruct

      public void recordConstruct(String constructName)
    • recordControlFlow

      public void recordControlFlow(String controlFlowType)
    • recordConstructCrash

      public void recordConstructCrash(String constructName)
    • recordControlFlowCrash

      public void recordControlFlowCrash(String controlFlowType)
    • recordParamCount

      public void recordParamCount(int paramCount)
    • recordCompilerCrash

      public void recordCompilerCrash()
    • recordKnownLimitation

      public void recordKnownLimitation()
    • recordFormatterCrash

      public void recordFormatterCrash()
    • recordCorrection

      public void recordCorrection()
    • recordTemplateUsage

      public void recordTemplateUsage(String templateId)
    • recordTemplateCrash

      public void recordTemplateCrash(String templateId)
    • recordStrand4Result

      public void recordStrand4Result(boolean matched, boolean noError)
    • recordStrand4Skip

      public void recordStrand4Skip()
    • recordPolicy

      public void recordPolicy(String policyName)
    • recordHierarchyInjection

      public void recordHierarchyInjection()
    • recordTraitImplementation

      public void recordTraitImplementation()
    • recordHarvestSuccess

      public void recordHarvestSuccess()
    • recordHarvestFailure

      public void recordHarvestFailure()
    • recordHierarchyRevert

      public void recordHierarchyRevert()
    • recordStrand4CompoundAttempt

      public void recordStrand4CompoundAttempt()
    • recordStrand4CompoundMatch

      public void recordStrand4CompoundMatch()
    • recordStrand4SurvivorReuse

      public void recordStrand4SurvivorReuse()
    • recordStrand5SurvivorFeed

      public void recordStrand5SurvivorFeed()
    • recordWeightAdjustment

      public void recordWeightAdjustment()
    • recordBlindSpotAttempt

      public void recordBlindSpotAttempt()
    • recordBlindSpotTriggered

      public void recordBlindSpotTriggered()
    • recordS2TemplateInvalidated

      public void recordS2TemplateInvalidated()
    • recordSeedRotation

      public void recordSeedRotation()
    • recordConvergencePoint

      public void recordConvergencePoint()
      Record a convergence point for time-series error coverage analysis.
    • recordWeightSnapshot

      public void recordWeightSnapshot(int s1, int s2, int s3, int s4, int s5)
      Record current strand dispatch weights for adaptive weight timeline.
    • sampleMemory

      public void sampleMemory()
      Sample current JVM heap memory and update peak/last/max statistics.
    • firstDiscoveryCounts

      public Map<String,Integer> firstDiscoveryCounts()
      Get the number of first discoveries per strand (all time).
    • recentDiscoveryCounts

      public Map<String,Integer> recentDiscoveryCounts(long windowSeconds)
      Get the number of first discoveries per strand within a rolling window.
    • snapshot

      public FuzzReport snapshot()
      Take a thread-safe snapshot of current statistics for reporting.