You can configure EmaCppConsPerf to send on-stream posts in which case the consumer periodically sends bursts of post messages for specified items in the item list file. You can also configure the tool to include latency information in its posts. When configured in this manner, EmaCppConsPerf adds latency information to random post messages. When the posted content returns on the stream, EmaCppConsPerf decodes the timestamp and measures the difference to determine posting latency.
Posting Latency Measurement Sequence:
1. Get the current time (t1).
2. Obtain an output buffer using rsslGetBuffer().
3. Encode the message, including the time (t1).
4. Pass the message to the API, which then passes it to the underlying transport.
5. When processing received content, check to see whether the payload contains latency information, if so:
• Get the current time (t2).
• Calculate the difference between timestamps.
• Store the result in the recorded output information.
The time at the start of encoding is encoded as a timestamp in the payload as field TIM_TRK_2 (3903). When the payload from the post returns from the platform, the consumer compares the timestamp to the current time to determine the posting latency.