Class SimpleProfileMonitor
java.lang.Object
clazzfish.jdbc.monitor.AbstractProfileMonitor
clazzfish.jdbc.monitor.SimpleProfileMonitor
- All Implemented Interfaces:
ProfileMonitor,Comparable<ProfileMonitor>
The Class SimpleProfileMonitor.
- Since:
- 19.12.2008
- Version:
- $Revision: 1.27 $
- Author:
- oliver
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new simple profile monitor.SimpleProfileMonitor(String rootLabel) Instantiates a new simple profile monitor.SimpleProfileMonitor(String label, SimpleProfileMonitor parent) Instantiates a new simple profile monitor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double value) Adds the.protected voidaddChild(SimpleProfileMonitor child) Adds the child.voidAdds the child.voidaddChildren(List<String> labels) Adds the children.booleanOnly two monitors of the same instance can be equals.doubleGets the active.doublegetAvg()Gets the avg.doubleGets the avg active.Gets the first access.intgetHits()Gets the hits.getLabel()Gets the label.Gets the last access.doubleGets the last value.doublegetMax()Gets the max.doubleGets the max active.doublegetMin()Gets the min.getMonitor(String lbl) Gets the monitor.Gets the monitors.intGets the number of monitors.doublegetTotal()Gets the total.getUnits()Gets the units.inthashCode()Hash code.voidremoveMonitor(SimpleProfileMonitor monitor) Removes the given child monitor.voidreset()Reset.voidstart()Start.voidstop()Stop.To csv headline.To csv string.To short string.toString()To string.Methods inherited from class clazzfish.jdbc.monitor.AbstractProfileMonitor
compareTo, getLastTime
-
Constructor Details
-
SimpleProfileMonitor
public SimpleProfileMonitor()Instantiates a new simple profile monitor. -
SimpleProfileMonitor
Instantiates a new simple profile monitor.- Parameters:
rootLabel- the root label
-
SimpleProfileMonitor
Instantiates a new simple profile monitor.- Parameters:
label- the labelparent- the parent
-
-
Method Details
-
reset
public void reset()Reset.- See Also:
-
addChild
-
addChildren
-
addChild
-
getMonitors
-
getNumberOfMonitors
public int getNumberOfMonitors()Gets the number of monitors.- Returns:
- the number of monitors
- Since:
- 1.6
-
removeMonitor
Removes the given child monitor. To be sure to get the correct entry we use the label of the given monitor.- Parameters:
monitor- the monitor- Since:
- 1.6
-
getMonitor
Gets the monitor.- Parameters:
lbl- the label as String- Returns:
- the monitor
-
start
public void start()Start.- See Also:
-
stop
public void stop()Stop.- See Also:
-
add
public void add(double value) Adds the.- Parameters:
value- the measured time- See Also:
-
getTotal
public double getTotal()Gets the total.- Returns:
- the total
- See Also:
-
getLastValue
public double getLastValue()Gets the last value.- Returns:
- the last value
- See Also:
-
getMax
public double getMax()Gets the max.- Returns:
- the max
- See Also:
-
getMin
public double getMin()Gets the min.- Returns:
- the min
- See Also:
-
getHits
public int getHits()Gets the hits.- Returns:
- the hits
- See Also:
-
getAvg
public double getAvg()Gets the avg.- Returns:
- the avg
- See Also:
-
getLabel
-
toString
-
toShortString
-
toCsvHeadline
-
toCsvString
-
getUnits
-
getActive
public double getActive()Gets the active.- Returns:
- the active
- See Also:
-
getAvgActive
public double getAvgActive()Gets the avg active.- Returns:
- the avg active
- See Also:
-
getFirstAccess
-
getLastAccess
-
getMaxActive
public double getMaxActive()Gets the max active.- Returns:
- the max active
- See Also:
-
equals
Only two monitors of the same instance can be equals. Otherwise the result is the same as the one of the superclass.- Overrides:
equalsin classAbstractProfileMonitor- Parameters:
obj- the obj- Returns:
- true, if successful
- See Also:
-
hashCode
public int hashCode()Hash code.- Overrides:
hashCodein classAbstractProfileMonitor- Returns:
- the int
- See Also:
-