silk.performer
Class MeasureTimer


java.lang.Object

  extended bysilk.performer.MeasureTimer


public final class MeasureTimer
extends java.lang.Object

Represents a time measure series. Use objects of that class instead of MesureStart/Stop and MeasurePause/Resume of the SilkPerformer class.

See Also:
MeasureCounter

Constructor Summary
MeasureTimer(java.lang.String name, int idx, SilkPerformer spContext)
          Creates a custom time measurement on .
MeasureTimer(java.lang.String name, SilkPerformer spContext)
          Creates a custom time measurement at first position of the timer list.
 
Method Summary
 int addMeasure(int value)
          Adds a single measurement to the time series.
 int getIdx()
          Returns the timer list index of that counter.
 java.lang.String getName()
          Returns the name of the counter.
 int pause()
          Pauses a previously started measurement.
 int resume()
          Resumes a previously paused measurement.
 boolean setBound(double lowValue, double highValue)
          Determines the bound of the timer.
 void start()
          Starts a measurement.
 int stop()
          Stops a previously started measurement.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MeasureTimer


public MeasureTimer(java.lang.String name,
                    SilkPerformer spContext)
Creates a custom time measurement at first position of the timer list.

Parameters:
name - Time measure name, used to identify the measure in output.
spContext - The SilkPerformer object of your framework class.

MeasureTimer


public MeasureTimer(java.lang.String name,
                    int idx,
                    SilkPerformer spContext)
Creates a custom time measurement on .

Parameters:
name - Time measure name, used to identify the measure in output.
idx - Index in the timer list, use it for real time monitoring with PerformanceExplorer.
spContext - The SilkPerformer object of your framework class.
Method Detail

start


public void start()
           throws SilkPerformerException
Starts a measurement.

Throws:
SilkPerformerException

stop


public int stop()
         throws SilkPerformerException
Stops a previously started measurement.

Throws:
SilkPerformerException

pause


public int pause()
          throws SilkPerformerException
Pauses a previously started measurement.

Throws:
SilkPerformerException

resume


public int resume()
           throws SilkPerformerException
Resumes a previously paused measurement.

Throws:
SilkPerformerException

setBound


public boolean setBound(double lowValue,
                        double highValue)
                 throws SilkPerformerException
Determines the bound of the timer. Result reports list the percentage of all time measure values within the time bound specified. A time bound is commonly set to the amount of time that represents the goal for the completion of, for example, the transaction being tested.

Parameters:
lowValue - Lower bound value in seconds.
highValue - Higher bound value in seconds.
Returns:
true for success.
Throws:
SilkPerformerException

addMeasure


public int addMeasure(int value)
               throws SilkPerformerException
Adds a single measurement to the time series.

Parameters:
value - Value in 1/1000 seconds.
Returns:
Final value of the time measure in 1/1000 seconds.
Throws:
SilkPerformerException

getName


public java.lang.String getName()
Returns the name of the counter.


getIdx


public int getIdx()
Returns the timer list index of that counter.


toString


public java.lang.String toString()