Skip to content
DebugUtil

Utils / DebugUtil

DebugUtil Class ​

Game performance data, auxiliary debugging and performance optimization

Table of contents ​

Properties ​

tsEventRpcFuncs: string[]

Accessors ​

cachedRPCs(): string[]
The RPC message cached in the current frame.
frameTime(): number
Frame time is the total time it takes to generate one frame of game content. Since the game thread and the rendering thread keep sync before completing a frame, the frame time is often close to the time displayed in one of the thread. Unit ms
gameThreadTime(): number
The time consumed by objects in the game thread, including script, animation, game logic, etc. The unit is ms. If the frame time is close to the time displayed in the game thread, the performance of the game is likely to be hindered by the game thread. The unit is ms.
receivedBytes(): number
The total size of network packets received within one second. Unit Byte.
receivedRPCs(): string[]
The RPC message received in the current frame.
renderThreadTime(): number
The time spent processing these objects in the rendering thread is affected by particles, effects, meshes, and other factors. The unit is ms.
sentBytes(): number
The total size of network packets sent within one second. Unit Byte
sentRPCs(): string[]
The RPC message sent in the current frame.
usedMemory(): number
The total memory size currently in use, measured in MB.

Properties ​

tsEventRpcFuncs ​

▪ Static tsEventRpcFuncs: string[]

Accessors ​

cachedRPCs ​

• Static get cachedRPCs(): string[]

The RPC message cached in the current frame.

Returns ​

string[]

frameTime ​

• Static get frameTime(): number

Frame time is the total time it takes to generate one frame of game content. Since the game thread and the rendering thread keep sync before completing a frame, the frame time is often close to the time displayed in one of the thread. Unit ms

Returns ​

number

gameThreadTime ​

• Static get gameThreadTime(): number

The time consumed by objects in the game thread, including script, animation, game logic, etc. The unit is ms. If the frame time is close to the time displayed in the game thread, the performance of the game is likely to be hindered by the game thread. The unit is ms.

Returns ​

number

receivedBytes ​

• Static get receivedBytes(): number

The total size of network packets received within one second. Unit Byte.

Returns ​

number

receivedRPCs ​

• Static get receivedRPCs(): string[]

The RPC message received in the current frame.

Returns ​

string[]

renderThreadTime ​

• Static get renderThreadTime(): number

The time spent processing these objects in the rendering thread is affected by particles, effects, meshes, and other factors. The unit is ms.

Precautions

If the frame time is close to the time displayed in the Draw thread, the performance of the game is likely to be hindered by the rendering thread. The unit is ms. The value for the server is 0.

Returns ​

number

sentBytes ​

• Static get sentBytes(): number

The total size of network packets sent within one second. Unit Byte

Returns ​

number

sentRPCs ​

• Static get sentRPCs(): string[]

The RPC message sent in the current frame.

Returns ​

string[]

usedMemory ​

• Static get usedMemory(): number

The total memory size currently in use, measured in MB.

Returns ​