opennlp.tools.cmdline
Class PerformanceMonitor

java.lang.Object
  extended by opennlp.tools.cmdline.PerformanceMonitor

public class PerformanceMonitor
extends Object

The PerformanceMonitor measures increments to a counter. During the computation it prints out current and average throughput per second. After the computation is done it prints a final performance report.

Note: This class is not thread safe.
Do not use this class, internal use only!


Constructor Summary
PerformanceMonitor(PrintStream out, String unit)
           
PerformanceMonitor(String unit)
           
 
Method Summary
 void incrementCounter()
           
 void incrementCounter(int increment)
           
 boolean isStarted()
           
 void start()
           
 void startAndPrintThroughput()
           
 void stopAndPrintFinalResult()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceMonitor

public PerformanceMonitor(PrintStream out,
                          String unit)

PerformanceMonitor

public PerformanceMonitor(String unit)
Method Detail

isStarted

public boolean isStarted()

incrementCounter

public void incrementCounter(int increment)

incrementCounter

public void incrementCounter()

start

public void start()

startAndPrintThroughput

public void startAndPrintThroughput()

stopAndPrintFinalResult

public void stopAndPrintFinalResult()


Copyright © 2010. All Rights Reserved.