summaryrefslogtreecommitdiff
path: root/get_ping_rate.py
diff options
context:
space:
mode:
Diffstat (limited to 'get_ping_rate.py')
-rw-r--r--get_ping_rate.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/get_ping_rate.py b/get_ping_rate.py
new file mode 100644
index 0000000..bf11f53
--- /dev/null
+++ b/get_ping_rate.py
@@ -0,0 +1,7 @@
+import commands
+import re
+
+res = commands.getoutput(
+ 'httperf --server localhost --port 8080 --num-calls 5 --num-conns 20 '
+ '--uri /ping | grep "Connection rate"')
+print re.findall('[-+]?([0-9]*\.?[0-9]+)', res)[0]