com.sun.faban.driver
Interface CustomMetrics

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
ContentSizeStats

public interface CustomMetrics
extends Serializable, Cloneable

Benchmarks that keep track of custom metrices will need to create a metrics class implementing this CustomMetrics interface. Then, upon initialization it will have to attach the metrics object by calling the attachMectrics(CustomMetrics) method of the driver context.

Author:
Akara Sucharitakul
See Also:
DriverContext.attachMetrics(CustomMetrics)

Nested Class Summary
static class CustomMetrics.Element
          The custom metric element needed by the reporter.
 
Method Summary
 void add(CustomMetrics other)
          Aggregates the metrics from another source or thread with the current one.
 Object clone()
          The metrics need to be cloneable and not throw any exceptions.
 CustomMetrics.Element[] getResults()
          Obtains the results of the metrics represented by this object.
 

Method Detail

add

void add(CustomMetrics other)
Aggregates the metrics from another source or thread with the current one.

Parameters:
other - The metrics from another source

getResults

CustomMetrics.Element[] getResults()
Obtains the results of the metrics represented by this object. The results are string results to allow for proper formatting as required by the implementor. There is no restriction that the internal data be a String.

Returns:
The result elements for each metric.

clone

Object clone()
The metrics need to be cloneable and not throw any exceptions.

Returns:
The CustomMetrics clone