summaryrefslogtreecommitdiff
path: root/get_ping_rate.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-04-08 03:16:18 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-04-08 03:16:18 -0400
commit9abd16fcbc23306e542aaa5cdc2ea8e9847dbfd7 (patch)
treee3515203616179e9f81392e3ae6017fe91be70b9 /get_ping_rate.py
parent4dec62b52e9ee5982fc3587ea6c8eefc21d76417 (diff)
add ability to trigger a sync and measure reactor responsiveness
this is bad news though: we're blocking the reactor with the current implementation. what's the culprit?? stay tuned...
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]