public class GiraphTimer extends ValueGauge<Long>
Constructor and Description |
---|
GiraphTimer(GiraphMetricsRegistry registry,
String name,
TimeUnit timeUnit)
Create new timer, add it to the registry.
|
Modifier and Type | Method and Description |
---|---|
TimeUnit |
getTimeUnit()
Get TimeUnit used.
|
String |
getTimeUnitAbbrev()
Get abbreviated string of TimeUnit.
|
GiraphTimer |
set(long value,
TimeUnit valueTimeUnit)
Set value from a given TimeUnit, converting to our TimeUnit.
|
GiraphTimerContext |
time()
Begin timing an event.
|
String |
valueAndUnit()
Get string representation of value
|
getDouble, getLong, set, value
public GiraphTimer(GiraphMetricsRegistry registry, String name, TimeUnit timeUnit)
registry
- GiraphMetricsRegistry to add timer toname
- String name of timertimeUnit
- TimeUnit to measure inpublic TimeUnit getTimeUnit()
public GiraphTimerContext time()
public GiraphTimer set(long value, TimeUnit valueTimeUnit)
value
- long measurement taken.valueTimeUnit
- TimeUnit measurement is in.public String getTimeUnitAbbrev()
public String valueAndUnit()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.