public class ThroughputTracker extends Object
| Constructor and Description |
|---|
ThroughputTracker()
Create a new tracker in a reset state.
|
ThroughputTracker(long start,
long total,
boolean frozen)
Synthesize a throughput tracker from existing data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long count)
Add the specified number of entities to the tracker.
|
double |
duration()
Number of seconds elapsed since the tracker was last reset.
|
void |
freeze()
Freeze the current throughput tracker in the current state.
|
void |
reset()
Reset the counts and restart the timer associated with the tracker.
|
double |
throughput()
Get the number of entities transferred per second.
|
long |
total()
Get the number of entities accumulated by the tracker.
|
public ThroughputTracker()
public ThroughputTracker(long start,
long total,
boolean frozen)
start - start time-stamptotal - total number of items to start withfrozen - true if the tracker should be immediately frozenpublic void reset()
public void freeze()
public void add(long count)
count - number of entities to consider as transferedpublic double throughput()
public long total()
public double duration()
Copyright © 2014. All Rights Reserved.