patterntesting.runtime.monitor
Class JamonMonitor

Package class diagram package JamonMonitor
java.lang.Object
  extended by patterntesting.runtime.monitor.AbstractProfileMonitor
      extended by patterntesting.runtime.monitor.JamonMonitor
All Implemented Interfaces:
Comparable<ProfileMonitor>, ProfileMonitor

public final class JamonMonitor
extends AbstractProfileMonitor

This is a thin wrapper for com.jamonapi.Monitor

Since:
25.12.2008
Version:
$Revision: 1.4 $
Author:
oliver
See Also:
Monitor

Constructor Summary
JamonMonitor(com.jamonapi.Monitor monitor)
          Instantiates a new monitor.
 
Method Summary
 void add(double arg0)
          Normally this method should be synchronized.
 void disable()
          Disable.
 void enable()
           
 boolean equals(JamonMonitor other)
          Tests if given object is equal.
 boolean equals(Object other)
          Tests if given object is equal.
 double getActive()
          Gets the active.
 double getAvg()
          Gets the average
 double getAvgActive()
          Gets the active average
 double getAvgGlobalActive()
          Gets the global active average
 double getAvgPrimaryActive()
          Gets the primary active average.
 Date getFirstAccess()
          Gets the first access.
 int getHits()
          Gets the hits.
 String getLabel()
          Gets the label.
 Date getLastAccess()
          Gets the last access.
 double getLastValue()
          Gets the last value.
 com.jamonapi.ListenerType getListenerType(String listenerType)
          Gets the listener type.
 double getMax()
          Gets the max.
 double getMaxActive()
          Gets the max active.
 double getMin()
          Gets the min.
 ProfileMonitor[] getMonitors()
          Gets the monitors.
 com.jamonapi.MonKey getMonKey()
          Gets the mon key.
 com.jamonapi.Range getRange()
          Gets the range.
 double getStdDev()
          Gets the std dev.
 double getTotal()
          Gets the total.
 String getUnits()
          Gets the units.
 int hashCode()
          Hash code.
 boolean hasListeners()
          Checks for listeners.
 boolean isActivityTracking()
          Checks if is activity tracking.
 boolean isEnabled()
          Checks if is enabled.
 boolean isPrimary()
          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.
 String toCsvHeadline()
          To csv headline.
 String toCsvString()
          To csv string.
 String toShortString()
          To short string.
 String toString()
          To string.
 
Methods inherited from class patterntesting.runtime.monitor.AbstractProfileMonitor
compareTo, equals, getLastTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JamonMonitor

public JamonMonitor(com.jamonapi.Monitor monitor)
Instantiates a new monitor.

Parameters:
monitor - the monitor
Method Detail

add

public void add(double arg0)
Description copied from interface: ProfileMonitor
Normally this method should be synchronized. But we waive it with the risk that the measured time may be slightly wrong.

Parameters:
arg0 - argument
See Also:
Monitor.add(double)

disable

public void disable()
Disable.

See Also:
Monitor.disable()

enable

public void enable()
See Also:
Monitor.enable()

equals

public boolean equals(Object other)
Tests if given object is equal.

Overrides:
equals in class AbstractProfileMonitor
Parameters:
other - the other object to compare
Returns:
true if objects are equal
See Also:
Object.equals(java.lang.Object)

equals

public boolean equals(JamonMonitor other)
Tests if given object is equal.

Parameters:
other - the other object to compare
Returns:
true if objects are equal
See Also:
Object.equals(java.lang.Object)

getActive

public double getActive()
Gets the active.

Returns:
active
See Also:
Monitor.getActive()

getAvg

public double getAvg()
Gets the average

Returns:
average
See Also:
Monitor.getAvg()

getAvgActive

public double getAvgActive()
Gets the active average

Returns:
average active
See Also:
Monitor.getAvgActive()

getAvgGlobalActive

public double getAvgGlobalActive()
Gets the global active average

Returns:
average global active
See Also:
Monitor.getAvgGlobalActive()

getAvgPrimaryActive

public double getAvgPrimaryActive()
Gets the primary active average.

Returns:
average primary active
See Also:
Monitor.getAvgPrimaryActive()

getFirstAccess

public Date getFirstAccess()
Gets the first access.

Returns:
first access
See Also:
Monitor.getFirstAccess()

getHits

public int getHits()
Gets the hits.

Returns:
number of hits
See Also:
Monitor.getHits()

getLabel

public String getLabel()
Gets the label.

Returns:
label
See Also:
Monitor.getLabel()

getLastAccess

public Date getLastAccess()
Gets the last access.

Returns:
last access
See Also:
Monitor.getLastAccess()

getLastValue

public double getLastValue()
Gets the last value.

Returns:
last value
See Also:
Monitor.getLastValue()

getListenerType

public com.jamonapi.ListenerType getListenerType(String listenerType)
Gets the listener type.

