Package oshi.driver.windows.registry
Class ThreadPerformanceData
java.lang.Object
oshi.driver.windows.registry.ThreadPerformanceData
@ThreadSafe public final class ThreadPerformanceData extends java.lang.Object
Utility to read thread data from HKEY_PERFORMANCE_DATA information with
backup from Performance Counters or WMI
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThreadPerformanceData.PerfCounterBlock
Class to encapsulate data from the registry performance counter block -
Method Summary
Modifier and Type Method Description static java.util.Map<java.lang.Integer,ThreadPerformanceData.PerfCounterBlock>
buildThreadMapFromPerfCounters(java.util.Collection<java.lang.Integer> pids)
Query PerfMon for thread performance countersstatic java.util.Map<java.lang.Integer,ThreadPerformanceData.PerfCounterBlock>
buildThreadMapFromRegistry(java.util.Collection<java.lang.Integer> pids)
Query the registry for thread performance counters
-
Method Details
-
buildThreadMapFromRegistry
public static java.util.Map<java.lang.Integer,ThreadPerformanceData.PerfCounterBlock> buildThreadMapFromRegistry(java.util.Collection<java.lang.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 java.util.Map<java.lang.Integer,ThreadPerformanceData.PerfCounterBlock> buildThreadMapFromPerfCounters(java.util.Collection<java.lang.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.
-