Class: ProgressTracker

ProgressTracker(estimates)

A class for tracking and displaying progress of file processing operations.

Constructor

new ProgressTracker(estimates)

Parameters:
Name Type Description
estimates Object

Initial estimates for the processing operation

Properties
Name Type Description
totalFiles number

Total number of files to be processed

totalSize number

Total size of files to be processed in KB

Properties:
Name Type Description
totalFiles number

Total number of files to process

totalSize number

Total size to process in KB

processedFiles number

Number of files processed

processedSize number

Amount of data processed in KB

startTime number

Timestamp when processing started

lastUpdateTime number

Timestamp of last progress update

updateInterval number

Interval between progress updates in milliseconds

Source:

Methods

complete()

Marks the progress as complete and logs the final statistics.

Source:

displayProgress()

Displays the current progress in the console.

Source:

updateProgress(fileSize)

Updates the progress tracker with the size of the recently processed file.

Parameters:
Name Type Description
fileSize number

Size of the processed file in bytes.

Source: