net.sf.jperfprobe
Interface ProbeManager

All Known Implementing Classes:
ProbeManagerImpl

public interface ProbeManager

Created by IntelliJ IDEA. User: tel Date: Aug 28, 2009 Time: 12:23:26 AM To change this template use File | Settings | File Templates.


Method Summary
 void addSampleFromProbe(Probe p)
          Add a sample from a probe.
 void clear()
          Clear results for all probes
 void clear(String probeName)
          Clear result for named probe
 void disable()
          Disable all probes.
 void disable(String probeName)
          Disable 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 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
 

Method Detail

put

void put(String probeName,
         Probe probe)
Put a probe into the manager, if the probe exist it will be overwritten. This makes it possible to create a Probe outside the ProbeManager and insert it later.

Parameters:
probeName -
probe -

getResult

Result getResult(String probeName)
Get a result for a given probe

Parameters:
probeName -
Returns:
Result

getResults

Collection<Result> getResults()
Get all the results

Returns:

getProbeInstance

Probe getProbeInstance(String probeName)
Get instance of a named probe, if it is non existent, a probe will be created. There will be created a probe for each thread.

Parameters:
probeName - identifying name of probe
Returns:
probe, null if it cant look it up

start

Probe start(String probeName)
Start probe, identified by probeName, if the probe does not exist, it will be created. see getProbeInstance

Parameters:
probeName - name of existing or new probe.

startSingle

Probe startSingle(String probeName)
Start probe, this probe is global for all threads, no thread private

Parameters:
probeName -
Returns:

stop

void stop(String probeName)
Stop timing. If its non existent, no time or sample will be registered.

Parameters:
probeName - name of probe to stop

addSampleFromProbe

void addSampleFromProbe(Probe p)
Add a sample from a probe. The probe does not need to be managed by ProbeManager

Parameters:
p -

clear

void clear(String probeName)
Clear result for named probe

Parameters:
probeName -

clear

void clear()
Clear results for all probes


disable

void disable(String probeName)
Disable probe

Parameters:
probeName -

disable

void disable()
Disable all probes.


enable

void enable(String probeName)
Enable a named probe

Parameters:
probeName -

enable

void enable()
Enable all probes.


setPresentation

void setPresentation(ProbeManagerImpl.Presentation p)
Set the presentation unit for presentation.

Parameters:
p - presentation to set

getFirstSamplesToSkip

int getFirstSamplesToSkip()
The the # of first samples to skip

Returns:

setFirstSamplesToSkip

void setFirstSamplesToSkip(int _firstSamplesToSkip)
Set how many samples to skip in the calculation of statistics. If set to ie. 5, the first 5 samples will not be taken into account when calculating max/min/n#samples and average.

Parameters:
_firstSamplesToSkip -

getPresentation

ProbeManagerImpl.Presentation getPresentation()
Get the current presentation for the manager

Returns:
presentation

setTime

void setTime(Time tim)
Set the Time implementation.

Parameters:
tim -

getTime

Time getTime()
Get the time implementation

Returns:

toString

String toString(String probe)
Get result as a string

Parameters:
probe -
Returns:
result

getSamples

long[] getSamples(String probe)
Get all samples from a probe, as a string newline delimited

Parameters:
probe -
Returns:
samples

getNames

String[] getNames()
Get all probe names in the ProbeManager

Returns:
probename


Copyright © 2004-2011. All Rights Reserved.