Adding for easier reference for others who might be interested in pulling statistics from Trex and are new to Python Automation APIs for Tres.
Good example to begin with:
This example walks through
- connecting to the trex server
- Resetting the ports
- loading the profile ( if profile has latency flag set, one can also get latency stats)
- Clearing stats
- Starting traffic
- Retrieving stats using get_stats() API in dictionary format
- Disconnect from server
Other references found useful: