GetStat
Function Usage
Obtains statistics during the running of the instruction stream engine client.
Restrictions
N/A
Prototype
void GetStat(StatusInfo& statusInfo, FrameInfo frameInfo[], uint32_t frameInfoCnt);
Parameters
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
statusInfo |
Output |
StatusInfo |
Network-related statistics |
frameInfo |
Output |
FrameInfo |
Rendering statistics of frameInfoCnt threads |
frameInfoCnt |
Input |
uint32_t |
Size of the frameInfo array. The maximum value is 10. If the value exceeds 10, the function directly returns a result. |
- StatusInfo structure
- FrameInfo structureThe structure of the FrameInfo type in the StatusInfo structure contains the statistics information about each render thread, which is defined as follows:
struct FrameInfo { uint64_t tid; // Rendering thread ID uint32_t fps; // Frame rate of the rendering thread uint64_t frameCount; // Number of frames of the rendering thread };
Returns
N/A
Example Call
void Test()
{
GetStat(StatusInfo& statusInfo, FrameInfo frameInfo[], uint32_t frameInfoCnt);
StatusInfo status;
FrameInfo frameInfo[4];
GetStatus(status, frameInfo, 4);
for (int i = 0; i < 4; i++) {
if (frameInfo[i].fps != 0) {
// Print the render thread information.
}
}
}
Parent topic: External APIs of the Instruction Stream Engine Client