|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.stat.AccumulatingTracker
This class defines a simple stat tracker that can be used to count the number of times a given event occurs. Unlike the incremental tracker, however, the count is not reset at the beginning of each collection interval.
| Constructor Summary | |
AccumulatingTracker()
Creates a new accumulating tracker intended for use as a placeholder for decoding purposes. |
|
AccumulatingTracker(java.lang.String clientID,
java.lang.String threadID,
java.lang.String displayName,
int collectionInterval)
Creates a new accumulating tracker with the specified information. |
|
| 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 parameters)
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. |
double |
getAverageCountPerInterval()
Retrieves the average number of times the tracked event occurred in a single interval. |
double |
getAverageCountPerSecond()
Retrieves the average number of times the tracked event occurred in a single second. |
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. |
int |
getTotalCount()
Retrieves the total number of times that the tracked event occurred over the total duration. |
int[] |
getTotalsByInterval()
Retrieves an array containing the accumulated totals by interval. |
void |
increment()
Increments the counter to indicated that the event we are tracking has occurred. |
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 in seconds to use fort 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 |
setTotalsByInterval(int[] intervalTotals)
Specifies the data for this stat tracker in the form of an array containing the accumulated totals by interval. |
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. |
void |
undoLastIncrement()
Reverts the last increment performed using this tracker. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AccumulatingTracker()
public AccumulatingTracker(java.lang.String clientID,
java.lang.String threadID,
java.lang.String displayName,
int collectionInterval)
clientID - The client ID of the client that used this
stat tracker.threadID - The thread ID of the thread that used this
stat tracker.displayName - The display name to use for this stat tracker.collectionInterval - The collection interval in seconds that
should be used for this stat tracker.| Method Detail |
public StatTracker newInstance()
newInstance in interface StatTrackerpublic void increment()
public void undoLastIncrement()
increment() method.
public void startTracker()
startTracker in interface StatTrackerpublic void stopTracker()
stopTracker in interface StatTracker
public void enableRealTimeStats(RealTimeStatReporter statReporter,
java.lang.String jobID)
enableRealTimeStats in interface StatTrackerstatReporter - 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 int getTotalCount()
public int[] getTotalsByInterval()
public void setTotalsByInterval(int[] intervalTotals)
intervalTotals - An array containing the accumulated totals by
interval.public double getAverageCountPerInterval()
public double getAverageCountPerSecond()
public java.lang.String getClientID()
getClientID in interface StatTrackerpublic void setClientID(java.lang.String clientID)
setClientID in interface StatTrackerclientID - The client ID of the client that used this stat tracker.public java.lang.String getThreadID()
getThreadID in interface StatTrackerpublic void setThreadID(java.lang.String threadID)
setThreadID in interface StatTrackerthreadID - The thread ID of the client thread that used this stat
tracker.public java.lang.String getDisplayName()
getDisplayName in interface StatTrackerpublic void setDisplayName(java.lang.String displayName)
setDisplayName in interface StatTrackerdisplayName - The display name for this stat tracker.public int getCollectionInterval()
getCollectionInterval in interface StatTrackerpublic void setCollectionInterval(int collectionInterval)
setCollectionInterval in interface StatTrackercollectionInterval - The collection interval in seconds to use for
this stat tracker.public int getDuration()
getDuration in interface StatTrackerpublic void setDuration(int duration)
setDuration in interface StatTrackerduration - The duration for this stat tracker.public boolean isSearchable()
isSearchable in interface StatTrackertrue 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.
isAtLeast in interface StatTrackervalue - 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.
isAtMost in interface StatTrackervalue - 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 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.
getSummaryValue in interface StatTrackerpublic int getNumIntervals()
getNumIntervals in interface StatTrackerpublic void aggregate(StatTracker[] trackers)
aggregate in interface StatTrackertrackers - The set of stat trackers whose data is to be aggregated.public java.lang.String getSummaryString()
getSummaryString in interface StatTrackerpublic java.lang.String getDetailString()
getDetailString in interface StatTrackerpublic java.lang.String getSummaryHTML()
getSummaryHTML in interface StatTrackerpublic java.lang.String getDetailHTML()
getDetailHTML in interface StatTrackerpublic java.lang.String[] getSummaryLabels()
getSummaryData method.
getSummaryLabels in interface StatTrackergetSummaryData method.public java.lang.String[] getSummaryData()
getSummaryData in interface StatTrackerpublic java.lang.String[][] getDataForExport(boolean includeLabels)
getDataForExport in interface StatTrackerincludeLabels - Indicates whether the information being exported
should contain labels.
public byte[] encode()
encode in interface StatTracker
public void decode(byte[] encodedData)
throws SLAMDException
decode in interface StatTrackerencodedData - 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)
getGraphParameterStubs in interface StatTrackerjob - The job containing the statistical information to be graphed.
public ParameterList getMonitorGraphParameterStubs(Job job)
getMonitorGraphParameterStubs in interface StatTrackerjob - The job containing the resource monitor information to be
graphed.
public ParameterList getGraphParameterStubs(Job[] jobs)
getGraphParameterStubs in interface StatTrackerjobs - The job containing the statistical information to be compared
and graphed.
public double[] getGraphData()
isSearchable
returns true.
getGraphData in interface StatTrackernull if that data is not available.public java.lang.String getAxisLabel()
isSearchable returns true.
getAxisLabel in interface StatTrackernull if that
data is not applicable.
public java.awt.image.BufferedImage createGraph(Job job,
int width,
int height,
ParameterList parameters)
createGraph in interface StatTrackerjob - 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 createMonitorGraph(Job job,
int width,
int height,
ParameterList parameters)
createMonitorGraph in interface StatTrackerjob - 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)
createGraph in interface StatTrackerjobs - 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)
createGraph in interface StatTrackerwidth - 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 | |||||||||