public class PerfDataUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
PerfDataUtil.PerfCounter |
| Modifier and Type | Field and Description |
|---|---|
static PerfDataUtil |
INSTANCE
Instance to generate the PerfCounter class.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addCounterToQuery(PerfDataUtil.PerfCounter counter)
Begin monitoring a Performance Data counter
|
static PerfDataUtil.PerfCounter |
createCounter(String object,
String instance,
String counter)
Create a Performance Counter
|
static long |
filetimeToUtcMs(long filetime,
boolean local)
Convert a long representing filetime (100-ns since 1601 epoch) to ms
since 1970 epoch
|
static long |
queryCounter(PerfDataUtil.PerfCounter counter)
Query the raw counter value of a Performance Data counter.
|
static void |
removeAllCounters()
Stop monitoring all Performance Data counters and release their resources
|
static void |
removeAllCounters(String queryKey)
Stop monitoring Performance Data counters for a particular queryKey and
release their resources
|
static boolean |
removeCounterFromQuery(PerfDataUtil.PerfCounter counter)
Stop monitoring a Performance Data counter
|
static long |
updateQuery(PerfDataUtil.PerfCounter counter)
Update a counter, and all other counters on that object
|
static long |
updateQuery(String queryKey)
Update all counters on an object
|
public static final PerfDataUtil INSTANCE
public static PerfDataUtil.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 boolean addCounterToQuery(PerfDataUtil.PerfCounter counter)
counter - A PerfCounter objectpublic static boolean removeCounterFromQuery(PerfDataUtil.PerfCounter counter)
counter - A PerfCounter objectpublic static long updateQuery(PerfDataUtil.PerfCounter counter)
counter - The counter whose object to update counters onpublic static long updateQuery(String queryKey)
queryKey - The counter object to update counters onpublic static long queryCounter(PerfDataUtil.PerfCounter counter)
counter - The counter to querypublic static void removeAllCounters(String queryKey)
queryKey - The counter object to remove counters frompublic static void removeAllCounters()
public static long filetimeToUtcMs(long filetime,
boolean local)
filetime - A 64-bit value equivalent to FILETIMElocal - True if converting from a local filetime (PDH counter); false
if already UTC (WMI PerfRawData classes)Copyright © 2010–2019 oshi. All rights reserved.