|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.infrared.agent.StatisticsCollector
This class is to track statistics for a single request. At the end of the request the collected statistics is passed onto the CollectionStrategy for further processing
| Constructor Summary | |
StatisticsCollector()
Default constructor, used mainly for unit testing |
|
StatisticsCollector(CollectionStrategy collectionStartegy,
String applicationName,
String instanceName)
Construct a new instance |
|
| Method Summary | |
String |
constructApiName(Class declaringType,
String methodName)
Constructs the api name combining the class name and method name. |
void |
endRequest()
This method is called when the processing of a request (operation) has ended. |
void |
recordExecuteError(String sql,
long time,
boolean prepared)
|
void |
recordExecuteSql(String sql,
long time,
boolean prepared)
|
void |
recordFetchComplete(String sql,
long noOfRowsFetched,
long timeTakenForFetch)
|
void |
recordHTTPRequest(String request,
long execTime)
|
void |
recordMethodBegin(String methodName,
String layer)
This is to record that a new method has started execution This method does the following Adds a new entry into the childMethodTimes to track time taken by its child methods Calls methods to setup collection of layer times If call tracing is enabled adds a new node (correponding to the method being called) to the operation tree and points the currNode to the newly added node |
void |
recordMethodBegin(String methodName,
String layer,
String componentName,
ApiContext context)
Called when an API of given name, type, arguments, belonging to the given component and with given context information has started execution. |
void |
recordMethodEnd(String methodName,
String layer)
Called when the method has completed execution. |
void |
recordMethodEnd(String methodName,
String layer,
String componentName,
ApiContext context)
Called when an API of given name, of a given component has stopped execution |
void |
recordMethodTime(String methodName,
String layer,
long time)
This method is callled to record the time to execute a method |
void |
recordMethodTime(String methodName,
String layer,
String componentName,
ApiContext apiCtx,
long time)
This method is called to |
void |
recordPrepareSql(String sql,
long time)
|
void |
startRequest()
This method is called when the processing of a new request (operation) has begun. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StatisticsCollector(CollectionStrategy collectionStartegy,
String applicationName,
String instanceName)
collectionStartegy - applicationName - instanceName - public StatisticsCollector()
| Method Detail |
public void recordMethodBegin(String methodName,
String layer)
methodName - layer -
public void recordMethodBegin(String methodName,
String layer,
String componentName,
ApiContext context)
methodName - layer - componentName - context -
public void recordMethodEnd(String methodName,
String layer)
methodName - layer -
public void recordMethodTime(String methodName,
String layer,
long time)
methodName - layer - time -
public void recordMethodEnd(String methodName,
String layer,
String componentName,
ApiContext context)
methodName - componentName - context -
public void recordMethodTime(String methodName,
String layer,
String componentName,
ApiContext apiCtx,
long time)
methodName - layer - componentName - apiCtx - time -
public void recordExecuteError(String sql,
long time,
boolean prepared)
public void recordExecuteSql(String sql,
long time,
boolean prepared)
public void recordPrepareSql(String sql,
long time)
public void recordFetchComplete(String sql,
long noOfRowsFetched,
long timeTakenForFetch)
public void startRequest()
public void endRequest()
public void recordHTTPRequest(String request,
long execTime)
public String constructApiName(Class declaringType,
String methodName)
declaringType - methodName -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||