Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Benchmarks & Stress Tests

Programs for measuring throughput, latency, and stability under load.

Source: performance/c/, stress/c/

Performance benchmarks

Measure throughput and latency of specific subsystems. All performance binaries are registered as ctest targets and run automatically with yunetas test.

BinaryDescription
perf_tcp_test4TCP echo throughput through the GObj protocol stack (plain).
perf_tcp_test5Same as test4 but with timeranger2 persistence.
perf_tcps_test4TLS-encrypted TCP echo throughput.
perf_tcps_test5TLS + timeranger2 persistence.
perf_yev_ping_pongRaw io_uring ping-pong (no GObj overhead), 1 KB messages.
perf_yev_ping_pong2Same as ping-pong but including timeranger2 persistence overhead.
perf_auth_bffPing-pong-style live throughput over the OAuth2 BFF (C_AUTH_BFF). Default 10 s runs.
perf_timeranger2timeranger2: the appends that build a store of 20 000 md2 files, its open as a master and as a replica, the create of topics and a topic_version change, a tm query of one minute on 600 000 rows (a filter on every row since 7.26.0).
perf_tr_treedbtreedb writes without the gclasses: updates in memory and saved, links and unlinks, creates, the reopen, forced deletes (of a child, and of a parent with 200 children).
perf_c_treedbThe open of a dynamic-schema treedb by C_TREEDB in a store of 40 treedbs: the same literal, a newer literal, the first projection (seed).
perf_rotatoryThe rotatory (the file log of every yuno and the agent audit): one record of 300 bytes as the audit writes it, with the retention, with a flush after each record, and one log record with its header.

The figures are not written here: they change with every release, and a figure written by hand outlives the release it was measured on. Every release since 7.25.5 is measured on one machine, each figure against the release before it, binaries alternated: the trend, the figures and the report of each release are on the performance page, and the newest ones on the landing page of yuneta.io.

The last four print one line of JSON per result, for example:

{"bench": "perf_tr_treedb", "case": "update_memory", "seconds": 0.289000, "ops": 100000, "us_per_op": 2.890, "events": 0}

perf_timeranger2 --small, perf_tr_treedb --small, perf_rotatory --small and perf_c_treedb --config-file=small.json run them with the sizes ctest uses. The A/B of single changes (one commit before and after) is in performance/c/README.md.

Source: performance/c/perf_c_tcp/, performance/c/perf_c_tcps/, performance/c/perf_yev_ping_pong/, performance/c/perf_yev_ping_pong2/, performance/c/perf_auth_bff/, performance/c/perf_timeranger2/, performance/c/perf_tr_treedb/, performance/c/perf_c_treedb/, performance/c/perf_rotatory/

Stress tests

Test scalability and stability under sustained extreme load. Stress tests are run manually — they are not part of ctest.

BinaryDescription
stress_listenTCP server that accepts massive concurrent connections (tested up to 1.5M). Tracks connection/message metrics and resource usage. Architecture: C_LISTEN → C_IOGATE → C_TCP_S → 11,000 pre-allocated C_CHANNEL → C_PROT_TCP4H → C_TCP.
stress/auth_bffDrives concurrent OAuth2 BFF login / refresh / logout cycles to expose races between the pending queue, the kc_timeout watchdog and the flush-on-disconnect path.

Companion Node.js scripts for generating load:

ScriptDescription
stress-connections.jsConnection load generator.
stress-traffic.jsMessage traffic generator.

Source: stress/c/listen/, stress/c/auth_bff/

Build flags

Both directories are enabled by default via CMake options in the root CMakeLists.txt:

option(ENABLE_PERFORMANCE "Build performance" ON)
option(ENABLE_STRESS      "Build stress"      ON)

Pass -DENABLE_PERFORMANCE=OFF or -DENABLE_STRESS=OFF to skip them.