BackgroundEnergyDiagnostics BackgroundEnergyDiagnostics BackgroundEnergyDiagnostics BackgroundEnergyDiagnostics BackgroundEnergyDiagnostics Class

Definition

Provides debugging APIs for calculating your app's background energy usage in real time. We recommend using these APIs only for debugging.

Important

These APIs consume significant CPU resources. We recommend using these APIs only for debugging purposes.

public : static class BackgroundEnergyDiagnostics
static struct winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics
public static class BackgroundEnergyDiagnostics
Public Shared Class BackgroundEnergyDiagnostics
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Important

These APIs consume significant CPU resources. We recommend using these APIs only for debugging purposes.

Properties

DeviceSpecificConversionFactor DeviceSpecificConversionFactor DeviceSpecificConversionFactor DeviceSpecificConversionFactor DeviceSpecificConversionFactor

Gets the device-specific conversion factor used to convert energy usage (mW) to a normalized percentage.

Important

These APIs consume significant CPU resources. We recommend using these APIs only for debugging purposes.

Methods

ComputeTotalEnergyUsage() ComputeTotalEnergyUsage() ComputeTotalEnergyUsage() ComputeTotalEnergyUsage() ComputeTotalEnergyUsage()

Computes the total cumulative energy usage of the background task since the last reset, expressed as a percentage of normal.

Important

This method consumes significant CPU resources. We recommend using this method only for debugging purposes.

ResetTotalEnergyUsage() ResetTotalEnergyUsage() ResetTotalEnergyUsage() ResetTotalEnergyUsage() ResetTotalEnergyUsage()

Clears the value that represents the total cumulative energy usage of the background task since the last reset.

Important

These APIs consume significant CPU resources. We recommend using these APIs only for debugging purposes.