HeapProfilerService
Provides methods which return Luau heap memory usage summaries on client and server.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
| Memory category | Instances |
|---|
Member index 4
Description
The HeapProfilerService provides methods which return summaries of Luau heap
memory usage on client and server, useful for analyzing the memory allocated
to scripts. The returned summaries break down Luau heap memory usage by:
- VM type, for example
table,string, oruserdata. - Memory category (a value assigned to an object when it is allocated, depending on the thread it is allocated from).
- The Roblox engine class (both total size and instance count).
They also contain a graph view of the Luau heap's memory usage, where each node of the graph is an object allocated in the Luau heap and edges represent references between objects.
HeapProfilerService can also be used to create multiple snapshots to compare
differences in script memory usage over time.
History 7
- 731 Add
- 726 Remove
- 661 Add
- 661 Add OnNewData
- 661 Add ServerRequestDataAsync
- 661 Add ClientRequestDataAsync
- 661 Add HeapProfilerService
Members 4
ClientRequestDataAsync
| Parameters (1) | ||
|---|---|---|
| player | Player | |
| Returns (1) | ||
| string | ||
This function yields. It will block the calling thread until completion.
| Security | PluginSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
OnNewData
| Parameters (5) | |
|---|---|
| player | Player |
| jsonString | buffer |
| id | int |
| compressedLength | int |
| uncompressedLength | int |
| Security | PluginSecurity |
|---|---|
| Thread safety | Unsafe |
ServerRequestDataAsync
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| string | ||
This function yields. It will block the calling thread until completion.
| Security | PluginSecurity |
|---|---|
| Thread safety | Unsafe |