|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jperfprobe.ProbeManagerImpl
public final class ProbeManagerImpl
The ProbeManager is the probe factory. It makes it possible start start and stop a probe.
The probe can be started in different ways:
Nested Class Summary | |
---|---|
static class |
ProbeManagerImpl.Presentation
presentation unit enum |
Constructor Summary | |
---|---|
ProbeManagerImpl()
Constructor of probe |
|
ProbeManagerImpl(int firstSamplesToSkip,
ProbeManagerImpl.Presentation presentation,
Time time)
Constr |
Method Summary | |
---|---|
void |
addSampleFromProbe(Probe p)
Add a sample from a probe. |
void |
clear()
Clear the results for all probes |
void |
clear(String probeName)
Clear the result for a named probe |
void |
disable()
Disable all probes. |
void |
disable(String probeName)
Disable a named probe |
void |
enable()
Enable all probes. |
void |
enable(String probeName)
Enable a named probe |
int |
getFirstSamplesToSkip()
The the # of first samples to skip |
String[] |
getNames()
Get all probe names in the ProbeManager |
ProbeManagerImpl.Presentation |
getPresentation()
Get the current presentation for the manager |
Probe |
getProbeInstance(String probeName)
Get instance of a named probe, if it is non existent, a default probe will be created. |
Result |
getResult(String probeName)
Get a result for a given probe |
Collection<Result> |
getResults()
Get all the results |
long[] |
getSamples(String probe)
Get all samples from a probe, as a string newline delimited |
Time |
getTime()
Get the time implementation |
void |
put(String probeName,
Probe probe)
Put a probe into the manager, if the probe exist it will be overwritten. |
void |
setFirstSamplesToSkip(int _firstSamplesToSkip)
Set how many samples to skip in the calculation of statistics. |
void |
setPresentation(ProbeManagerImpl.Presentation p)
Set the presentation unit for presentation. |
void |
setTime(Time tim)
Set the Time implementation. |
Probe |
start(String probeName)
Start probe, identified by probeName, if the probe does not exist, it will be created. |
Probe |
startSingle(String probeName)
Start probe, this probe is global for all threads, no thread private |
void |
stop(String probeName)
Stop timing. |
String |
toString(String probe)
Get result as a string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProbeManagerImpl()
public ProbeManagerImpl(int firstSamplesToSkip, ProbeManagerImpl.Presentation presentation, Time time)
firstSamplesToSkip,
- samples to skip before recordingpresentation,
- of measured valuestime,
- the time implementation to useMethod Detail |
---|
public void put(String probeName, Probe probe)
put
in interface ProbeManager
probeName
- probe
- public Result getResult(String probeName)
getResult
in interface ProbeManager
probeName
-
public Collection<Result> getResults()
getResults
in interface ProbeManager
public Probe getProbeInstance(String probeName)
getProbeInstance
in interface ProbeManager
probeName
- identifying name of probe
public Probe start(String probeName)
start
in interface ProbeManager
probeName
- name of existing or new probe.public Probe startSingle(String probeName)
ProbeManager
startSingle
in interface ProbeManager
public void stop(String probeName)
stop
in interface ProbeManager
probeName
- name of probe to stoppublic void addSampleFromProbe(Probe p)
addSampleFromProbe
in interface ProbeManager
p
- public void clear(String probeName)
clear
in interface ProbeManager
probeName
- public void clear()
clear
in interface ProbeManager
public void disable(String probeName)
disable
in interface ProbeManager
probeName
- public void disable()
disable
in interface ProbeManager
public void enable(String probeName)
ProbeManager
enable
in interface ProbeManager
public void enable()
enable
in interface ProbeManager
public void setPresentation(ProbeManagerImpl.Presentation p)
setPresentation
in interface ProbeManager
p
- presentation to setpublic int getFirstSamplesToSkip()
ProbeManager
getFirstSamplesToSkip
in interface ProbeManager
public void setFirstSamplesToSkip(int _firstSamplesToSkip)
setFirstSamplesToSkip
in interface ProbeManager
_firstSamplesToSkip
- public ProbeManagerImpl.Presentation getPresentation()
getPresentation
in interface ProbeManager
public void setTime(Time tim)
setTime
in interface ProbeManager
tim
- public Time getTime()
ProbeManager
getTime
in interface ProbeManager
public String toString(String probe)
toString
in interface ProbeManager
probe
-
public long[] getSamples(String probe)
getSamples
in interface ProbeManager
probe
-
public String[] getNames()
getNames
in interface ProbeManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |