From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

puthon3: adapted tester scripts to work with version 3

Signed-off-by: Waldemar Kozaczuk <[email protected]>

---
diff --git a/iperf3/tester.py b/iperf3/tester.py
--- a/iperf3/tester.py
+++ b/iperf3/tester.py
@@ -7,7 +7,7 @@
 print("Started iperf3 test ...")
 try:
    server_host = os.getenv('OSV_HOSTNAME')
-   output = subprocess.check_output(["iperf3", "-t", "5", "-c", server_host], 
stderr=subprocess.STDOUT)
+   output = subprocess.check_output(["iperf3", "-t", "5", "-c", server_host], 
stderr=subprocess.STDOUT).decode()
    print(output)
 
    if 'iperf Done' in output:
diff --git a/keydb/tester.py b/keydb/tester.py
--- a/keydb/tester.py
+++ b/keydb/tester.py
@@ -5,7 +5,7 @@
 
 print("Started keydb test ...")
 try:
-   output = subprocess.check_output(["redis-benchmark", "-t", "set,lpush", 
"-n", "100000", "-q"], stderr=subprocess.STDOUT)
+   output = subprocess.check_output(["redis-benchmark", "-t", "set,lpush", 
"-n", "100000", "-q"], stderr=subprocess.STDOUT).decode()
    print(output)
 
    if 'requests per second' in output:
diff --git a/mysql/tester.py b/mysql/tester.py
--- a/mysql/tester.py
+++ b/mysql/tester.py
@@ -7,7 +7,7 @@
 print("Started mysql test ...")
 try:
    sysbench_script_path = 
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sysbench.sh')
-   output = subprocess.check_output([sysbench_script_path], 
stderr=subprocess.STDOUT)
+   output = subprocess.check_output([sysbench_script_path], 
stderr=subprocess.STDOUT).decode()
    print(output)
 
    if 'execution time' in output:
diff --git a/redis-memonly/tester.py b/redis-memonly/tester.py
--- a/redis-memonly/tester.py
+++ b/redis-memonly/tester.py
@@ -7,7 +7,7 @@
 print("Started redis test ...")
 try:
    server_host = os.getenv('OSV_HOSTNAME')
-   output = subprocess.check_output(["redis-benchmark", "-h", server_host, 
"-t", "set,lpush", "-n", "100000", "-q"], stderr=subprocess.STDOUT)
+   output = subprocess.check_output(["redis-benchmark", "-h", server_host, 
"-t", "set,lpush", "-n", "100000", "-q"], stderr=subprocess.STDOUT).decode()
    print(output)
 
    if 'requests per second' in output:

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/0000000000008370dc059ece0c43%40google.com.

Reply via email to