Class PerformanceMonitor
java.lang.Object
opennlp.tools.cmdline.PerformanceMonitor
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.
Note: Do not use this class, internal use only!
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ScheduledFuture<?> private intprivate static final org.slf4j.Loggerprivate final PrintStreamprivate final ScheduledExecutorServiceprivate longprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionPerformanceMonitor(PrintStream out, String unit) PerformanceMonitor(String unit) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidincrementCounter(int increment) booleanvoidstart()voidvoid
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
scheduler
-
unit
-
beeperHandle
-
startTime
private volatile long startTime -
counter
private volatile int counter -
out
-
-
Constructor Details
-
PerformanceMonitor
-
PerformanceMonitor
-
-
Method Details
-
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()
-