summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
index 48111433..dea7c6d5 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
@@ -105,6 +105,9 @@ class WatchedField(object):
self.current = None
def update (self, value):
+ if value is None:
+ return
+
if value > self.high_th and not self.hot:
self.events_handler.log_warning("{0} is high: {1}{2}".format(self.name, value, self.suffix))
self.hot = True
@@ -607,8 +610,8 @@ class CGlobalStats(CTRexStats):
# simple...
self.latest_stats = snapshot
- self.watched_cpu_util.update(snapshot['m_cpu_util'])
- self.watched_rx_cpu_util.update(snapshot['m_rx_cpu_util'])
+ self.watched_cpu_util.update(snapshot.get('m_cpu_util'))
+ self.watched_rx_cpu_util.update(snapshot.get('m_rx_cpu_util'))
return True