Package oshi.driver.windows.registry
Class ThreadPerformanceData
java.lang.Object
oshi.driver.windows.registry.ThreadPerformanceData
Utility to read thread data from HKEY_PERFORMANCE_DATA information with backup from Performance Counters or WMI
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class to encapsulate data from the registry performance counter block -
Method Summary
Modifier and TypeMethodDescriptionQuery PerfMon for thread performance countersbuildThreadMapFromPerfCounters
(Collection<Integer> pids, String procName, int threadNum) Query PerfMon for thread performance countersQuery the registry for thread performance counters
-
Method Details
-
buildThreadMapFromRegistry
public static Map<Integer,ThreadPerformanceData.PerfCounterBlock> buildThreadMapFromRegistry(Collection<Integer> pids) Query the registry for thread performance counters- Parameters:
pids
- An optional collection of thread IDs to filter the list to. May be null for no filtering.- Returns:
- A map with Thread ID as the key and a
ThreadPerformanceData.PerfCounterBlock
object populated with performance counter information if successful, or null otherwise.
-
buildThreadMapFromPerfCounters
public static Map<Integer,ThreadPerformanceData.PerfCounterBlock> buildThreadMapFromPerfCounters(Collection<Integer> pids) Query PerfMon for thread performance counters- Parameters:
pids
- An optional collection of process IDs to filter the list to. May be null for no filtering.- Returns:
- A map with Thread ID as the key and a
ThreadPerformanceData.PerfCounterBlock
object populated with performance counter information.
-
buildThreadMapFromPerfCounters
public static Map<Integer,ThreadPerformanceData.PerfCounterBlock> buildThreadMapFromPerfCounters(Collection<Integer> pids, String procName, int threadNum) Query PerfMon for thread performance counters- Parameters:
pids
- An optional collection of process IDs to filter the list to. May be null for no filtering.procName
- Limit the matches to processes matching the given name.threadNum
- Limit the matches to threads matching the given thread. Use -1 to match all threads.- Returns:
- A map with Thread ID as the key and a
ThreadPerformanceData.PerfCounterBlock
object populated with performance counter information.
-