Expand description
Information about, and functions to manage, your code’s resource utilization
Structs§
- Heap
Statistics - Object with info about the memory heap of your virtual machine.
Functions§
- bucket
- The amount of CPU that has accumulated in your bucket.
- generate_
pixel mmo
- Generate a
Pixel
, consumingPIXEL_CPU_COST
CPU from your bucket. - get_
heap_ statistics - Get information about your script’s memory heap usage.
- get_
used - Get the amount of CPU time used for execution so far this tick.
- halt
- Stop execution of your script immediately and requests the destruction of your code’s environment, which will start fresh on the following tick.
- limit
- Your assigned CPU for the current shard.
- set_
shard_ limits mmo
- Set the allocation of your CPU among the server shards.
- shard_
limits mmo
- Your assigned CPU limits for each shard in an
Object
, with shard names inJsString
form as keys and numbers as values. This is the same format accepted byset_shard_limits
. - tick_
limit - The amount of CPU available for execution in a given tick.
- unlock
mmo
- Consume a
CpuUnlock
to unlock your full CPU for 24 hours. - unlocked
mmo
- Whether your account is unlocked to have full CPU.
- unlocked_
time mmo
- If your account has been unlocked for a limited time, contains the time it’s unlocked until in milliseconds since epoch.