Class 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
    • Constructor Detail

      • ThreadPerformanceData

        private ThreadPerformanceData()
    • Method Detail

      • 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.
      • buildThreadMapFromPerfCounters

        public static java.util.Map<java.lang.Integer,​ThreadPerformanceData.PerfCounterBlock> buildThreadMapFromPerfCounters​(java.util.Collection<java.lang.Integer> pids,
                                                                                                                                   java.lang.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.