Cocoon API: Class Profiler
org.apache.cocoon
Class Profiler
java.lang.Object
|
+--org.apache.cocoon.Profiler
All Implemented Interfaces: Actor , Status
public class Profiler extends java.lang.Objectimplements Actor , Status
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.2 $ $Date: 2000/12/09 01:11: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)
getStatus
public java.lang.String getStatus ()
Description copied from interface: Status
Returns information about the status of the implementing class.
Note : this is use instead of the usual toString()
method because some of these methods are declared final in some
classes in JDK 1.1.
Specified by: getStatus
in interface Status
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.