Profile
This item is only intended to be used by the module's authors. Private
Where a frame's time goes, for the plugin's benchmark (Performance > Run benchmark). Each part of the
sea times itself with Profile.Add; every half second the averages per frame are written to the
OceanSurface as Prof_<Name> attributes (milliseconds per frame), readable from anywhere with no require.
Two clock reads per timed section, and a handful of attribute writes a second: cheap enough to leave on.
Functions
Add
Profile.Add(name: string,started: number) → ()Adds the time since started (an os.clock() reading) to name's total for this interval.
Publish
Counts a frame, and once the interval is up writes every total as milliseconds per frame onto model.
gauges (called only then) returns values measured elsewhere, already per frame.