All Packages Class Hierarchy This Package Previous Next Index
Class edu.vt.marian.common.PerformanceMeasurement
java.lang.Object
|
+----edu.vt.marian.common.PerformanceMeasurement
- public class PerformanceMeasurement
- extends Object
Class name: PerformanceMeasurement
Class description: this class is used to do system performance measurement,
it will record time for each measurement automatically, caculate the
average, and dump all the results to a file in human readable format
-
FILE_WRITE_ERROR
-
-
INVALID_ID
-
-
OK
- possible return values of methods
-
PerformanceMeasurement()
- this constructor will create a PerformanceMeasurement object, there is no
Measurement at this time
-
add_measurement(String)
- 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
-
dump_to_file(String, boolean)
- this method will dump all the result of this object so far into
the file in human readable format, it will rewrite the file or append
to the end of it depending on the parameter append
-
dump_to_file(String, int, boolean)
- this method will dump all the result of the specified measurement so far into
the file in human readable format, it will rewrite the file or append
to the end of it depending on the parameter append
-
end_measure(int)
- this method will record a end time for the specified measurement_id
-
start_measure(int)
- this method will record a start time for the Measurement specified by the
parameter measurement_id
OK
public static final int OK
- possible return values of methods
INVALID_ID
public static final int INVALID_ID
FILE_WRITE_ERROR
public static final int FILE_WRITE_ERROR
PerformanceMeasurement
public PerformanceMeasurement()
- this constructor will create a PerformanceMeasurement object, there is no
Measurement at this time
add_measurement
public int add_measurement(String description)
- 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
start_measure
public int start_measure(int measurement_id)
- this method will record a start time for the Measurement specified by the
parameter measurement_id
end_measure
public int end_measure(int measurement_id)
- this method will record a end time for the specified measurement_id
dump_to_file
public int dump_to_file(String file_name,
boolean append)
- this method will dump all the result of this object so far into
the file in human readable format, it will rewrite the file or append
to the end of it depending on the parameter append
dump_to_file
public int dump_to_file(String file_name,
int measurement_id,
boolean append)
- this method will dump all the result of the specified measurement so far into
the file in human readable format, it will rewrite the file or append
to the end of it depending on the parameter append
All Packages Class Hierarchy This Package Previous Next Index