bananabench-xml Reference
Script defined in `lua/console/bananabench-xml.lua`. Runs bananabench on a predefined set of vehicles and exports results as XML, suitable for CI/CD performance reporting.
Script defined in lua/console/bananabench-xml.lua. Runs bananabench on a predefined set of vehicles and exports results as XML, suitable for CI/CD performance reporting.
Functions/Exports
XML (global table/class)
Simple XML builder with metatable-based OOP.
XML.create()- creates new XML nodexml:addChild(child)- adds child nodexml:encode()- returns full XML string with declarationxml:toString(indent)- recursive serialization with indentation
serializeXmlToFile(filename, obj) (local)
Writes XML object to file.
xh(name, attribs) (local)
Helper to create an XML node with name and attributes in one call.
writeXML(res, filename) (local)
Converts bananabench results into structured XML report format with:
<report>root with name, category, time<test>per vehicle (WithDynamicCollision / WithoutDynamicCollision variants)<result>containing<success>,<performance>,<executiontime>,<compiletime>,<metrics>
Predefined Test Vehicles
barstow, burnside, etki, fullsize, moonhawk, pessima, pickup, pigeon, pressure_ball
Usage
beamng -console lua/console/bananabench-xml.lua
# Outputs: bananabench.xmlInternal Notes
- Requires
lua/console/bananabenchmodule - XML format designed for CI performance dashboards (category="performance")
- Metrics include: MBeams/s, % realtime, max MBeams/s, max MBeams vehicle count
- Error log section is commented out (logcache not populated in current version)
- Output file hardcoded to
bananabench.xml
bananabench-print Reference
Script defined in `lua/console/bananabench-print.lua`. Simplest bananabench runner - executes the benchmark and prints results to console only.
bananabench Reference
Module defined in `lua/console/bananabench.lua`. Core physics benchmarking module that measures beam simulation throughput (MBeams/s) and real-time performance percentage across multiple vehicles.