Syntax

float llGetSimStats( integer stat_type );

Parameters

integer stat_type
SIM_STAT_* flag

Return value

Returns a float that is the requested statistic.

Constants

NamePossible ReturnDescription
SIM_STAT_PCT_CHARS_STEPPED0return (≥ 0.0, ≤ 100.0)The % of pathfinding characters updated each frame, averaged over the last minute. The value corresponds to the "Characters Updated" stat in the viewer's Statistics Bar.
SIM_STAT_PHYSICS_FPS1return (≥ 0.0, ≤ Inf)Physics simulation FPS.
SIM_STAT_AGENT_UPDATES2return (≥ 0.0, ≤ Inf)Agent updates per second.
SIM_STAT_FRAME_MS3return (≥ 0.0, ≤ Inf)Total frame time.
SIM_STAT_NET_MS4return (≥ 0.0, ≤ Inf)Time spent in 'network' segment of simulation frame.
SIM_STAT_OTHER_MS5return (≥ 0.0, ≤ Inf)Main simulation segment of frame, encapsulating task, script and misc. updates.
SIM_STAT_PHYSICS_MS6return (≥ 0.0, ≤ Inf)Time spent in 'physics' segment of simulation frame.
SIM_STAT_AGENT_MS7return (≥ 0.0, ≤ Inf)Time spent in 'agent' segment of simulation frame.
SIM_STAT_IMAGE_MS8return (≥ 0.0, ≤ Inf)Time spent in 'image' segment of simulation frame.
SIM_STAT_SCRIPT_MS9return (≥ 0.0, ≤ Inf)Time spent in 'script' segment of simulation frame.
SIM_STAT_AGENT_COUNT10return (≥ 0.0, ≤ Inf)Number of agents in region.
SIM_STAT_CHILD_AGENT_COUNT11return (≥ 0.0, ≤ Inf)Number of child (neighboring) agents in region.
SIM_STAT_ACTIVE_SCRIPT_COUNT12return (≥ 0.0, ≤ Inf)Number of active scripts in region.
SIM_STAT_PACKETS_IN13return (≥ 0.0, ≤ Inf)Average packets in per second.
SIM_STAT_PACKETS_OUT14return (≥ 0.0, ≤ Inf)Average packets out per second.
SIM_STAT_ASSET_DOWNLOADS15return (≥ 0.0, ≤ Inf)Pending asset download count.
SIM_STAT_ASSET_UPLOADS16return (≥ 0.0, ≤ Inf)Pending asset upload count.
SIM_STAT_UNACKED_BYTES17return (≥ 0.0, ≤ Inf)Total unacknowledged bytes.
SIM_STAT_PHYSICS_STEP_MS18return (≥ 0.0, ≤ Inf)Average physics step time.
SIM_STAT_PHYSICS_SHAPE_MS19return (≥ 0.0, ≤ Inf)Average physics 'shape' segment update time.
SIM_STAT_PHYSICS_OTHER_MS20return (≥ 0.0, ≤ Inf)Average physics 'other' segment update time.
SIM_STAT_SCRIPT_EPS21return (≥ 0.0, ≤ Inf)Script events per second.
SIM_STAT_SPARE_MS22return (≥ 0.0, ≤ Inf)Spare time left after frame.
SIM_STAT_SLEEP_MS23return (≥ 0.0, ≤ Inf)Time spent sleeping.
SIM_STAT_IO_PUMP_MS24return (≥ 0.0, ≤ Inf)PumpIO time.
SIM_STAT_SCRIPT_RUN_PCT25return (≥ 0.0, ≤ 100.0)Percent of scripts run during frame.
SIM_STAT_AI_MS26return (≥ 0.0, ≤ Inf)Time spent on AI step.

Examples

default
{
    touch_start(integer num_detected)
    {
        float pct_chars_stepped = llGetSimStats(SIM_STAT_PCT_CHARS_STEPPED);
        llSay(0,
            "The percentage of pathfinding characters updated each frame was "
            + (string)pct_chars_stepped + "averaged over the last minute. The "
            + "value corresponds to the 'Characters Updated' stat in the "
            + "viewer's Statistics Bar. ");
    }
}

See also

Functions

Deep notes

History

Date of Release 26/10/2012