The benchmark_pubsub.cpp microbenchmarks measure eCAL publish/subscribe performance within a single process using Google Benchmark. These tests evaluate how eCAL handles byte payloads on a specific topic (benchmark_topic) across different payload sizes ranging from 1 B to 16 MiB.
There are three primary benchmark types:
- Send/Bandwidth: Measures the cost of publishing messages. A receiver thread is present to maintain the publisher's flow, but receiver latency is not part of the measurement. Uses wall-clock time (
UseRealTime). - Send + Receive/Round-trip (1→1): Measures the cost of publishing a message and blocking until a receive callback is triggered. Uses wall-clock time (
UseRealTime). - Receive Latency (manual timing): Measures the delivery latency by timing the interval from immediately before blocking to the moment the callback timestamp is recorded. Uses manual timing (
UseManualTime and SetIterationTime).
Note: Because the publisher and subscriber reside in the same process (different threads), these benchmarks target intra-host and intra-process behavior.