public final class JniPCConnector
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AI_BASE_FOLDER |
static java.lang.String |
AI_NATIVE_FOLDER |
static java.lang.String |
PROCESS_SELF_INSTANCE_NAME |
| Constructor and Description |
|---|
JniPCConnector() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
addPerformanceCounter(java.lang.String category,
java.lang.String counter,
java.lang.String instance)
Adding a performance counter
|
static double |
getValueOfPerformanceCounter(java.lang.String name)
This method will delegate the call to the native code after the proper sanity checks.
|
static boolean |
initialize()
This method must be called before any other method.
|
static java.lang.String |
translateInstanceName(java.lang.String instanceName)
Process instance name is only known at runtime, therefore process level performance counters
should use the 'PROCESS_SELF_INSTANCE_NAME' as the requested process name and then call this
method to translate that logical name into the actual name that is fetched from the native code.
|
public static final java.lang.String AI_BASE_FOLDER
public static final java.lang.String AI_NATIVE_FOLDER
public static final java.lang.String PROCESS_SELF_INSTANCE_NAME
public static boolean initialize()
public static java.lang.String addPerformanceCounter(java.lang.String category,
java.lang.String counter,
java.lang.String instance)
category - The category must be non null non empty value.counter - The counter must be non null non empty value.instance - The instance.public static java.lang.String translateInstanceName(java.lang.String instanceName)
throws java.lang.Exception
instanceName - The raw instance namejava.lang.Exception - If instanceName equals PROCESS_SELF_INSTANCE_NAME but the actual instance name is unknown.public static double getValueOfPerformanceCounter(java.lang.String name)
name - The logical name of the performance counter as was fetched during the 'addPerformanceCounter' call.