org.easetech.easytest.reports.data
Class DurationBean

java.lang.Object
  extended by org.easetech.easytest.reports.data.DurationBean
All Implemented Interfaces:
Serializable

public class DurationBean
extends Object
implements Serializable

Class contains duration of item. Item can be a method call. A test method runs for every test data input. In the test method, it is possible to measure the time of a service call which has been called in the test method. In this case to have this service method call, annotate it with @Intercept

Author:
gpcmol
See Also:
Serialized Form

Field Summary
static long NANO_TO_MILLI
           
 
Constructor Summary
DurationBean()
          Constructor
DurationBean(String item, long startInNano, long endInNano)
          Constructor
 
Method Summary
 long getEndInNano()
           
 String getItem()
           
 long getMsDifference()
          Returns the difference end - start in milli seconds
 long getNanoDifference()
          Time difference in nano seconds
 BigDecimal getRoundedMsDifference()
          Returns rounded milli seconds
 long getStartInNano()
           
 void setEndInNano(long endInNano)
           
 void setItem(String item)
           
 void setStartInNano(long startInNano)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NANO_TO_MILLI

public static final long NANO_TO_MILLI
See Also:
Constant Field Values
Constructor Detail

DurationBean

public DurationBean()
Constructor


DurationBean

public DurationBean(String item,
                    long startInNano,
                    long endInNano)
Constructor

Parameters:
item - e.g. method call
startInNano - start system time in nano
endInNano - end system time in nano
Method Detail

getItem

public String getItem()

setItem

public void setItem(String item)

getStartInNano

public long getStartInNano()

setStartInNano

public void setStartInNano(long startInNano)

getEndInNano

public long getEndInNano()

setEndInNano

public void setEndInNano(long endInNano)

getNanoDifference

public long getNanoDifference()
Time difference in nano seconds

Returns:
Time difference in nano seconds

getMsDifference

public long getMsDifference()
Returns the difference end - start in milli seconds

Returns:
difference in ms

getRoundedMsDifference

public BigDecimal getRoundedMsDifference()
Returns rounded milli seconds

Returns:
rounded difference in ms

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.