Share via


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 ref class BackgroundEnergyDiagnostics abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class BackgroundEnergyDiagnostics final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
class BackgroundEnergyDiagnostics final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class BackgroundEnergyDiagnostics
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
public static class BackgroundEnergyDiagnostics
Public Class BackgroundEnergyDiagnostics
Inheritance
Object Platform::Object IInspectable BackgroundEnergyDiagnostics
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Important

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

Properties

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()

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()

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.

Applies to