Rate This Document
Findability
Accuracy
Completeness
Readability

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
    The structure contains the statistics information during program running, which is defined as follows:
    struct StatusInfo {
        uint64_t bytesRecv;     // Number of received bytes
        uint64_t bytesSend;     // Number of sent bytes
        int64_t lag;            // Network latency (ms)
    };
  • FrameInfo structure
    The 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.
         }
    }
}