PROCESS_ENERGY_VALUES - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H

/**
 * \brief Energy accounting values for a process, broken down by QoS bucket and cycle type.
 *
 * \details Contains CPU cycle counts, energy estimates, network/MBB byte counts,
 * activity durations, and DWM composition statistics accumulated for a process.
 * CPU cycles are indexed by QoS bucket (see PROCESS_ENERGY_VALUES_QOS_INDEX) and
 * cycle type (see PROCESS_ENERGY_VALUES_CYCLE_TYPE_INDEX).
 */
typedef struct _PROCESS_ENERGY_VALUES
{
    /**
     * CPU cycles accumulated per QoS bucket and cycle type.
     * First index: QoS bucket (PROCESS_ENERGY_VALUES_QOS_INDEX).
     * Second index: cycle type — user [0] or kernel [1] (PROCESS_ENERGY_VALUES_CYCLE_TYPE_INDEX).
     */
    ULONGLONG Cycles[ProcessEnergyValuesQoSMax][ProcessEnergyValuesCycleTypeMax];
    /**
     * Energy consumed by disk I/O, in arbitrary energy units.
     */
    ULONGLONG DiskEnergy;
    /**
     * Tail energy attributed to network activity.
     */
    ULONGLONG NetworkTailEnergy;
    /**
     * Tail energy attributed to Mobile Broadband (MBB) activity.
     */
    ULONGLONG MBBTailEnergy;
    /**
     * Total bytes transmitted and received over network interfaces.
     */
    ULONGLONG NetworkTxRxBytes;
    /**
     * Total bytes transmitted and received over Mobile Broadband (MBB) interfaces.
     */
    ULONGLONG MBBTxRxBytes;
    union
    {
        /**
         * Activity state durations: [0] foreground, [1] desktop visible, [2] PSM foreground.
         */
        ENERGY_STATE_DURATION Durations[3];
        struct
        {
            /**
             * Duration the process was in the foreground.
             */
            ENERGY_STATE_DURATION ForegroundDuration;
            /**
             * Duration the process was visible on the desktop.
             */
            ENERGY_STATE_DURATION DesktopVisibleDuration;
            /**
             * Duration the process was in the PSM (Process State Manager) foreground state.
             */
            ENERGY_STATE_DURATION PSMForegroundDuration;
        } DUMMYSTRUCTNAME;
    } DUMMYUNIONNAME;
    /**
     * Number of frames rendered by the DWM compositor on behalf of this process.
     */
    ULONG CompositionRendered;
    /**
     * Number of dirty regions generated by this process during DWM composition.
     */
    ULONG CompositionDirtyGenerated;
    /**
     *  Number of dirty regions propagated from this process to other windows during DWM composition.
     */
    ULONG CompositionDirtyPropagated;
    ULONG Reserved1;
    /**
     * CPU cycles attributed to this process (e.g. from work performed on its behalf).
     * Indexed identically to Cycles: [QoS bucket][cycle type].
     */
    ULONGLONG AttributedCycles[ProcessEnergyValuesQoSMax][ProcessEnergyValuesCycleTypeMax];
    /**
     * CPU cycles consumed while performing work on behalf of another process.
     * Indexed identically to Cycles: [QoS bucket][cycle type].
     */
    ULONGLONG WorkOnBehalfCycles[ProcessEnergyValuesQoSMax][ProcessEnergyValuesCycleTypeMax];
} PROCESS_ENERGY_VALUES, *PPROCESS_ENERGY_VALUES;

#endif

View code on GitHub

NtDoc

No description available.