public final class StatsTracker
extends java.lang.Object
| Constructor and Description |
|---|
StatsTracker() |
| Modifier and Type | Method and Description |
|---|---|
void |
count(Stat name,
int count)
Inserts value for first call and sum values for consequent calls.
|
java.util.Map<Stat,java.lang.Integer> |
getCounters() |
GuiceStatsTracker |
getGuiceStats() |
java.util.Map<Stat,com.google.common.base.Stopwatch> |
getTimers() |
void |
startJerseyTimer(Stat name)
Special methods for tracking time in jersey scope.
|
void |
stopJerseyTimer(Stat name)
Called to stop currently measured jersey metric (also stops main guice and jersey timers).
|
com.google.common.base.Stopwatch |
timer(Stat name)
If measured first time, returns new instance.
|
public com.google.common.base.Stopwatch timer(Stat name)
name - statistic namepublic void count(Stat name, int count)
name - statistics namecount - counter valuepublic void startJerseyTimer(Stat name)
name - jersey statistics namepublic void stopJerseyTimer(Stat name)
name - jersey statistic namepublic java.util.Map<Stat,com.google.common.base.Stopwatch> getTimers()
public java.util.Map<Stat,java.lang.Integer> getCounters()
public GuiceStatsTracker getGuiceStats()