|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.logging.performance.PerformanceLogger
A performance measurement class for benchmarking. This performance framework provides stopwatch functions for calculating elapsed time for an operation.
This class should be used only at development time since it prints to System.out and contains non-translated strings.
It is highly likely that this class will be deprecated in 2.0. Use TPTPs tools for performance monitoring and logging.
Usage example
Method_A {
String key = PerformanceLogger.register("RSE","WDSC","5120");
PerformanceLogger.start(key, "OP1"); //CallerID is OP1
Method_B();
PerformanceLogger.stop(key);
}
Method_B {
PerformanceLogger.start("RSE"); //"RSE" component, CalleID="class.method"
// Do something
PerformanceLogger.stop("RSE");
}
Method_C {
PerformanceLogger.start(); //Use the default component for recording
// Do something
PerformanceLogger.stop();
}
| Field Summary | |
|---|---|
static int |
OPTION_GET_ALL
|
static int |
OPTION_GET_FEATURE
|
static int |
OPTION_GET_VERSION
|
| Constructor Summary | |
|---|---|
PerformanceLogger()
|
|
| Method Summary | |
|---|---|
static void |
deRegister()
De-register the default component. |
static void |
deRegister(String key)
De-register a component. |
static void |
enablePerformanceLogging(boolean enable)
Enable performance logging The flag ENABLE_PERFORMANCE_LOGGING is enabled(true or false) |
static String |
getCurrentProductInfo(int req,
String comp_id)
public String geCurrentProductInfo(int req, String comp_id) : retrieve the product information. |
static String |
getXMLFileName(String comp_id)
public String getXMLFileName(String comp_id) : get the XML file pathname |
static boolean |
isPerformanceLoggingEnabled()
Check if logging enabled. |
static void |
listSystemProfile()
Retrieve the system information. |
static void |
main(String[] args)
public static void main() : This main is used for testing this PerformanceLogger functions. |
static String |
normalize()
Set the normalization unit for this run. |
static String |
register(String comp_id)
public static String register(String comp_id) : registering a component using default |
static String |
register(String feature,
String version)
Registers component using default component id |
static String |
register(String comp_id,
String feature,
String version)
Registering a component. |
static long |
start()
public static long start(): start timer using default component The Task values will be recorded in the default component XML file |
static long |
start(String comp_id)
public static long start(String comp_id): start timer for component comp_id using default TaskID |
static long |
start(String comp_id,
String call_id)
public long start(String comp_id, String call_id): start the timer for registered component comp_id |
static long |
stop()
public static long stop(): stop timer for default component The Task values will be recorded in the default component XML file |
static long |
stop(String comp_id)
public long stop(String comp_id): Stopping the timer for component comp_id |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int OPTION_GET_ALL
public static final int OPTION_GET_FEATURE
public static final int OPTION_GET_VERSION
| Constructor Detail |
public PerformanceLogger()
| Method Detail |
public static void enablePerformanceLogging(boolean enable)
enable - true or falsepublic static boolean isPerformanceLoggingEnabled()
public static String register(String comp_id)
comp_id - Component to be registered
public static String register(String feature,
String version)
feature - Identifier for Product Feature attribute in XMLversion - Identifier for Product Version attribute in XML
public static String register(String comp_id,
String feature,
String version)
comp_id - Component to be registeredfeature - Identifier for Product Feature attribute in XMLversion - Identifier for Product Version attribute in XML
public static void deRegister()
public static void deRegister(String key)
key - component to be removedpublic static String normalize()
public static long start()
public static long start(String comp_id)
comp_id - : component registered previously by register(comp_id,..)
public static long start(String comp_id,
String call_id)
comp_id - is the registered component
call_id is the "CallID" attribute value for the XML tag "Task"
public static long stop()
public static long stop(String comp_id)
public static String getCurrentProductInfo(int req,
String comp_id)
req - : OPTION_GET_FEATURE/OPTION_GET_VERSION
comp_id : the component id
public static String getXMLFileName(String comp_id)
public static void listSystemProfile()
public static void main(String[] args)
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||