Class ThreadPerformanceData

java.lang.Object
oshi.driver.windows.registry.ThreadPerformanceData

@ThreadSafe public final class ThreadPerformanceData extends Object
Utility to read thread data from HKEY_PERFORMANCE_DATA information with backup from Performance Counters or WMI
  • 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.