Class ProgressMonitor


  • public class ProgressMonitor
    extends java.lang.Object
    Progress monitor - output lines to show the progress of some long running operation. This is based on "ticks", not time. Once per item processed, call the tick() operation.
    • Constructor Detail

      • ProgressMonitor

        public ProgressMonitor​(java.lang.String label,
                               long tickPoint,
                               int superTick,
                               ProgressMonitor.Output output)
        Parameters:
        label - Label added to output strings. Usually related to the kind of things being monitored. e.g "tuples
        tickPoint - Frequent of output messages
        superTick - Frequent of "Elapsed" additional message
        output - Function called to deal with progress messages.
    • Method Detail

      • create

        public static ProgressMonitor create​(org.slf4j.Logger log,
                                             java.lang.String label,
                                             long tickPoint,
                                             int superTick)
        ProgressMonitor that outputs to a Logger
      • startMessage

        public void startMessage()
        Print a start message using the label
      • startMessage

        public void startMessage​(java.lang.String msg)
        Print a start message using a different string.
      • finishMessage

        public void finishMessage()
      • start

        public void start()
      • finish

        public long finish()
      • getTicks

        public long getTicks()
      • tick

        public void tick()