public class NoSqlStats extends Object implements Statistical
Statistical
Modifier and Type | Method and Description |
---|---|
void |
add(Exception e)
Add a exception data to statistical keeping the
first, last and total exceptions registered.
|
void |
add(long time)
add time to statistics
|
long |
getAvgTime()
average time execution
|
long |
getCount()
times executed
|
Exception |
getFirstException()
The first error happened
|
long |
getFirstTime()
first time execution
|
static Statistical |
getInstance() |
Exception |
getLastException()
The last error happened
|
long |
getLastTime()
last time execution
|
long |
getMaxTime()
maximum time execution
|
long |
getMinTime()
minimum time execution
|
long |
getTotalException()
the total of execution with error
|
long |
getTotalTime()
total time execution
|
String |
toString() |
public static Statistical getInstance()
public void add(long time)
Statistical
add
in interface Statistical
time
- millisecondspublic void add(Exception e)
Statistical
add
in interface Statistical
e
- exceptionpublic long getMaxTime()
Statistical
getMaxTime
in interface Statistical
public long getMinTime()
Statistical
getMinTime
in interface Statistical
public long getAvgTime()
Statistical
getAvgTime
in interface Statistical
public long getTotalTime()
Statistical
getTotalTime
in interface Statistical
public long getFirstTime()
Statistical
getFirstTime
in interface Statistical
public long getLastTime()
Statistical
getLastTime
in interface Statistical
public long getCount()
Statistical
getCount
in interface Statistical
public long getTotalException()
Statistical
getTotalException
in interface Statistical
public Exception getFirstException()
Statistical
getFirstException
in interface Statistical
public Exception getLastException()
Statistical
getLastException
in interface Statistical
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.