Stats
Provides runtime performance statistics.
- Service
game:GetService("Stats")- Inherits
- Instance
- Replication
- Never
Behavior
Stats provides runtime performance statistics.
Summary
Returns this instance if it is an ExecutionGroup.
Returns tracked memory usage by category, in megabytes.
Returns total tracked engine memory usage, in megabytes.
Queues a category and JSON-compatible data table for host reporting.
Methods
GetExecutionGroup
Stats:GetExecutionGroup(): ExecutionGroup?Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.
GetMemoryUsageMb
Stats:GetMemoryUsageMb(): numberReturns tracked memory usage by category, in megabytes.
GetTotalMemoryUsageMb
Stats:GetTotalMemoryUsageMb(): numberReturns total tracked engine memory usage, in megabytes.
Report
Stats:Report(category: string, data: { [string]: any }?, percentage: number?): ()Queues a category and JSON-compatible data table for host reporting. Category names contain 1 to 128 bytes; data is limited to 64 KiB. An optional percentage from 0 to 100 samples reports and defaults to 100. Reports for the same category within 10 seconds are skipped.
Inherited members
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying