Package patterntesting.runtime.monitor
Interface ProfileMonitor
-
- All Superinterfaces:
java.lang.Comparable<ProfileMonitor>
- All Known Implementing Classes:
AbstractProfileMonitor
,JamonMonitor
,SimpleProfileMonitor
public interface ProfileMonitor extends java.lang.Comparable<ProfileMonitor>
The Interface ProfileMonitor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(double value)
Normally this method should be synchronized.double
getActive()
Gets the active.double
getAvg()
Gets the avg.double
getAvgActive()
Gets the avg active.java.util.Date
getFirstAccess()
Gets the first access.int
getHits()
Gets the hits.java.lang.String
getLabel()
Gets the label.java.util.Date
getLastAccess()
Gets the last access.java.lang.String
getLastTime()
Gets the last value as time string.double
getLastValue()
Gets the last value.double
getMax()
Gets the max.double
getMaxActive()
Gets the max active.double
getMin()
Gets the min.ProfileMonitor[]
getMonitors()
Gets the monitors.double
getTotal()
Gets the total.java.lang.String
getUnits()
Gets the units.void
reset()
Reset.void
start()
Start.void
stop()
Stop.java.lang.String
toCsvHeadline()
To csv headline.java.lang.String
toCsvString()
To csv string.java.lang.String
toShortString()
To short string.
-
-
-
Method Detail
-
getMonitors
ProfileMonitor[] getMonitors()
Gets the monitors.- Returns:
- the monitors
-
start
void start()
Start.
-
stop
void stop()
Stop.
-
reset
void reset()
Reset.
-
getLabel
java.lang.String getLabel()
Gets the label.- Returns:
- the label
-
add
void add(double value)
Normally this method should be synchronized. But we waive it with the risk that the measured time may be slightly wrong.- Parameters:
value
- the value
-
getTotal
double getTotal()
Gets the total.- Returns:
- the total
-
getLastValue
double getLastValue()
Gets the last value.- Returns:
- the last value (in ms)
-
getLastTime
java.lang.String getLastTime()
Gets the last value as time string. It should return the same result asgetLastValue()
but in a human readable format.- Returns:
- the last time (e.g. "42 seconds")
- Since:
- 1.4.2
-
getMax
double getMax()
Gets the max.- Returns:
- the max
-
getMin
double getMin()
Gets the min.- Returns:
- the min
-
getHits
int getHits()
Gets the hits.- Returns:
- the hits
-
getAvg
double getAvg()
Gets the avg.- Returns:
- the avg
-
toShortString
java.lang.String toShortString()
To short string.- Returns:
- the string
-
toCsvString
java.lang.String toCsvString()
To csv string.- Returns:
- the string
-
toCsvHeadline
java.lang.String toCsvHeadline()
To csv headline.- Returns:
- the string
-
getActive
double getActive()
Gets the active.- Returns:
- the active
-
getAvgActive
double getAvgActive()
Gets the avg active.- Returns:
- the avg active
-
getMaxActive
double getMaxActive()
Gets the max active.- Returns:
- the max active
-
getFirstAccess
java.util.Date getFirstAccess()
Gets the first access.- Returns:
- the first access
-
getLastAccess
java.util.Date getLastAccess()
Gets the last access.- Returns:
- the last access
-
getUnits
java.lang.String getUnits()
Gets the units.- Returns:
- the units
-
-