|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.faban.driver.engine.Metrics
public class Metrics
Generic statistics collection and reporting facility. For simple agents without any additional statistics, this class can be used right away. This class should also be extended to collect all additional statistics.
Field Summary | |
---|---|
static int |
COARSE_RESPBUCKETS
The number and percentage of coarse response time buckets. |
protected long |
coarseRespBucketSize
Size of the coarse response time bucket. |
protected long |
coarseRespHistMax
Max coarse response time. |
protected long |
cycleSum
Sum of cycle time (not think time) for little's law verification. |
static int |
DELAYBUCKETS
Number of delay time buckets in histogram. |
protected long |
delayBucketSize
Size of each delay time bucket, in ns. |
protected int[] |
delayCntStdy
Number of transactions the delay time was successfuly recorded. |
protected int[][] |
delayHist
Histogram of actual delay times. |
protected long[] |
delayMax
Maximum delay times. |
protected long[] |
delayMin
Minimum delay times. |
protected long[] |
delaySum
Sum of delay (cycle/think) times. |
protected String |
driverName
Name of the driver. |
protected int |
driverType
Type id of the driver. |
protected long |
endTime
End time as ms offset from start time. |
protected long |
endTimeNanos
End time as nanosec time. |
protected int[] |
errCntStdy
Number of failed transactions during steady state. |
protected int[] |
errCntTotal
Number of failed transactions total. |
static int |
FINE_RESPBUCKETS
The number of fine response time buckets. |
protected long |
fineRespBucketSize
Size of the fine response time bucket. |
protected long |
fineRespHistMax
Max fine response time. |
protected int |
graphBuckets
Number of graph buckets. |
protected long |
graphBucketSize
Size of each graph bucket, in ns. |
protected double[] |
hiRespSumStdy
Sum of high response times that fall into the overflow bucket. |
protected String |
host
Originating host name. |
protected double |
metric
The final resulting metric. |
protected LinkedHashMap<String,CustomMetrics> |
metricAttachments
The attached custom metrics. |
static int |
RESPBUCKET_SIZE_RATIO
The bucket size ratio between coarse and fine response time buckets. |
static int |
RESPBUCKETS
The total number of response time buckets. |
protected long[][] |
respGraph
Graph of accumulated response times over the course of the run. |
protected int[][] |
respHist
Response time histogram. |
protected long[] |
respMax
Max. |
protected double[] |
respSumStdy
Sum of response times during steady state. |
protected double[] |
respSumTotal
Sum of response times total. |
protected long |
startTime
Start time as absolute time, in ms. |
protected int |
stdyState
Run steady state, in milliseconds. |
protected double[] |
sumSquaresStdy
Sum of squares of the deviation during steady state. |
protected double[] |
sumSquaresTotal
Overall sum of squares of the deviation. |
protected LinkedHashMap<String,CustomTableMetrics> |
tableAttachments
The attached custom table metrics. |
protected int[][] |
targetedDelayHist
Histogram of selected delay times. |
protected long[] |
targetedDelaySum
Targeted delay times. |
protected AgentThread |
thread
Reference to the thread associated with this metrics. |
protected int[][] |
thruputGraph
The thruput graph. |
protected int[] |
txCntStdy
Number of successful transactions during steady state. |
protected int[] |
txCntTotal
Number of successful transactions total. |
protected String[] |
txNames
List of operation names. |
protected int |
txTypes
Number of operations in the driver. |
Constructor Summary | |
---|---|
Metrics(AgentThread agent)
Constructs a Metrics object for this agent thread. |
Method Summary | |
---|---|
void |
add(Metrics s)
This method aggregates the stats with the stats of another thread. |
Object |
clone()
Makes a deep copy of this metrics object. |
double |
getTps()
Calculates the aggregate TPS from the current stats. |
void |
printDetail(StringBuilder b)
Prints the detail results into the given buffer. |
boolean |
printSummary(StringBuilder buffer,
BenchmarkDefinition benchDef)
Prints the summary report for the statistics. |
void |
recordDelayTime()
Records the delay (think/cycle) time. |
void |
recordError()
Records the error count for an unsuccessful transaction. |
void |
recordTx()
Updates the various stats for a successful transaction. |
String |
toString()
Provides a string presentation of the current stats. |
void |
wrap()
Wraps up the metric for serialization/transportation and/or further processing. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RESPBUCKET_SIZE_RATIO
public static final int COARSE_RESPBUCKETS
public static final int FINE_RESPBUCKETS
public static final int RESPBUCKETS
public static final int DELAYBUCKETS
protected long fineRespBucketSize
protected long coarseRespBucketSize
protected long fineRespHistMax
protected long coarseRespHistMax
protected long delayBucketSize
protected long graphBucketSize
protected int graphBuckets
protected int[] txCntStdy
protected int[] txCntTotal
protected int[] errCntStdy
protected int[] errCntTotal
protected int[] delayCntStdy
protected double[] respSumStdy
protected double[] respSumTotal
protected double[] hiRespSumStdy
protected double[] sumSquaresStdy
protected double[] sumSquaresTotal
protected long[] respMax
protected long[] delaySum
protected long[] targetedDelaySum
protected long[] delayMax
protected long[] delayMin
protected long cycleSum
protected int[][] respHist
protected int[][] delayHist
protected int[][] targetedDelayHist
protected long startTime
protected long endTime
protected transient long endTimeNanos
protected int[][] thruputGraph
protected long[][] respGraph
protected LinkedHashMap<String,CustomMetrics> metricAttachments
protected LinkedHashMap<String,CustomTableMetrics> tableAttachments
protected double metric
protected String host
protected int driverType
protected String driverName
protected int txTypes
protected String[] txNames
protected int stdyState
protected transient AgentThread thread
Constructor Detail |
---|
public Metrics(AgentThread agent)
agent
- The agent threadMethod Detail |
---|
public void recordTx()
public void recordError()
public void recordDelayTime()
public void wrap()
public void add(Metrics s)
add
in interface PairwiseAggregator.Aggregable<Metrics>
s
- stats of next thread to be aggregatedpublic Object clone()
clone
in class Object
Object.clone()
public double getTps()
public String toString()
toString
in class Object
public boolean printSummary(StringBuilder buffer, BenchmarkDefinition benchDef)
buffer
- The buffer for outputting the summarybenchDef
- The benchmark definition
public void printDetail(StringBuilder b)
b
- The buffer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |