summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-03 18:10:29 +0200
committerimarom <imarom@cisco.com>2016-03-03 18:11:08 +0200
commitf749b4358cfedd1ef7e0b58f69f63ee4d00554ea (patch)
treed9d87a4480eacfb290cef25ede72a37880198cb5 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
parent13cfb2c4ea55b7e0dab40155d8d51e7955ae4681 (diff)
RX stats example "stl_rx_stream.py"
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index 8da7c411..39d69178 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -156,7 +156,7 @@ class AsyncEventHandler(object):
def handle_async_rx_stats_event (self, data):
- self.client.rx_stats = data
+ self.client.rx_stats.update(data)
# handles an async stats update from the subscriber
@@ -433,13 +433,14 @@ class STLClient(object):
self.global_stats = trex_stl_stats.CGlobalStats(self.connection_info,
- self.server_version,
- self.ports)
+ self.server_version,
+ self.ports)
self.stats_generator = trex_stl_stats.CTRexInfoGenerator(self.global_stats,
- self.ports)
+ self.ports)
+
+ self.rx_stats = trex_stl_stats.CRxStats()
- self.rx_stats = {}
############# private functions - used by the class itself ###########
@@ -745,7 +746,7 @@ class STLClient(object):
stats['total'] = total
- stats['rx_stats'] = copy.deepcopy(self.rx_stats)
+ stats['rx_stats'] = self.rx_stats.get_stats()
return stats