public final class PerfDataUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PerfDataUtils.PerfCounter |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addCounter(com.sun.jna.platform.win32.WinNT.HANDLEByReference query,
String path,
com.sun.jna.platform.win32.WinNT.HANDLEByReference p)
Adds a pdh counter to a query
|
static boolean |
closeQuery(com.sun.jna.platform.win32.WinNT.HANDLEByReference q)
Close a pdh query
|
static PerfDataUtils.PerfCounter |
createCounter(String object,
String instance,
String counter)
Create a Performance Counter
|
static boolean |
openQuery(com.sun.jna.platform.win32.WinNT.HANDLEByReference q)
Open a pdh query
|
static long |
queryCounter(com.sun.jna.platform.win32.WinNT.HANDLEByReference counter)
Get value of pdh counter
|
static boolean |
removeCounter(com.sun.jna.platform.win32.WinNT.HANDLEByReference p)
Remove a pdh counter
|
static long |
updateQueryTimestamp(com.sun.jna.platform.win32.WinNT.HANDLEByReference query)
Update a query and get the timestamp
|
public static PerfDataUtils.PerfCounter createCounter(String object, String instance, String counter)
object - The object/path for the counterinstance - The instance of the counter, or null if no instancecounter - The counter namepublic static long updateQueryTimestamp(com.sun.jna.platform.win32.WinNT.HANDLEByReference query)
query - The query to update all counters inpublic static boolean openQuery(com.sun.jna.platform.win32.WinNT.HANDLEByReference q)
q - pointer to the querypublic static boolean closeQuery(com.sun.jna.platform.win32.WinNT.HANDLEByReference q)
q - pointer to the querypublic static long queryCounter(com.sun.jna.platform.win32.WinNT.HANDLEByReference counter)
counter - The counter to get the value ofpublic static boolean addCounter(com.sun.jna.platform.win32.WinNT.HANDLEByReference query,
String path,
com.sun.jna.platform.win32.WinNT.HANDLEByReference p)
query - Pointer to the query to add the counterpath - String name of the PerfMon counterp - Pointer to the counterpublic static boolean removeCounter(com.sun.jna.platform.win32.WinNT.HANDLEByReference p)
p - pointer to the counterCopyright © 2020. All rights reserved.