public class Stats
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Stats.Times |
Modifier and Type | Field and Description |
---|---|
protected ExtensionInfo |
ext
Extension we're collecting stats for.
|
protected java.util.List<java.lang.Object> |
keys
List of Objects used as keys to passTimes.
|
protected java.util.Map<java.lang.Object,Stats.Times> |
passTimes
Map from Objects to pair of inclusive and exclusive times.
|
Constructor and Description |
---|
Stats(ExtensionInfo ext) |
Modifier and Type | Method and Description |
---|---|
void |
accumPassTimes(java.lang.Object key,
long in,
long ex)
Accumulate inclusive and exclusive times for a pass.
|
long |
passTime(java.lang.Object key,
boolean inclusive)
Return the accumulated times for a pass.
|
void |
report()
Report the stats.
|
void |
resetPassTimes(java.lang.Object key)
Reset the accumulated times for a pass.
|
protected ExtensionInfo ext
protected java.util.Map<java.lang.Object,Stats.Times> passTimes
protected java.util.List<java.lang.Object> keys
public Stats(ExtensionInfo ext)
public void resetPassTimes(java.lang.Object key)
public long passTime(java.lang.Object key, boolean inclusive)
public void accumPassTimes(java.lang.Object key, long in, long ex)
public void report()