Table of Contents
ex_gui_bench.c
Headless-friendly performance benchmark for the n_gui system. Builds one heavy, representative context (a large datagrid, a multiline textarea, a JSON syntax view, list widgets and many static labels/buttons) and times two hot paths in isolation:
- n_gui_draw() : average wall-clock milliseconds per full frame
- n_gui_process_event() : average microseconds per synthetic MOUSE_AXES
It renders to the display back buffer without flipping, so the number reflects the CPU cost of building the frame (text measurement, tokenization, primitive submission) rather than vsync/present latency. This is the metric the GUI optimisation work targets, and it is reproducible under Xvfb.
Not a correctness regression: like the other ex_gui_* programs it is excluded from run_tests.sh. Run it manually (optionally under xvfb-run) before and after an optimisation to compare numbers. It self-terminates and frees every resource, so it is also an ASan/LSan smoke test of the draw + teardown path.
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB