diff --git a/benchmark.py b/benchmark.py index 23ec1b4..ef32d96 100755 --- a/benchmark.py +++ b/benchmark.py @@ -21,6 +21,7 @@ from django.contrib.auth.models import User, Group from django.core.cache import get_cache from django.db import connections, connection from django.test.utils import CaptureQueriesContext, override_settings +from django.utils.encoding import force_text import matplotlib.pyplot as plt import MySQLdb import pandas as pd @@ -71,11 +72,12 @@ def write_conditions(): versions['MySQL'] = cursor.fetchone()[0].split('-')[0] cursor.close() # Redis - out = check_output(['redis-cli', 'INFO', 'server']).replace('\r', '') + out = force_text(check_output(['redis-cli', + 'INFO', 'server'])).replace('\r', '') versions['Redis'] = re.search(r'^redis_version:([\d\.]+)$', out, flags=re.MULTILINE).group(1) # memcached - out = check_output(['memcached', '-h']) + out = force_text(check_output(['memcached', '-h'])) versions['memcached'] = re.match(r'^memcached ([\d\.]+)$', out, flags=re.MULTILINE).group(1) diff --git a/benchmark_requirements.txt b/benchmark_requirements.txt deleted file mode 100644 index 606541e..0000000 --- a/benchmark_requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ --r runtests_requirements.txt - -pandas -matplotlib diff --git a/benchmark_requirements_py2.txt b/benchmark_requirements_py2.txt new file mode 100644 index 0000000..7c1be62 --- /dev/null +++ b/benchmark_requirements_py2.txt @@ -0,0 +1,4 @@ +-r runtests_requirements_py2.txt + +pandas +matplotlib diff --git a/benchmark_requirements_py3.txt b/benchmark_requirements_py3.txt new file mode 100644 index 0000000..ff1fa95 --- /dev/null +++ b/benchmark_requirements_py3.txt @@ -0,0 +1,4 @@ +-r runtests_requirements_py3.txt + +pandas +matplotlib