|
@@ -44,6 +44,7 @@ def clean(benchmarker_config):
|
|
client.images.remove(image.id, force=True)
|
|
client.images.remove(image.id, force=True)
|
|
client.images.prune()
|
|
client.images.prune()
|
|
|
|
|
|
|
|
+
|
|
def __build(base_url, path, build_log_file, log_prefix, dockerfile, tag):
|
|
def __build(base_url, path, build_log_file, log_prefix, dockerfile, tag):
|
|
'''
|
|
'''
|
|
Builds docker containers using docker-py low-level api
|
|
Builds docker containers using docker-py low-level api
|
|
@@ -118,8 +119,8 @@ def build(benchmarker_config, test_names, build_log_dir=os.devnull):
|
|
log_prefix=log_prefix,
|
|
log_prefix=log_prefix,
|
|
path=test.directory,
|
|
path=test.directory,
|
|
dockerfile=test_docker_file,
|
|
dockerfile=test_docker_file,
|
|
- tag="techempower/tfb.test.%s" %
|
|
|
|
- test_docker_file.replace(".dockerfile", ""))
|
|
|
|
|
|
+ tag="techempower/tfb.test.%s" % test_docker_file.replace(
|
|
|
|
+ ".dockerfile", ""))
|
|
except Exception:
|
|
except Exception:
|
|
return 1
|
|
return 1
|
|
|
|
|
|
@@ -179,7 +180,8 @@ def run(benchmarker_config, test, run_log_dir):
|
|
extra_hosts=extra_hosts,
|
|
extra_hosts=extra_hosts,
|
|
privileged=True,
|
|
privileged=True,
|
|
ulimits=ulimit,
|
|
ulimits=ulimit,
|
|
- sysctls=sysctl)
|
|
|
|
|
|
+ sysctls=sysctl,
|
|
|
|
+ log_config={'type': None})
|
|
|
|
|
|
watch_thread = Thread(
|
|
watch_thread = Thread(
|
|
target=watch_container,
|
|
target=watch_container,
|
|
@@ -285,7 +287,8 @@ def start_database(benchmarker_config, database):
|
|
network_mode=benchmarker_config.network_mode,
|
|
network_mode=benchmarker_config.network_mode,
|
|
detach=True,
|
|
detach=True,
|
|
ulimits=ulimit,
|
|
ulimits=ulimit,
|
|
- sysctls=sysctl)
|
|
|
|
|
|
+ sysctls=sysctl,
|
|
|
|
+ log_config={'type': None})
|
|
|
|
|
|
# Sleep until the database accepts connections
|
|
# Sleep until the database accepts connections
|
|
slept = 0
|
|
slept = 0
|
|
@@ -301,6 +304,7 @@ def start_database(benchmarker_config, database):
|
|
|
|
|
|
return container
|
|
return container
|
|
|
|
|
|
|
|
+
|
|
def build_wrk(benchmarker_config):
|
|
def build_wrk(benchmarker_config):
|
|
'''
|
|
'''
|
|
Builds the techempower/tfb.wrk container
|
|
Builds the techempower/tfb.wrk container
|
|
@@ -313,6 +317,7 @@ def build_wrk(benchmarker_config):
|
|
build_log_file=os.devnull,
|
|
build_log_file=os.devnull,
|
|
tag="techempower/tfb.wrk")
|
|
tag="techempower/tfb.wrk")
|
|
|
|
|
|
|
|
+
|
|
def test_client_connection(benchmarker_config, url):
|
|
def test_client_connection(benchmarker_config, url):
|
|
'''
|
|
'''
|
|
Tests that the app server at the given url responds successfully to a
|
|
Tests that the app server at the given url responds successfully to a
|
|
@@ -360,4 +365,5 @@ def benchmark(benchmarker_config, script, variables, raw_file):
|
|
detach=True,
|
|
detach=True,
|
|
stderr=True,
|
|
stderr=True,
|
|
ulimits=ulimit,
|
|
ulimits=ulimit,
|
|
- sysctls=sysctl), raw_file)
|
|
|
|
|
|
+ sysctls=sysctl,
|
|
|
|
+ log_config={'type': None}), raw_file)
|