#ifndef _NTPSAPI_H
/**
* The THREAD_PERFORMANCE_DATA structure aggregates various performance metrics for a thread.
*
* \remarks https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-performance_data
*/
typedef struct _THREAD_PERFORMANCE_DATA
{
USHORT Size; // The size of the structure.
USHORT Version; // The version of the structure. Must be set to \ref THREAD_PERFORMANCE_DATA_VERSION.
PROCESSOR_NUMBER ProcessorNumber; // The processor number that identifies where the thread is running.
ULONG ContextSwitches; // The number of context switches that occurred from the time profiling was enabled.
ULONG HwCountersCount; // The number of array elements in the HwCounters array that contain hardware counter data.
ULONG64 UpdateCount; // The number of times that the read operation read the data to ensure a consistent snapshot of the data.
ULONG64 WaitReasonBitMap; // A bitmask of \ref KWAIT_REASON that identifies the reasons for the context switches that occurred since the last time the data was read.
ULONG64 HardwareCounters; // A bitmask of hardware counters used to collect counter data.
COUNTER_READING CycleTime; // The cycle time of the thread (excludes the time spent interrupted) from the time profiling was enabled.
COUNTER_READING HwCounters[MAX_HW_COUNTERS]; // The \ref COUNTER_READING structure that contains hardware counter data.
} THREAD_PERFORMANCE_DATA, *PTHREAD_PERFORMANCE_DATA;
View code on GitHub
No description available.