Expand description
Information about, and functions to manage, your code’s resource utilization
Structs
- Object with info about the memory heap of your virtual machine.
Functions
- The amount of CPU that has accumulated in your bucket.
- generate_pixel
generate-pixelGenerate aPixel, consumingPIXEL_CPU_COSTCPU from your bucket. - Get information about your script’s memory heap usage.
- Get the amount of CPU time used for execution so far this tick.
- Stop execution of your script immediately and requests the destruction of your code’s environment, which will start fresh on the following tick.
- Your assigned CPU for the current shard.
- Sets new shard limits for your script in an
Object, with shard names inJsStringform as keys and numbers as values. This is the same format accepted byshard_limits. Total amount of CPU should remain equal to the sum of the values ofshard_limits. This method can be used only once per 12 hours (CPU_SET_SHARD_LIMITS_COOLDOWN). - Your assigned CPU limits for each shard in an
Object, with shard names inJsStringform as keys and numbers as values. This is the same format accepted byset_shard_limits. - The amount of CPU available for execution this tick, which consists of your per-tick CPU
limitplus your accruedbucket, up to a maximum of 500 (CPU_TICK_LIMIT_MAX);f64::INFINITYon sim. - Consume a
CpuUnlockto unlock your full CPU for 24 hours. - Whether your account is unlocked to have full CPU.
- If your account has been unlocked for a limited time, contains the time it’s unlocked until in milliseconds since epoch.