From b36ebc87f449af5ad7a677350a3ccfc7d26cfb1e Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 2 Nov 2017 09:28:56 -0200 Subject: move client responsiveness tests to a subfolder --- client-responsiveness/scripts/get_ping_rate.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 client-responsiveness/scripts/get_ping_rate.py (limited to 'client-responsiveness/scripts/get_ping_rate.py') diff --git a/client-responsiveness/scripts/get_ping_rate.py b/client-responsiveness/scripts/get_ping_rate.py new file mode 100755 index 0000000..19d63d1 --- /dev/null +++ b/client-responsiveness/scripts/get_ping_rate.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +""" +Measure the connection rate to the dummy server running Soledad Client using +httperf and spit it out. +""" + +import commands +import re + +# ORIGINAL, STANDARD MEASURE (TOTALLY RANDOM) +#res = commands.getoutput( + #'httperf --server localhost --port 8080 --num-calls 5 --num-conns 20 ' + #'--uri /ping | grep "Connection rate"') + +res = commands.getoutput( + 'httperf --server localhost --port 8080 --num-calls 5 --num-conns 10 ' + '--uri /ping | grep "Connection rate"') +print re.findall('[-+]?([0-9]*\.?[0-9]+)', res)[0] -- cgit v1.2.3