|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.stat.IntegerValueTracker
This class defines a simple stat tracker that can be used to track events associated with integer values.
| Field Summary | |
static java.lang.String |
COMPARE_IN_PARALLEL_STRING
The text that will be used to indicate that the comparison between multiple jobs will be performed in parallel. |
static java.lang.String |
COMPARE_OVER_TIME_STRING
The text that will be used to indicate that the comparison between multiple jobs will be performed over time. |
| Constructor Summary | |
IntegerValueTracker()
Creates a new integer value tracker intended for use as a placeholder for decoding purposes. |
|
IntegerValueTracker(java.lang.String clientID,
java.lang.String threadID,
java.lang.String displayName,
int collectionInterval)
Creates a new integer value tracker with the specified information. |
|
| Method Summary | |
void |
addValue(int intValue)
Adds the specified value to the set of information collected so far for this stat tracker. |
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 that this tracker was updated in a single second. |
double |
getAverageValue()
Retrieves the sum of all the values added to this stat tracker divided by the number of values added to this stat tracker. |
double |
getAverageValuePerInterval()
Retrieves the average total of all the values added in a single interval. |
double |
getAverageValuePerSecond()
Retrieves the sum of all the values provided to this tracker divided by the total number of seconds that it was collecting data. |
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. |
double |
getCorrelationCoefficient()
Retrieves the correlation coefficient for the data, which is a measure of how strongly a change in one variable impacts a change in another. |
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. |
double |
getHorizontalityTScore()
Retrieves a T score value that can be used to determine how confident we are that the result set is approximately linear. |
int[] |
getIntervalCounts()
Retrieves an array indicating the number of times the tracked event occurred over each interval. |
int[] |
getIntervalTotals()
Retrieves an array containing the sums of all the values added to this tracker over each interval. |
int |
getMaxValue()
Retrieves the maximum value supplied to this tracker over the entire duration. |
int |
getMinValue()
Retrieves the minimum value supplied to this tracker over the entire duration. |
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. |
double[] |
getRegressionCoefficients()
Retrieves the linear regression coefficients for this tracker, based on the average value per occurrence. |
double |
getStandardDeviation()
Retrieves the standard deviation for this tracker, based on the average value per occurrence. |
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. |
long |
getTotalCountAsLong()
Retrieves the total number of times that the tracked event occurred over the total duration. |
int |
getTotalValue()
Retrieves the sum of all the individual values added to this stat tracker over the total duration. |
long |
getTotalValueAsLong()
Retrieves the sum of all the individual values added to this stat tracker over the total duration. |
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 |
setIntervalData(int[] intervalTotals,
int[] intervalCounts)
Specifies the data associated with this tracker in terms of the total value per interval and the number of occurrences per interval. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String COMPARE_IN_PARALLEL_STRING
public static final java.lang.String COMPARE_OVER_TIME_STRING
| Constructor Detail |
public IntegerValueTracker()
public IntegerValueTracker(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 client 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 addValue(int intValue)
intValue - The value to add to the set of information collected so
far for this stat tracker.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 long getTotalCountAsLong()
public int getTotalValue()
public long getTotalValueAsLong()
public double getAverageValue()
public int[] getIntervalCounts()
public int[] getIntervalTotals()
public void setIntervalData(int[] intervalTotals,
int[] intervalCounts)
intervalTotals - An array containing the sums of all the values
added to this tracker over each interval.intervalCounts - An array indicating the number of times the tracked
event occurred over each interval.public int getMaxValue()
public int getMinValue()
public double getAverageCountPerInterval()
public double getAverageValuePerInterval()
public double getAverageCountPerSecond()
public double getAverageValuePerSecond()
public double getStandardDeviation()
public double getCorrelationCoefficient()
public double[] getRegressionCoefficients()
public double getHorizontalityTScore()
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 | |||||||||