This guide explains how to run the repository’s built-in performance checks and how to interpret the results.
The performance suite focuses on transport throughput, latency sensitivity, and zero-copy behavior for large payloads and sensor-like messages.
Relevant repository locations:
tests/perf_test/BUILDtests/perf_test/benchmark_pub.cctests/perf_test/benchmark_sub.cctests/perf_test/cyber_rt_benchmark_suite.cc
The target suite includes benchmark-style checks for:
- publish throughput
- subscription receive performance
- zero-copy verification
- sensor and POD-style payload handling
- SHM and same-host data path behavior
bazel build //tests/perf_test:benchmark_pub \
//tests/perf_test:benchmark_sub \
//tests/perf_test:cyber_rt_benchmark_suiteStart a subscriber process in one terminal:
./bazel-bin/tests/perf_test/benchmark_sub --helpThen start a publisher in another terminal:
./bazel-bin/tests/perf_test/benchmark_pub --helpIf the benchmark binary accepts arguments for payload size, message count, or concurrency, pass them explicitly to match your workload.
./bazel-bin/tests/perf_test/cyber_rt_benchmark_suite --helpThis suite is designed to gather a broader set of runtime measurements and emit machine-readable output for comparison.
For same-host shared-memory and large-payload tests, validate the following:
- borrowed / zero-copy message counts are non-zero when the transport supports it
- copy counts remain near zero when zero-copy is expected
- message integrity remains correct after transfer
- memory growth stays bounded over repeated runs
This repository’s benchmark design favors bounded execution and relative checks over brittle absolute latency thresholds. Avoid hardcoding strict timing limits unless the benchmark is explicitly designed for a controlled environment.
Use these rules when writing or extending performance validation:
- keep test scope explicit and bounded
- prefer relative throughput checks over single-machine absolute time assertions
- validate correctness together with speed
- keep payload sizes representative of actual traffic patterns
- document assumptions about same-host, SHM, or RTPS mode
- run correctness tests first
- run the local benchmark target
- validate zero-copy and POD behavior
- compare repeated runs to identify regressions
- treat large outliers as signals for deeper investigation, not as a reason to commit flaky thresholds