diff options
Diffstat (limited to 'scripts/automation/trex_control_plane/common')
-rwxr-xr-x | scripts/automation/trex_control_plane/common/trex_stats.py | 5 | ||||
-rwxr-xr-x | scripts/automation/trex_control_plane/common/trex_streams.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/common/trex_stats.py b/scripts/automation/trex_control_plane/common/trex_stats.py index 9c2cd7f1..3f64310f 100755 --- a/scripts/automation/trex_control_plane/common/trex_stats.py +++ b/scripts/automation/trex_control_plane/common/trex_stats.py @@ -59,7 +59,7 @@ def calculate_diff_raw (samples): class CTRexInfoGenerator(object): """ This object is responsible of generating stats and information from objects maintained at - CTRexStatelessClient and the ports. + STLClient and the ports. """ def __init__(self, global_stats_ref, ports_dict_ref): @@ -477,6 +477,9 @@ class CPortStats(CTRexStats): raise TypeError("cannot add non stats object to stats") # main stats + if not self.latest_stats: + self.latest_stats = {} + self.__merge_dicts(self.latest_stats, x.latest_stats) # reference stats diff --git a/scripts/automation/trex_control_plane/common/trex_streams.py b/scripts/automation/trex_control_plane/common/trex_streams.py index 800b6d49..ea3d71d1 100755 --- a/scripts/automation/trex_control_plane/common/trex_streams.py +++ b/scripts/automation/trex_control_plane/common/trex_streams.py @@ -210,7 +210,6 @@ class CStream(object): setattr(self, k, kwargs[k]) # TODO: load to _pkt_bld_obj also when passed as byte array! elif isinstance(binary, str) and binary.endswith(".pcap"): - # self.load_packet_from_pcap(binary, kwargs[k]["meta"]) self._pkt_bld_obj.load_packet_from_pcap(binary) self._pkt_bld_obj.metadata = kwargs[k]["meta"] self.packet = self._pkt_bld_obj.dump_pkt() |