ch.elca.el4j.services.statistics.detailed
Class MeasureItem

java.lang.Object
  extended by ch.elca.el4j.services.statistics.detailed.MeasureItem
All Implemented Interfaces:
Serializable

public class MeasureItem
extends Object
implements Serializable

Represents a performance measure collected by the detailed measurement service.

The level attribute of each measure can be used freely.

Please refer to the package level javadoc ch.elca.leaf.services.measuring for more information on the format or the usage. This class was ported from Leaf 2. Original authors: YMA, DBA. Leaf2 package name: ch.elca.leaf.services.measuring

Author:
Rashid Waraich (RWA), Philipp Oser (POS)
See Also:
Serialized Form
File-location:
MeasureItem
Last check-in date:
2009-08-04 15:17:52 +0200 (Di, 04. Aug 2009) by swismer for revision 3880

Constructor Summary
MeasureItem(MeasureId id, int seq, String client, String level, String service, String methodName, long startTime, long duration, String hierarchy)
          Creates a new MeasureItem object.
 
Method Summary
 String getClient()
          Returns the client of the measure.
 String getCsvString(String delimiter)
          Returns a CSV (comma-separated value) representation of the measure.
 long getDuration()
          Returns the duration of the measure.
 String getEjbName()
          Returns the EJB name of the measure.
 String getFormattedString()
          Returns a human-readable representation of the measure.
 String getHierarchy()
          The Hierarchy.
 MeasureId getID()
          Returns the MeasureID id of the measure.
 String getLevel()
          Returns the level of the measure.
 String getMethodName()
          Returns the method name of the measure.
 int getSequence()
          Returns the sequence of the measure.
 String getServiceName()
           
 String getShortLevel()
          The level String representation.
 long getStartTime()
          Returns the start time of the measure (as long value).
 void setServiceName(String serviceName)
          Sets the serviceName explicitly.
 String toString()
          Returns a human-readable representation of the measure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MeasureItem

public MeasureItem(MeasureId id,
                   int seq,
                   String client,
                   String level,
                   String service,
                   String methodName,
                   long startTime,
                   long duration,
                   String hierarchy)
Creates a new MeasureItem object.

Parameters:
id - The id of the measure(a MeasureID object). This value is the same during one measure and all following measures. Following measures are additional service calls in the same method and also all services called after the measuring has been started.
Attribute in database: MID
seq - The sequence of the measure (integer that should start at 1 and be incremented for each sub-value of a same global measure). This value displays the deepth of the method call.
Attribute in database: SEQ
client - The client (host name of a machine) for which the measure is done.
Attribute in database: CLIENT
level - The type of the measure (free usage). If Execution Unit (EU) is gui or web this value commonly is named CLIENT, if EU is cejb then the value is EJB_CONTAINER.
Attribute in database: TYPE
service - The JNDI name of the EJB for which the measure is done (not available in case of a database measure)
Attribute in database: EJBNAME
methodName - The name of the method for which the measure is done
Attribute in database: METHODNAME
startTime - The start time of the measure (as long)
Attribute in database: STARTTIME
duration - The duration of the measure in milliseconds
Attribute in database: DURATION
hierarchy - The hierarchy of the global measure. This information is required to show which call follows the other. Because of time shift between differnet machines, the starttime may vary for- or backward.
Attribute in database: HIERARCHY
Method Detail

getID

public MeasureId getID()
Returns the MeasureID id of the measure.

Returns:
the measure id

getSequence

public int getSequence()
Returns the sequence of the measure.

Returns:
the measure sequence

getClient

public String getClient()
Returns the client of the measure.

Returns:
the measure client

getServiceName

public String getServiceName()
Returns:
Service plus Level (Type) separated by a dot

setServiceName

public void setServiceName(String serviceName)
Sets the serviceName explicitly.

Parameters:
serviceName - Name to set

getLevel

public String getLevel()
Returns the level of the measure.

Returns:
the measure level

getShortLevel

public String getShortLevel()
The level String representation.

Returns:
The level String representation.

getEjbName

public String getEjbName()
Returns the EJB name of the measure.

Returns:
the measure EJB

getMethodName

public String getMethodName()
Returns the method name of the measure.

Returns:
the measure method

getStartTime

public long getStartTime()
Returns the start time of the measure (as long value).

Returns:
the measure start time

getDuration

public long getDuration()
Returns the duration of the measure.

Returns:
the measure duration

getHierarchy

public String getHierarchy()
The Hierarchy.

Returns:
The Hierarchy.

getFormattedString

public String getFormattedString()
Returns a human-readable representation of the measure.

Returns:
measure representation

getCsvString

public String getCsvString(String delimiter)
Returns a CSV (comma-separated value) representation of the measure.

Parameters:
delimiter - the string to use as CSV delimiter
Returns:
measure CSV representation

toString

public String toString()
Returns a human-readable representation of the measure.

Overrides:
toString in class Object
Returns:
measure representation


Copyright © 2005-2011 ELCA. All Rights Reserved.