Progress bar support
The ProgressReporter
is used to display the progress
bar during calls to libertem.api.Context
. In normal
usage there is no need to instantiate these classes directly,
but they can be used to modify how progress is displayed in
particular applications.
- class libertem.common.progress.ProgressReporter[source]
Interface for progress bar display / updating
This class will receive
ProgressState
instances to notify it about the start, progression and end of a job submitted to theUDFRunner
. The implementation should be adapted to display or log the progress as required for the use case.It is possible that multiple jobs are submitted to a single executor at the same time and therefore the implementation should ensure that concurrent instances of the class display correctly, or that the same instance of the class can handle updates from multiple threads concurrently. Each
ProgressState
message contains a fieldprogress_id
which is unique to each job, and therefore the implementation can use this to distinguish updates from multiple sources.- end(state: ProgressState)[source]
Signal the end of a given job
This method will always be called and any updates recieved after this message should be ignored.
- start(state: ProgressState)[source]
Signal the creation of a new job with the expected number of partitions and frames, and unique progress_id string.
- update(state: ProgressState)[source]
Signal an intermediate update to the progress of a job