Class ProgressTracker

java.lang.Object
io.emop.javadocjson.parser.ProgressTracker

public class ProgressTracker extends Object
Progress tracking utility for the Javadoc crawler.
  • Constructor Details

    • ProgressTracker

      public ProgressTracker(org.apache.maven.plugin.logging.Log log)
    • ProgressTracker

      public ProgressTracker(org.apache.maven.plugin.logging.Log log, long logIntervalMs)
  • Method Details

    • start

      public void start()
      Starts tracking progress.
    • setTotalClasses

      public void setTotalClasses(int total)
      Sets the total number of classes to be processed.
      Parameters:
      total - The total number of classes
    • addToTotalClasses

      public void addToTotalClasses(int count)
      Adds to the total number of classes.
      Parameters:
      count - The number of classes to add
    • incrementProcessed

      public void incrementProcessed()
      Increments the count of processed classes.
    • incrementSkipped

      public void incrementSkipped()
      Increments the count of skipped classes.
    • incrementFailed

      public void incrementFailed()
      Increments the count of failed classes.
    • logProgress

      public void logProgress()
      Forces a progress log regardless of timing.
    • logFinalSummary

      public void logFinalSummary()
      Logs the final summary when crawling is complete.
    • getProcessedCount

      public int getProcessedCount()
      Gets the current number of processed classes.
      Returns:
      The number of processed classes
    • getSkippedCount

      public int getSkippedCount()
      Gets the current number of skipped classes.
      Returns:
      The number of skipped classes
    • getFailedCount

      public int getFailedCount()
      Gets the current number of failed classes.
      Returns:
      The number of failed classes
    • getTotalCount

      public int getTotalCount()
      Gets the total number of classes.
      Returns:
      The total number of classes
    • getProgressPercentage

      public double getProgressPercentage()
      Gets the current progress percentage.
      Returns:
      The progress percentage (0-100)
    • getElapsedTime

      public long getElapsedTime()
      Gets the elapsed time in milliseconds.
      Returns:
      The elapsed time since start
    • getProcessingRate

      public double getProcessingRate()
      Gets the current processing rate in classes per second.
      Returns:
      The processing rate
    • getEstimatedRemainingTime

      public long getEstimatedRemainingTime()
      Estimates the remaining time in milliseconds.
      Returns:
      The estimated remaining time, or -1 if cannot be estimated
    • reset

      public void reset()
      Resets all counters and timers.