public abstract class CpuMeasure<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<T,LongDataCounter> |
datas |
protected LongDataCounter |
globalData |
protected String |
measureName |
protected long |
timeBegin |
protected static long |
totalTime |
Constructor and Description |
---|
CpuMeasure(String measureName) |
Modifier and Type | Method and Description |
---|---|
void |
add(T o,
long time) |
ConcurrentHashMap<T,LongDataCounter> |
getDatas() |
LongDataCounter |
getGlobalData() |
String |
getName() |
abstract @NonNull String |
getName(T o) |
List<String> |
getResult() |
List<String> |
getResultPer() |
List<MonitorMeasure> |
getResults(String key) |
@Nullable String |
printData(String name,
LongDataCounter data) |
protected static long totalTime
protected final ConcurrentHashMap<T,LongDataCounter> datas
protected final LongDataCounter globalData
protected final String measureName
protected final long timeBegin
public CpuMeasure(String measureName)
public @Nullable String printData(String name, LongDataCounter data)
public LongDataCounter getGlobalData()
public ConcurrentHashMap<T,LongDataCounter> getDatas()
public void add(T o, long time)
public String getName()
public List<MonitorMeasure> getResults(String key)