summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
diff options
context:
space:
mode:
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py b/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
index 7438d4d6..daa96a50 100644
--- a/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
+++ b/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
@@ -183,6 +183,16 @@ class prox_sock(object):
def reset_stats(self):
self._send('reset stats')
+ def lat_stats(self, cores, task=0):
+ min_lat = max_lat = avg_lat = 0
+ self._send('lat stats %s %s' % (','.join(map(str, cores)), task))
+ for core in cores:
+ stats = self._recv().split(',')
+ min_lat += int(stats[0])
+ max_lat += int(stats[1])
+ avg_lat += int(stats[2])
+ return min_lat, max_lat, avg_lat
+
def core_stats(self, cores, task=0):
rx = tx = drop = tsc = hz = 0
self._send('core stats %s %s' % (','.join(map(str, cores)), task))