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 TypeMethodDescriptionvoid
add
(double arg0) Adds the.void
disable()
Disable.void
enable()
Enable.boolean
Tests if given object is equal.double
Gets the active.double
getAvg()
Gets the average.double
Gets the active average.double
Gets the global active average.double
Gets the primary active average.Gets the first access.int
getHits()
Gets the hits.getLabel()
Gets the label.Gets the last access.double
Gets the last value.com.jamonapi.ListenerType
getListenerType
(String listenerType) Gets the listener type.double
getMax()
Gets the max.double
Gets the max active.double
getMin()
Gets the min.Gets the monitors.com.jamonapi.MonKey
Gets the mon key.com.jamonapi.Range
getRange()
Gets the range.double
Gets the std dev.double
getTotal()
Gets the total.getUnits()
Gets the units.int
hashCode()
Hash code.boolean
Checks for listeners.boolean
Checks if is activity tracking.boolean
Checks if is enabled.boolean
Checks if is primary.void
reset()
Reset.void
setAccessStats
(long now) Sets the access stats.void
setActive
(double arg0) Sets the active.void
setActivityTracking
(boolean arg0) Sets the activity tracking.void
setFirstAccess
(Date arg0) Sets the first access.void
setHits
(double arg0) Sets the hits.void
setLastAccess
(Date arg0) Sets the last access.void
setLastValue
(double arg0) Sets the last value.void
setMax
(double arg0) Sets the max.void
setMaxActive
(double arg0) Sets the max active.void
setMin
(double arg0) Sets the min.void
setPrimary
(boolean arg0) Sets the primary.void
setTotal
(double arg0) Sets the total.void
setTotalActive
(double arg0) Sets the total active.void
start()
Start.void
stop()
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:
equals
in 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:
hashCode
in 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:
toString
in 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
-