org.apache.cocoon
Class Profiler
java.lang.Object
|
+--org.apache.cocoon.Profiler
- All Implemented Interfaces:
- Actor
- public class Profiler
- extends java.lang.Object
- implements Actor
Records how long certain processes takes for each request.
startEvent () and finishEvent () should be called at the start and
end of each process. Use getProfileTable to get the results as a DOM.
- Version:
- $Revision: 1.1 $ $Date: 2000/09/16 16:04:30 $
- Author:
- Robin Green
Inner Class Summary |
protected class |
Profiler.ProfProcess
|
static class |
Profiler.RequestMarker
We cannot guarantee that the request object will not be recycled by the
servlet runner, so use RequestMarker instead. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATE_FORMAT
public static final java.text.DateFormat DATE_FORMAT
logger
protected Logger logger
requests
protected java.util.Hashtable requests
- This should be a ListMap.
requestOrder
protected java.util.Vector requestOrder
eventNames
protected java.util.Vector eventNames
- This should be a ListSet.
Profiler
public Profiler()
init
public void init(Director director)
- Description copied from interface:
Actor
- Initialize the actor by indicating their director.
- Specified by:
init
in interface Actor
startEvent
public void startEvent(Profiler.RequestMarker request,
java.lang.Class event)
startEvent
public void startEvent(Profiler.RequestMarker request,
java.lang.String event)
finishEvent
public void finishEvent(Profiler.RequestMarker request,
java.lang.Class event)
finishEvent
public void finishEvent(Profiler.RequestMarker request,
java.lang.String event)
mangleName
public java.lang.String mangleName(java.lang.String name)
clear
public void clear()
getProfileTable
public org.w3c.dom.Element getProfileTable(org.w3c.dom.Document dest)
getRequestMap
protected java.util.Hashtable getRequestMap(Profiler.RequestMarker request)
Copyright © 1999-2000 Apache Software Foundation. All Rights Reserved.