Package io.emop.javadocjson.parser
Class ProgressTracker
java.lang.Object
io.emop.javadocjson.parser.ProgressTracker
Progress tracking utility for the Javadoc crawler.
-
Constructor Summary
ConstructorsConstructorDescriptionProgressTracker(org.apache.maven.plugin.logging.Log log) ProgressTracker(org.apache.maven.plugin.logging.Log log, long logIntervalMs) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTotalClasses(int count) Adds to the total number of classes.longGets the elapsed time in milliseconds.longEstimates the remaining time in milliseconds.intGets the current number of failed classes.intGets the current number of processed classes.doubleGets the current processing rate in classes per second.doubleGets the current progress percentage.intGets the current number of skipped classes.intGets the total number of classes.voidIncrements the count of failed classes.voidIncrements the count of processed classes.voidIncrements the count of skipped classes.voidLogs the final summary when crawling is complete.voidForces a progress log regardless of timing.voidreset()Resets all counters and timers.voidsetTotalClasses(int total) Sets the total number of classes to be processed.voidstart()Starts tracking progress.
-
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.
-