Class JamonMonitor
java.lang.Object
clazzfish.jdbc.monitor.AbstractProfileMonitor
clazzfish.jdbc.monitor.JamonMonitor
- All Implemented Interfaces:
ProfileMonitor,Comparable<ProfileMonitor>
This is a thin wrapper for com.jamonapi.Monitor
- Since:
- 25.12.2008
- Version:
- $Revision: 1.9 $
- Author:
- oliver
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double arg0) Adds the.voiddisable()Disable.voidenable()Enable.booleanTests if given object is equal.doubleGets the active.doublegetAvg()Gets the average.doubleGets the active average.doubleGets the global active average.doubleGets the primary active average.Gets the first access.intgetHits()Gets the hits.getLabel()Gets the label.Gets the last access.doubleGets the last value.com.jamonapi.ListenerTypegetListenerType(String listenerType) Gets the listener type.doublegetMax()Gets the max.doubleGets the max active.doublegetMin()Gets the min.Gets the monitors.com.jamonapi.MonKeyGets the mon key.com.jamonapi.RangegetRange()Gets the range.doubleGets the std dev.doublegetTotal()Gets the total.getUnits()Gets the units.inthashCode()Hash code.booleanChecks for listeners.booleanChecks if is activity tracking.booleanChecks if is enabled.booleanChecks if is primary.voidreset()Reset.voidsetAccessStats(long now) Sets the access stats.voidsetActive(double arg0) Sets the active.voidsetActivityTracking(boolean arg0) Sets the activity tracking.voidsetFirstAccess(Date arg0) Sets the first access.voidsetHits(double arg0) Sets the hits.voidsetLastAccess(Date arg0) Sets the last access.voidsetLastValue(double arg0) Sets the last value.voidsetMax(double arg0) Sets the max.voidsetMaxActive(double arg0) Sets the max active.voidsetMin(double arg0) Sets the min.voidsetPrimary(boolean arg0) Sets the primary.voidsetTotal(double arg0) Sets the total.voidsetTotalActive(double arg0) Sets the total active.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
-
JamonMonitor
public JamonMonitor(com.jamonapi.Monitor monitor) Instantiates a new monitor.- Parameters:
monitor- the monitor
-
-
Method Details
-
add
public void add(double arg0) Adds the.- Parameters:
arg0- argument- See Also:
-
disable
public void disable()Disable.- See Also:
-
enable
public void enable()Enable.- See Also:
-
equals
Tests if given object is equal.- Overrides:
equalsin classAbstractProfileMonitor- Parameters:
obj- the other object to compare- Returns:
- true if objects are equal
- See Also:
-
getActive
public double getActive()Gets the active.- Returns:
- active
- See Also:
-
getAvg
public double getAvg()Gets the average.- Returns:
- average
- See Also:
-
getAvgActive
public double getAvgActive()Gets the active average.- Returns:
- average active
- See Also:
-
getAvgGlobalActive
public double getAvgGlobalActive()Gets the global active average.- Returns:
- average global active
- See Also:
-
getAvgPrimaryActive
public double getAvgPrimaryActive()Gets the primary active average.- Returns:
- average primary active
- See Also:
-
getFirstAccess
-
getHits
public int getHits()Gets the hits.- Returns:
- number of hits
- See Also:
-
getLabel
-
getLastAccess
-
getLastValue
public double getLastValue()Gets the last value.- Returns:
- last value
- See Also:
-
getListenerType
Gets the listener type.- Parameters:
listenerType- the listener type- Returns:
- listener type
- See Also:
-
getMax
public double getMax()Gets the max.- Returns:
- maximum
- See Also:
-
getMaxActive
public double getMaxActive()Gets the max active.- Returns:
- maximal active
- See Also:
-
getMin
public double getMin()Gets the min.- Returns:
- minimum
- See Also:
-
getMonitors
-
getMonKey
public com.jamonapi.MonKey getMonKey()Gets the mon key.- Returns:
- monitor key
- See Also:
-
getRange
public com.jamonapi.Range getRange()Gets the range.- Returns:
- range
- See Also:
-
getStdDev
public double getStdDev()Gets the std dev.- Returns:
- standard dev
- See Also:
-
getTotal
public double getTotal()Gets the total.- Returns:
- total
- See Also:
-
getUnits
-
hashCode
public int hashCode()Hash code.- Overrides:
hashCodein classAbstractProfileMonitor- Returns:
- hash code
- See Also:
-
hasListeners
public boolean hasListeners()Checks for listeners.- Returns:
- true if object has listeners
- See Also:
-
isActivityTracking
public boolean isActivityTracking()Checks if is activity tracking.- Returns:
- activity tracking
- See Also:
-
isEnabled
public boolean isEnabled()Checks if is enabled.- Returns:
- true if enabled
- See Also:
-
isPrimary
public boolean isPrimary()Checks if is primary.- Returns:
- true if primary
- See Also:
-
reset
public void reset()Reset.- See Also:
-
setAccessStats
public void setAccessStats(long now) Sets the access stats.- Parameters:
now- the now- See Also:
-
setActive
public void setActive(double arg0) Sets the active.- Parameters:
arg0- the arg0- See Also:
-
setActivityTracking
public void setActivityTracking(boolean arg0) Sets the activity tracking.- Parameters:
arg0- the arg0- See Also:
-
setFirstAccess
-
setHits
public void setHits(double arg0) Sets the hits.- Parameters:
arg0- the arg0- See Also:
-
setLastAccess
-
setLastValue
public void setLastValue(double arg0) Sets the last value.- Parameters:
arg0- the arg0- See Also:
-
setMax
public void setMax(double arg0) Sets the max.- Parameters:
arg0- the arg0- See Also:
-
setMaxActive
public void setMaxActive(double arg0) Sets the max active.- Parameters:
arg0- the arg0- See Also:
-
setMin
public void setMin(double arg0) Sets the min.- Parameters:
arg0- the arg0- See Also:
-
setPrimary
public void setPrimary(boolean arg0) Sets the primary.- Parameters:
arg0- the arg0- See Also:
-
setTotal
public void setTotal(double arg0) Sets the total.- Parameters:
arg0- the arg0- See Also:
-
setTotalActive
public void setTotalActive(double arg0) Sets the total active.- Parameters:
arg0- the arg0- See Also:
-
start
public void start()Start.- See Also:
-
stop
public void stop()Stop.- See Also:
-
toString
To string.- Overrides:
toStringin classObject- Returns:
- e.g. "JAMon Label=void patterntesting.runtime.monitor.ProfileTest.testProfiler(), Units=ms.:" + " (LastValue=8.0, Hits=1.0, Avg=8.0, Total=8.0, Min=8.0, Max=8.0, Active=1.0, Avg Active=3.0," + " Max Active=2.0, First Access=Sat Dec 27 17:31:09 CET 2008, Last Access=Sat Dec 27 17:31:09 CET 2008)"
- See Also:
-
toShortString
-
toCsvHeadline
-
toCsvString
-