Parameters:
listenerType - the listener type
Returns:
listener type
See Also:
Monitor.getListenerType(java.lang.String)

getMax

public double getMax()
Gets the max.

Returns:
maximum
See Also:
Monitor.getMax()

getMaxActive

public double getMaxActive()
Gets the max active.

Returns:
maximal active
See Also:
Monitor.getMaxActive()

getMin

public double getMin()
Gets the min.

Returns:
minimum
See Also:
Monitor.getMin()

getMonitors

@UnsupportedOperation
public ProfileMonitor[] getMonitors()
Gets the monitors.

Returns:
monitors
See Also:
MonitorComposite.getMonitors()

getMonKey

public com.jamonapi.MonKey getMonKey()
Gets the mon key.

Returns:
monitor key
See Also:
Monitor.getMonKey()

getRange

public com.jamonapi.Range getRange()
Gets the range.

Returns:
range
See Also:
Monitor.getRange()

getStdDev

public double getStdDev()
Gets the std dev.

Returns:
standard dev
See Also:
Monitor.getStdDev()

getTotal

public double getTotal()
Gets the total.

Returns:
total
See Also:
Monitor.getTotal()

getUnits

public String getUnits()
Gets the units.

Returns:
units
See Also:
Monitor.getUnits()

hashCode

public int hashCode()
Hash code.

Overrides:
hashCode in class AbstractProfileMonitor
Returns:
hash code
See Also:
Object.hashCode()

hasListeners

public boolean hasListeners()
Checks for listeners.

Returns:
true if object has listeners
See Also:
Monitor.hasListeners()

isActivityTracking

public boolean isActivityTracking()
Checks if is activity tracking.

Returns:
activity tracking
See Also:
Monitor.isActivityTracking()

isEnabled

public boolean isEnabled()
Checks if is enabled.

Returns:
true if enabled
See Also:
Monitor.isEnabled()

isPrimary

public boolean isPrimary()
Checks if is primary.

Returns:
true if primary
See Also:
Monitor.isPrimary()

reset

public void reset()
Reset.

See Also:
Monitor.reset()

setAccessStats

public void setAccessStats(long now)
Sets the access stats.

Parameters:
now - the now
See Also:
Monitor.setAccessStats(long)

setActive

public void setActive(double arg0)
Sets the active.

Parameters:
arg0 - the arg0
See Also:
Monitor.setActive(double)

setActivityTracking

public void setActivityTracking(boolean arg0)
Sets the activity tracking.

Parameters:
arg0 - the arg0
See Also:
Monitor.setActivityTracking(boolean)

setFirstAccess

public void setFirstAccess(Date arg0)
Sets the first access.

Parameters:
arg0 - the arg0
See Also:
Monitor.setFirstAccess(java.util.Date)

setHits

public void setHits(double arg0)
Sets the hits.

Parameters:
arg0 - the arg0
See Also:
Monitor.setHits(double)

setLastAccess

public void setLastAccess(Date arg0)
Sets the last access.

Parameters:
arg0 - the arg0
See Also:
Monitor.setLastAccess(java.util.Date)

setLastValue

public void setLastValue(double arg0)
Sets the last value.

Parameters:
arg0 - the arg0
See Also:
Monitor.setLastValue(double)

setMax

public void setMax(double arg0)
Sets the max.

Parameters:
arg0 - the arg0
See Also:
Monitor.setMax(double)

setMaxActive

public void setMaxActive(double arg0)
Sets the max active.

Parameters:
arg0 - the arg0
See Also:
Monitor.setMaxActive(double)

setMin

public void setMin(double arg0)
Sets the min.

Parameters:
arg0 - the arg0
See Also:
Monitor.setMin(double)

setPrimary

public void setPrimary(boolean arg0)
Sets the primary.

Parameters:
arg0 - the arg0
See Also:
Monitor.setPrimary(boolean)

setTotal

public void setTotal(double arg0)
Sets the total.

Parameters:
arg0 - the arg0
See Also:
Monitor.setTotal(double)

setTotalActive

public void setTotalActive(double arg0)
Sets the total active.

Parameters:
arg0 - the arg0
See Also:
Monitor.setTotalActive(double)

start

public void start()
Start.

See Also:
Monitor.start()

stop

public void stop()
Stop.

See Also:
Monitor.stop()

toString

public String toString()
To string.

Overrides:
toString in class Object
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:
Monitor.toString()

toShortString

public String toShortString()
Description copied from interface: ProfileMonitor
To short string.

Returns:
the string
See Also:
ProfileMonitor.toShortString()

toCsvHeadline

public String toCsvHeadline()
Description copied from interface: ProfileMonitor
To csv headline.

Returns:
the string
See Also:
ProfileMonitor.toCsvHeadline()

toCsvString

public String toCsvString()
Description copied from interface: ProfileMonitor
To csv string.

Returns:
the string
See Also:
ProfileMonitor.toCsvString()


Copyright © 2002–2014 PatternTesting Team. All rights reserved.