org.sape.carbon.services.instrumentation.statistics
Interface StatisticsInterceptor

All Known Implementing Classes:
DefaultStatisticsInterceptor

public interface StatisticsInterceptor

This interceptor is designed to track and expose information about the general usage of a Carbon Component. It is designed to track the call information about a component such as the number of times and the duration of calls to each method on a component.

Copyright 2003 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.4 $($Author: dvoet $ / $Date: 2003/05/05 21:21:30 $)
Author:
Greg Hinkle, January 2002

Method Summary
 long getCallCounts()
          The count of calls to the component.
 Collection getMethodStats()
          A collection of the method statistics for the assisted component.
 Date getStartDate()
          The start date of the assisted component.
 long getStartTime()
          Returns the start time of this component
 String getStatsReport()
          Builds an HTML report of information about the assisted component.
 void logStats()
          Logs the statistics for the tracked component to the default logging component.
 void resetStats()
          Resets the statistics being tracked on the component to zero.
 

Method Detail

resetStats

public void resetStats()
Resets the statistics being tracked on the component to zero.


getStartTime

public long getStartTime()
Returns the start time of this component

Returns:
the start time, in milleseconds, of the component

getStartDate

public Date getStartDate()
The start date of the assisted component.

Returns:
the date object of when the assisted component was started

getCallCounts

public long getCallCounts()
The count of calls to the component.

Returns:
the number of times any method on the assisted component were called.

getMethodStats

public Collection getMethodStats()
A collection of the method statistics for the assisted component. DefaultStatisticsInterceptor.MethodStats

Returns:
an unmodifiable collection of method MethodStats objects.
See Also:
DefaultStatisticsInterceptor.MethodStats

logStats

public void logStats()
Logs the statistics for the tracked component to the default logging component.


getStatsReport

public String getStatsReport()

Builds an HTML report of information about the assisted component. This report contains general information about the component as well as statistics on the total method calls and information about each method of the component.

Note: It should be noted that the failure counts are only updated apon the next call to a method that has failed. If a component is failing, there well may be uncounted failures, up to a count of the total threads that have had failures on the component.

Returns:
an html report of information about the tracked component


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.