edu.vt.marian.common
Class Measurement
java.lang.Object
|
+--edu.vt.marian.common.Measurement
- public class Measurement
- extends java.lang.Object
Used to measure system performance,
this can be used mutiple times. It will caculate the
average, and dump all the results to a file in human readable format.
Field Summary |
static int |
OK
possible return values of methods |
static int |
WRONG_STATE
|
Constructor Summary |
Measurement(java.lang.String des)
this constructor will create a PerformanceMeasurement object, there is no
Measurement at this time |
Method Summary |
int |
end(long time)
this method will record a start time for the measurement specified by the
parameter measurement_id |
int |
start(long time)
this will add a new measurement into this object, the return value is the id of
this measurement and can be used to do measure later |
int |
to_stream(java.io.PrintWriter pw)
this method will record a end time for the specified measurement_id |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
OK
public static final int OK
- possible return values of methods
WRONG_STATE
public static final int WRONG_STATE
Measurement
public Measurement(java.lang.String des)
- this constructor will create a PerformanceMeasurement object, there is no
Measurement at this time
start
public int start(long time)
- this will add a new measurement into this object, the return value is the id of
this measurement and can be used to do measure later
end
public int end(long time)
- this method will record a start time for the measurement specified by the
parameter measurement_id
to_stream
public int to_stream(java.io.PrintWriter pw)
- this method will record a end time for the specified measurement_id