public class PerformanceMonitor extends Object
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 and Description |
---|
PerformanceMonitor(PrintStream out,
String unit) |
PerformanceMonitor(String unit) |
Modifier and Type | Method and Description |
---|---|
void |
incrementCounter() |
void |
incrementCounter(int increment) |
boolean |
isStarted() |
void |
start() |
void |
startAndPrintThroughput() |
void |
stopAndPrintFinalResult() |
public PerformanceMonitor(PrintStream out, String unit)
public PerformanceMonitor(String unit)
public boolean isStarted()
public void incrementCounter(int increment)
public void incrementCounter()
public void start()
public void startAndPrintThroughput()
public void stopAndPrintFinalResult()
Copyright © 2015 The Apache Software Foundation. All rights reserved.