com.oy.shared.lw.perf.agent
Class PerfAgent
java.lang.Object
com.oy.shared.lw.perf.agent.PerfAgent
- All Implemented Interfaces:
- IPerfAgent
- public class PerfAgent
- extends java.lang.Object
- implements IPerfAgent
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_NumFormat
private static java.text.NumberFormat m_NumFormat
m_DateFormat
private static java.text.SimpleDateFormat m_DateFormat
m_Listeners
private java.util.Set m_Listeners
m_Monitors
private java.util.List m_Monitors
m_History
private java.util.List m_History
m_Buffer
private java.lang.StringBuffer m_Buffer
m_Sequence
private int m_Sequence
m_Collect
private int m_Collect
m_OldPerf
private java.lang.String m_OldPerf
m_LastSnapshot
private long m_LastSnapshot
m_Thread
private PerfAgent.ServerThread m_Thread
m_Trace
private ITrace m_Trace
m_Ctx
private PerfAgentContext m_Ctx
PerfAgent
public PerfAgent(PerfAgentContext ctx)
throws java.lang.Exception
PerfAgent
public PerfAgent(ITrace trace,
PerfAgentContext ctx)
throws java.lang.Exception
stop
public void stop()
addListener
public void addListener(IPerfAgentListener listener)
- Specified by:
addListener in interface IPerfAgent
removeListener
public void removeListener(IPerfAgentListener listener)
- Specified by:
removeListener in interface IPerfAgent
renderHeaderRow
private void renderHeaderRow(java.lang.StringBuffer sb,
HtmlSnapshotFormatter form)
renderDataRows
private void renderDataRows(java.lang.StringBuffer sb,
HtmlSnapshotFormatter form,
int maxItems)
makeSnapshot
public void makeSnapshot(java.lang.StringBuffer sb)
- Specified by:
makeSnapshot in interface IPerfAgent
makeSnapshot
public void makeSnapshot(java.lang.StringBuffer sb,
int maxItems)
- Specified by:
makeSnapshot in interface IPerfAgent
assertValidMonitor
private void assertValidMonitor(IPerfMonitor monitor)
indexOfName
private int indexOfName(IPerfMonitor monitor)
addMonitor
public void addMonitor(IPerfMonitor monitor)
- wehn we add monitor we might have a stub for it when it wasremoved last;
in this case we need to replace stub with real monitor; this
is done so the position of a collected value in the history row does not
change
- Specified by:
addMonitor in interface IPerfAgent
removeMonitor
public void removeMonitor(IPerfMonitor monitor)
- when we remove monitors will keep a stub object instead; this
is done so the position of a collected value in the history row does not
change
- Specified by:
removeMonitor in interface IPerfAgent
renderValues
private void renderValues(java.lang.StringBuffer sb,
int count,
long[] values)
snapshotNow
private void snapshotNow()
collectNow
private void collectNow()
enumMonitors
public IPerfMonitor[] enumMonitors()
- Specified by:
enumMonitors in interface IPerfAgent
afterAddMonitor
protected void afterAddMonitor(IPerfMonitor monitor)
afterRemoveMonitor
protected void afterRemoveMonitor(IPerfMonitor monitor)
Copyright (C) 2005-2006 Pavel Simakov
http://www.softwaresecretweapons.com