Skip to content

GetGPUMetricsHistory

Navigation: ADLX SDK ReferencesADLX InterfacesPerformance MonitoringIADLXPerformanceMonitoringServices

Syntax

ADLX_RESULT    GetGPUMetricsHistory (IADLXGPU* pGPU, adlx_int startMs, adlx_int stopMs, IADLXGPUMetricsList** ppMetricsList)

Parameters

#DirectionNameTypeDescription
1.[in]pGPUIADLXGPUThe pointer to the GPU interface.
#DirectionNameTypeDescription
---------------
2.[in]startMsadlx_intThe start time of the time interval (in millisecond).
#DirectionNameTypeDescription
---------------
3.[in]stopMsadlx_intThe stop time of the time interval (in millisecond).
#DirectionNameTypeDescription
---------------
4.[out]ppMetricsListIADLXGPUMetricsListThe address of a pointer to the returned interface. If the interface is not successfully returned, the method sets the dereferenced address *ppMetricsList to nullptr.

Return Value

If the interface is successfully returned, ADLX_OK is returned.

If the interface is not successfully returned, an error code is returned.

Refer to ADLX_RESULT for success codes and error codes.

Remarks

Use the startMs and stopMs to specify the time intervals for fetching the history.

  • To get the reference counted list of the latest performance metric samples from the performance monitoring buffer, specify both the startMs and stopMs as zero.
  • To get the reference counted list of the performance metric samples from A ms ago to the present time, specify startMs as A ms and stopMs as zero.
  • To get the reference counted list of the performance metric samples from A ms ago to B ms ago, specify startMs as A ms and stopMs as B ms.

The returned interface must be discarded with Release when it is no longer needed.

Additional Info

In C++, when using ADLX interfaces as smart pointers, there is no need to call Release because smart pointers call it in their internal implementation.

Requirements

Headerinclude “IPerformanceMonitoring.h”
Minimum version1.0

See Also: IADLXGPU, IADLXGPUMetricsList, Release, ADLX Enums