summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
diff options
context:
space:
mode:
authorProvoost <luc.provoost@intel.com>2018-01-29 13:01:07 +0100
committerDeepak S <deepak.s@linux.intel.com>2018-01-29 12:45:19 +0000
commitd29f8fa251540b48371f76e47ddba6315607d192 (patch)
tree86f7ab6a79db68c03d5d86338161a117de18c3de /VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
parentaa09ff9157159b26c431ba61a6f0a08308d123dd (diff)
Rework of the test cases in the *.test files
Cores can now be specified in the test files. An irq test has been added to verify if the VMs are not suffering from long interrupts. Change-Id: I647fda3ebf76c7c2b36a8df9a63d9fb83563c249 Signed-off-by: Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py b/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
index daa96a50..059cbf71 100644
--- a/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
+++ b/VNFs/DPPD-PROX/helper-scripts/openstackrapid/prox_ctrl.py
@@ -184,15 +184,29 @@ class prox_sock(object):
self._send('reset stats')
def lat_stats(self, cores, task=0):
- min_lat = max_lat = avg_lat = 0
+ min_lat = 999999999
+ 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])
+ min_lat = min(int(stats[0]),min_lat)
+ max_lat = max(int(stats[1]),max_lat)
avg_lat += int(stats[2])
+ avg_lat = avg_lat/len(cores)
return min_lat, max_lat, avg_lat
+ def irq_stats(self, core, bucket, task=0):
+ self._send('stats task.core(%s).task(%s).irq(%s)' % (core, task, bucket))
+ stats = self._recv().split(',')
+ return int(stats[0])
+
+ def show_irq_buckets(self, core, task=0):
+ rx = tx = drop = tsc = hz = 0
+ self._send('show irq buckets %s %s' % (core,task))
+ buckets = self._recv().split(';')
+ buckets = buckets[:-1]
+ return buckets
+
def core_stats(self, cores, task=0):
rx = tx = drop = tsc = hz = 0
self._send('core stats %s %s' % (','.join(map(str, cores)), task))