|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface defines all the methods that must be implemented by a class
intended to collect and manage statistical information during the course of
job processing. Note that this class does not place any limitations on the
kind of data that it manages or the way that it collects it. Rather, it
simply defines a common set of methods that allows the SLAMD server to deal
with it in a generic manner.
Note that stat trackers are not threadsafe and therefore a stat tracker
should only be used by a single thread. If you need to use multiple threads,
then have a separate stat tracker per thread and use the
aggregate method to combine the data from those trackers into a
single tracker.
| Method Summary | |
void |
aggregate(StatTracker[] trackers)
Aggregates the information collected by the provided set of stat trackers into a single tracker that represents the information gathered from the entire set of data. |
java.awt.image.BufferedImage |
createGraph(int width,
int height)
Creates a graph that visually depicts the information in this stat tracker using all the default settings. |
java.awt.image.BufferedImage |
createGraph(Job[] jobs,
int width,
int height,
ParameterList parameters)
Creates a graph that visually depicts the information in the provided set of stat trackers. |
java.awt.image.BufferedImage |
createGraph(Job job,
int width,
int height,
ParameterList graphParameters)
Creates a graph that visually depicts the information in the provided set of stat trackers. |
java.awt.image.BufferedImage |
createMonitorGraph(Job job,
int width,
int height,
ParameterList parameters)
Creates a graph that visually depicts the information collected by resource monitors associated with the provided job. |
void |
decode(byte[] encodedData)
Decodes the provided data and uses it as the data for this stat tracker. |
void |
enableRealTimeStats(RealTimeStatReporter statReporter,
java.lang.String jobID)
Indicates that the stat tracker should enable real-time statistics collection. |
byte[] |
encode()
Encodes the data collected by this tracker into a byte array that may be transferred over the network or written out to persistent storage. |
java.lang.String |
getAxisLabel()
Retrieves the label that should be included along the vertical axis in a line graph for this stat tracker. |
java.lang.String |
getClientID()
Retrieves the client ID of the client that used this stat tracker. |
int |
getCollectionInterval()
Retrieves the collection interval (in seconds) that will be used for this stat tracker. |
java.lang.String[][] |
getDataForExport(boolean includeLabels)
Retrieves the raw data associated with this stat tracker in a form that can be easily converted for export to CSV, tab-delimited text, or some other format for use in an external application. |
java.lang.String |
getDetailHTML()
Retrieves a version of the verbose information for this stat tracker, formatted for display in an HTML document. |
java.lang.String |
getDetailString()
Retrieves a detailed (potentially multi-line) string with verbose information about the data collected by this stat tracker. |
java.lang.String |
getDisplayName()
Retrieves the user-friendly name associated with this stat tracker. |
int |
getDuration()
Retrieves the total length of time in seconds that this stat tracker was capturing statistics. |
double[] |
getGraphData()
Retrieves the data that represents the points in a line graph for this stat tracker. |
ParameterList |
getGraphParameterStubs(Job job)
Retrieves the set of parameters that may be specified to customize the graph that is generated based on the statistical information in the stat trackers. |
ParameterList |
getGraphParameterStubs(Job[] jobs)
Retrieves the set of parameters that may be specified to customize the graph that is generated based on the statistical information in the stat trackers. |
ParameterList |
getMonitorGraphParameterStubs(Job job)
Retrieves the set of parameters that may be specified to customize the graph that is generated based on the resource monitor information in the stat trackers. |
int |
getNumIntervals()
Retrieves the number of intervals for which data is available for this stat tracker. |
java.lang.String[] |
getSummaryData()
Retrieves the summary string data for this stat tracker as separate values. |
java.lang.String |
getSummaryHTML()
Retrieves a version of the summary information for this stat tracker formatted for display in an HTML document. |
java.lang.String[] |
getSummaryLabels()
Retrieves a string array with the labels corresponding to the values returned from the getSummaryData method. |
java.lang.String |
getSummaryString()
Retrieves brief one-line summary string with cumulative information about this stat tracker. |
double |
getSummaryValue()
Retrieves the value associated with this stat tracker. |
java.lang.String |
getThreadID()
Retrieves the thread ID of the client thread that used this stat tracker. |
boolean |
isAtLeast(double value)
Indicates whether the value associated with this stat tracker is greater than or equal to the provided value. |
boolean |
isAtMost(double value)
Indicates whether the value associated with this stat tracker is less than or equal to the provided value. |
boolean |
isSearchable()
Indicates whether the user may search for jobs with statistics collected by this stat tracker. |
StatTracker |
newInstance()
Creates a new instance of this stat tracker. |
void |
setClientID(java.lang.String clientID)
Specifies the client ID of the client that used this stat tracker. |
void |
setCollectionInterval(int collectionInterval)
Specifies the collection interval for this stat tracker. |
void |
setDisplayName(java.lang.String displayName)
Specifies the display name for this stat tracker. |
void |
setDuration(int duration)
Specifies the duration for this stat tracker. |
void |
setThreadID(java.lang.String threadID)
Specifies the thread ID of the client thread that used this stat tracker. |
void |
startTracker()
Indicates that the stat tracker is to start maintaining statistics and that it should start its internal timer. |
void |
stopTracker()
Indicates that the stat tracker that there will not be any more statistics collection done and that it should stop its internal timer. |
| Method Detail |
public StatTracker newInstance()
public void startTracker()
public void stopTracker()
public void enableRealTimeStats(RealTimeStatReporter statReporter,
java.lang.String jobID)
statReporter - The stat-reporter that should be used to report
real-time statistics to the SLAMD server.jobID - The job ID of the job that will be reporting the
data.public java.lang.String getClientID()
public void setClientID(java.lang.String clientID)
clientID - The client ID of the client that used this stat tracker.public java.lang.String getThreadID()
public void setThreadID(java.lang.String threadID)
threadID - The thread ID of the client thread that used this stat
tracker.public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String displayName)
displayName - The display name for this stat tracker.public int getCollectionInterval()
public void setCollectionInterval(int collectionInterval)
collectionInterval - The collection interval in seconds to use for
this stat tracker.public int getDuration()
public void setDuration(int duration)
duration - The duration for this stat tracker.public boolean isSearchable()
true if statistics collected by this stat tracker
should be searchable, or false if not.public boolean isAtLeast(double value)
isSearchable returns true, and what exactly
"the value of this stat tracker" means will be left up to those stat
trackers that are searchable.
value - The value against which the value of this stat tracker is to
be compared.
true if the value of this stat tracker is greater
than or equal to the provided value, or false if not.public boolean isAtMost(double value)
isSearchable returns true, and what exactly
"the value of this stat tracker" means will be left up to those stat
trackers that are searchable.
value - The value against which the value of this stat tracker is to
be compared.
true if the value of this stat tracker is less than
or equal to the provided value, or false if not.public int getNumIntervals()
public void aggregate(StatTracker[] trackers)
trackers - The set of stat trackers whose data is to be aggregated.public java.lang.String getSummaryString()
public double getSummaryValue()
isSearchable returns true, and what
exactly "the value associated with this stat tracker" means will be left up
to those stat trackers that are searchable.
public java.lang.String getDetailString()
public java.lang.String getSummaryHTML()
public java.lang.String getDetailHTML()
public java.lang.String[] getSummaryLabels()
getSummaryData method.
getSummaryData method.public java.lang.String[] getSummaryData()
public java.lang.String[][] getDataForExport(boolean includeLabels)
includeLabels - Indicates whether the information being exported
should contain labels.
public byte[] encode()
public void decode(byte[] encodedData)
throws SLAMDException
encodedData - The encoded version of the data to use for this
stat tracker.
SLAMDException - If the provided data cannot be decoded and used
with this stat tracker.public ParameterList getGraphParameterStubs(Job job)
job - The job containing the statistical information to be graphed.
public ParameterList getMonitorGraphParameterStubs(Job job)
job - The job containing the resource monitor information to be
graphed.
public ParameterList getGraphParameterStubs(Job[] jobs)
jobs - The job containing the statistical information to be compared
and graphed.
public double[] getGraphData()
isSearchable
returns true.
null if that data is not available.public java.lang.String getAxisLabel()
isSearchable returns true.
null if that
data is not applicable.
public java.awt.image.BufferedImage createGraph(Job job,
int width,
int height,
ParameterList graphParameters)
job - The job containing the statistical information to
be graphed.width - The width in pixels of the graph to create.height - The height in pixels of the graph to create.graphParameters - The set of parameters that may be used to
customize the graph that is generated.
public java.awt.image.BufferedImage createMonitorGraph(Job job,
int width,
int height,
ParameterList parameters)
job - The job containing the statistical information to be
graphed.width - The width in pixels of the graph to create.height - The height in pixels of the graph to create.parameters - The set of parameters that may be used to customize
the graph that is generated.
public java.awt.image.BufferedImage createGraph(Job[] jobs,
int width,
int height,
ParameterList parameters)
jobs - The job containing the statistical information to be
compared and graphed.width - The width in pixels of the graph to create.height - The height in pixels of the graph to create.parameters - The set of parameters that may be used to customize
the graph that is generated.
public java.awt.image.BufferedImage createGraph(int width,
int height)
width - The width in pixels of the graph to create.height - The height in pixels of the graph to create.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||