Stats

Show Deprecated
Not Creatable
Service

Stats is a service that provides real-time performance information about the current running game instance. Its primary purpose is to provide developers with an end point to measure where resources are being consumed, as well as how much memory is being consumed overall.

The service also stores a tree of StatsItem, which can have their values read by plugins.

Summary

Properties

Methods

Properties

ContactsCount

Read Only
Not Replicated
Read Parallel

ContactsCount describes how many parts are currently in contact with each other, such that one of the two parts are being physically simulated, and thus can be recognized by the BasePart:GetTouchingParts() method.

DataReceiveKbps

Read Only
Not Replicated
Read Parallel

In a networked game, DataReceiveKbps describes roughly how many kilobytes of data are being received by the current instance, per second. If from the server's perspective, this represents the total amount of data being received from the clients connected to the server.If from a client's perspective, this represents the total amount of data being received from the server.

DataSendKbps

Read Only
Not Replicated
Read Parallel

In a networked game, DataSendKbps describes roughly how many kilobytes of data are being sent by the current instance, per second. If from the server's perspective, this represents the total amount of data being sent to the clients connected to the server.If from a client's perspective, this represents the total amount of data being sent to the server.

FrameTime

Read Only
Not Replicated
Read Parallel

HeartbeatTime

Read Only
Not Replicated
Read Parallel

InstanceCount

Read Only
Not Replicated
Read Parallel

InstanceCount is a read-only measurement of how many Instance are currently in memory. This includes the DataModel, its descendants, as well as any object created with Instance.new() which is still present in memory.

MovingPrimitivesCount

Read Only
Not Replicated
Read Parallel

A measurement of how many physically simulated components are currently moving in the game world.

PhysicsReceiveKbps

Read Only
Not Replicated
Read Parallel

PhysicsReceiveKbps is a measurement of roughly how many kilobytes of physics data are being received by the current instance, per second.If from the server's perspective, this represents the total amount of physics data being received from the clients connected to the server.If from a client's perspective, this represents the total amount of physics data being received from the server.

PhysicsSendKbps

Read Only
Not Replicated
Read Parallel

PhysicsSendKbps describes roughly how many kilobytes of physics data are being sent by the current instance, per second.If from the server's perspective, this represents the total amount of physics data being sent to the clients connected to the server.If from a client's perspective, this represents the total amount of physics data being sent to the server.

PhysicsStepTime

Read Only
Not Replicated
Read Parallel

PrimitivesCount

Read Only
Not Replicated
Read Parallel

A measurement of how many physically simulated components currently exist in the game world.

RenderCPUFrameTime

Read Only
Not Replicated
Read Parallel

RenderGPUFrameTime

Read Only
Not Replicated
Read Parallel

SceneDrawcallCount

Read Only
Not Replicated
Read Parallel

SceneTriangleCount

Read Only
Not Replicated
Read Parallel

ShadowsDrawcallCount

Read Only
Not Replicated
Read Parallel

ShadowsTriangleCount

Read Only
Not Replicated
Read Parallel

UI2DDrawcallCount

Read Only
Not Replicated
Read Parallel

UI2DTriangleCount

Read Only
Not Replicated
Read Parallel

UI3DDrawcallCount

Read Only
Not Replicated
Read Parallel

UI3DTriangleCount

Read Only
Not Replicated
Read Parallel

Methods

GetMemoryUsageMbForTag

Returns the number of megabytes that are being consumed in the specified Enum.DeveloperMemoryTag category.

Parameters


Returns

GetTotalMemoryUsageMb

Returns the total amount of memory being consumed by the current game session, in megabytes.


Returns

Events