Class ThreadPerformanceData
java.lang.Object
oshi.driver.common.windows.registry.ThreadPerformanceData
Common logic for building thread performance data maps from registry or performance counter results. Callers (JNA/FFM
variants) supply the platform-specific pre-fetched registry or performance-counter data.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<Integer, ThreadPerfCounterBlock> buildThreadMapFromPerfCounters(Collection<Integer> pids, Pair<List<String>, Map<ThreadInformation.ThreadPerformanceProperty, List<Long>>> instanceValues) Builds a thread map from performance counter query results.static Map<Integer, ThreadPerfCounterBlock> buildThreadMapFromRegistry(Collection<Integer> pids, Triplet<List<Map<ThreadInformation.ThreadPerformanceProperty, Object>>, Long, Long> threadData) Builds a thread map from registry performance data that has already been read.
-
Field Details
-
THREAD
-
-
Method Details
-
buildThreadMapFromRegistry
public static Map<Integer, ThreadPerfCounterBlock> buildThreadMapFromRegistry(Collection<Integer> pids, Triplet<List<Map<ThreadInformation.ThreadPerformanceProperty, Object>>, Long, Long> threadData) Builds a thread map from registry performance data that has already been read.- Parameters:
pids- An optional collection of process IDs to filter the list to. May be null for no filtering.threadData- The raw registry data triplet (instance maps, perfTime100nSec, now in ms)- Returns:
- A map with Thread ID as the key and a
ThreadPerfCounterBlockobject populated with performance counter information, or null if threadData is null.
-
buildThreadMapFromPerfCounters
public static Map<Integer, ThreadPerfCounterBlock> buildThreadMapFromPerfCounters(Collection<Integer> pids, Pair<List<String>, Map<ThreadInformation.ThreadPerformanceProperty, List<Long>>> instanceValues) Builds a thread map from performance counter query results.- Parameters:
pids- An optional collection of process IDs to filter the list to. May be null for no filtering.instanceValues- The query results as a pair of (instances, valueMap)- Returns:
- A map with Thread ID as the key and a
ThreadPerfCounterBlockobject populated with performance counter information, or null if instanceValues is null.
-