The PERF_COUNTER_DEFINITION structure describes a performance counter. The Unicode names in this structure must appear in a message file.
typedef struct _PERF_COUNTER_DEFINITION { // pcd
DWORD ByteLength;
DWORD CounterNameTitleIndex;
LPWSTR CounterNameTitle;
DWORD CounterHelpTitleIndex;
LPWSTR CounterHelpTitle;
DWORD DefaultScale;
DWORD DetailLevel;
DWORD CounterType;
DWORD CounterSize;
DWORD CounterOffset;
} PERF_COUNTER_DEFINITION;
Value | Meaning |
---|---|
PERF_DETAIL_NOVICE | The data can be understood by the uninformed user. |
PERF_DETAIL_ADVANCED | The data is designed for the advanced user. |
PERF_DETAIL_EXPERT | The data is designed for the expert user. |
PERF_DETAIL_WIZARD | The data is designed for the system designer. |
These values indicate the counter's data size:
Value | Meaning |
---|---|
PERF_SIZE_DWORD | The counter data is a doubleword. |
PERF_SIZE_LARGE | The counter data is a large integer. |
PERF_SIZE_ZERO | The counter data is a zero-length field. |
PERF_SIZE_VARIABLE_LEN | The size of the counter data is in the CounterSize member. |
These values indicate the additional contents of this member:
Value | Meaning |
---|---|
PERF_TYPE_NUMBER | The counter data is a number value but not a counter. |
PERF_TYPE_COUNTER | The counter data is an increasing numeric value. |
PERF_TYPE_TEXT | The counter data is a text field. |
PERF_TYPE_ZERO | The counter data is always zero. |
If PERF_TYPE_NUMBER is specified, one of these values is also specified to indicate the format of the number:
Value | Meaning |
---|---|
PERF_NUMBER_HEX | The counter data should be displayed as a hexadecimal value. |
PERF_NUMBER_DECIMAL | The counter data should be displayed as a decimal value. |
PERF_NUMBER_DEC_1000 | The counter data should be divided by 1000 and displayed as a decimal value. |
If PERF_TYPE_COUNTER is specified, one of these values is also specified to indicate the type of counter:
Value | Meaning |
---|---|
PERF_COUNTER_VALUE | The counter value is valid without additional calculation; that is, it should be displayed as is. |
PERF_COUNTER_RATE | The counter value should be divided by the elapsed time. |
PERF_COUNTER_FRACTION | The counter value should be divided by the base value indicated by the next counter if it is of type PERF_COUNTER_BASE or by the value of the counter subtype. |
PERF_COUNTER_BASE | The counter value is the base value to use in fractions. |
PERF_COUNTER_ELAPSED | The counter value is a start time to be subtracted from the current time. |
PERF_COUNTER_QUEUELEN | The performance application should use the Queuelen counter — that is, the Queue Length Space-Time Product formula. The next counter is the number currently in the queue. Multiply it by the current time (units specified by this counter's subtype). Add the product to the original value of the counter. To obtain the average queue length, divide the result of the addition by the delta time. |
PERF_COUNTER_HISTOGRAM | The counter value begins or ends a histogram. |
If PERF_TYPE_COUNTER is specified, one of these values is also specified to indicate the subtype of counter:
Value | Meaning |
---|---|
PERF_TIMER_TICK | The frequency of the high-resolution performance counter should be used as the base. |
PERF_TIMER_100NS | The time base units of the 100-nanosecond timer should be used as the base. |
PERF_OBJECT_TIMER | The object-timer frequency should be used as the base unit. This value is system-defined in this counter's PERF_OBJECT_TYPE definition. |
If PERF_TYPE_TEXT is specified, one of these values is also specified to indicate the type of text:
Value | Meaning |
---|---|
PERF_TEXT_UNICODE | The counter data contains Unicode text. |
PERF_TEXT_ASCII | The counter data contains ASCII text. |
These values indicate how to use the counter data in a calculation:
Value | Meaning |
---|---|
PERF_DELTA_COUNTER | The difference between the previous counter value and the current counter value is computed before proceeding. |
PERF_DELTA_BASE | The difference between the previous base value and the current base value is computed before proceeding. |
PERF_INVERSE_COUNTER | After other calculations, the counter should be inverted before displaying or converting to a percentage. |
PERF_MULTI_COUNTER | This value is a sum of counters from several sources, the number of which is indicated by the next counter. |
These values indicate the display suffix of the counter data:
Value | Meaning |
---|---|
PERF_DISPLAY_NO_SUFFIX | There is no display suffix. |
PERF_DISPLAY_PER_SEC | The display suffix is '/sec'. |
PERF_DISPLAY_PERCENT | The display suffix is '%'. |
PERF_DISPLAY_SECONDS | The display suffix is 'secs'. |
PERF_DISPLAY_NOSHOW | The counter value should not be displayed. |
This structure is part of the performance data provided by the RegQueryValueEx function when the HKEY_PERFORMANCE_DATA key is used.
Windows NT: Requires version 3.1 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winperf.h.
Performance Data Helper Overview, Performance Data Structures, RegQueryValueEx