The lifecycle of EmaCppIProvPerf is divided into the following sections:
Figure 11. EmaCppIProvPerf Application Flow
1. Application and Enterprise Message API Initialization.
EmaCppIProvPerf loads its configuration, initializes the Enterprise Message API, loads its sample message data using specified files, and starts one or more threads (as configured) to provide data to consumers. The Enterprise Message API is configured by using EmaConfig.xml.
The main thread periodically collects and writes statistics from the connection thread(s) until the test is over.
2. Handle Login, and Item Requests; Provide Updates.
• Send a burst of updates for items currently open on existing connections.
• Send a burst of generic messages (if configured to do so).
• Send reflected post messages (if configured to do so).
• Use available spare time to provide images for items that need them.
• Use available spare time to read from the transport, processing any Login, Directory, or Item requests.
3. Shutdown and cleanup.
The provider thread stops. The main thread collects any remaining data from the connection threads, cleans them up, and writes the final summary statistics. The main thread then cleans up the Enterprise Message API and remaining resources, and exits.
EmaCppIProvPerf should run long enough to allow connected consumers to complete their measurements.