bananabench-async Reference
Script defined in `lua/console/bananabench-async.lua`. Async/coroutine-based variant of the bananabench physics benchmark. Uses `coroutine.yield()` during physics steps to allow frame-by-frame executi
Script defined in lua/console/bananabench-async.lua. Async/coroutine-based variant of the bananabench physics benchmark. Uses coroutine.yield() during physics steps to allow frame-by-frame execution.
Functions/Exports
benchPhysics(vehicles, vehicleMin, vehicleMax) (global)
Coroutine-compatible benchmark function. Same structure as the core bananabench but uses coroutine.yield() in the update loop instead of direct BeamEngine.update calls. Tests with both dynamic collision ON and OFF.
- vehicles - vehicle names (default:
{'pickup'}) - vehicleMin - min count (default: 1), vehicleMax - max count (default: 12)
- Outputs table with dynamic collision vs no-collision comparison
myBenchStep(testVehicle, n) (global)
Spawns n vehicles, yields for gfxSteps frames, measures total time.
benchLog(level, origin, msg, newline) (global)
Log caching function (same as core bananabench).
benchmark_start() (global)
Creates a coroutine wrapping benchPhysics. Call once to initialize.
benchmark_update() (global)
Resumes the benchmark coroutine. Call each frame.
getAllVehicles() (local, unused)
Scans /vehicles directory and returns list of all vehicle names. Defined but not called in this script.
formatRes(res) (local, nested inside benchPhysics)
Formats a single result entry (MBeams/s and % realtime) for table output. Nested helper within the print loop.
Configuration
physicsFPS = 2000,physicsSteps = 100,gfxSteps = 20version = '0.4'
Usage
benchmark_start() -- initialize coroutine
-- then call benchmark_update() each frameInternal Notes
- Requires
lua/console/testat startup - Unlike core bananabench, uses
BeamEngine:spawnObject(notspawnObject2) andvec3(notVector3) - Compares dynamic collision on vs off in a 2-column output
- Uses
M = {}as global (not local), no module return - standalone script pattern - Older version (0.4) compared to core bananabench (0.5)
simpleProfiler/report Reference
Module defined in `lua/common/utils/simpleProfiler/report.lua`. Generates flame chart HTML reports from profiling data using Mustache templates.
bananabench-csv Reference
Script defined in `lua/console/bananabench-csv.lua`. Runs the full bananabench physics benchmark across ALL vehicles and exports results in CSV format.